Published a year ago
Published a year ago
dikapriska
Updated a year ago
0
While upgrading the Safeline application from version 8.6.0 to 8.7.0 or 8.8.0 via Docker Compose, the safeline-mgt service fails to start. All other services work as expected, but safeline-mgt consistently crashes during initialization.
docker compose up -d.safeline-mgt fails to start.All services, including safeline-mgt, should start successfully after upgrading the application version to 8.7.0 or 8.8.0 using Docker Compose.
2025/05/26 09:24:16 [notice] 7#7: using the "epoll" event method
2025/05/26 09:24:16 [notice] 7#7: nginx/1.25.5
2025/05/26 09:24:16 [notice] 7#7: built by gcc 13.2.1 20231014 (Alpine 13.2.1_git20231014)
2025/05/26 09:24:16 [notice] 7#7: OS: Linux 5.11.0-49-generic
2025/05/26 09:24:16 [notice] 7#7: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2025/05/26 09:24:16 [notice] 8#8: start worker processes
2025/05/26 09:24:16 [notice] 8#8: start worker process 9
2025/05/26 09:24:16 [notice] 8#8: start worker process 10
2025/05/26 09:24:16 [notice] 8#8: start worker process 11
2025/05/26 09:24:16 [notice] 8#8: start worker process 12
2025/05/26 09:24:18 [error] 9#9: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.22.222.7, server: , request: "GET /inner/slave_mode HTTP/1.1", upstream: "http://127.0.0.1:8000/inner/slave_mode", host: "172.22.222.4"
2025/05/26 09:24:18 [error] 10#10: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.22.222.10, server: , request: "POST /inner/waiting/collect HTTP/1.1", upstream: "http://127.0.0.1:8000/inner/waiting/collect", host: "safeline-mgt"
2025/05/26 09:24:19 [error] 11#11: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 172.22.222.5, server: , request: "GET /inner/detector HTTP/1.1", upstream: "http://127.0.0.1:8000/inner/detector", host: "safeline-mgt"
2025/05/26 09:24:20 [error] 9#9: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 172.22.222.1, server: , request: "POST /api/open/publish/server HTTP/1.1", upstream: "http://127.0.0.1:8000/api/open/publish/server", host: "172.22.222.4:1443"
panic: failed to init models: AutoMigrate Error: ERROR: function gen_random_uuid() does not exist (SQLSTATE 42883)
goroutine 1 [running]:
main.main()
/work/main.go:40 +0x199
xbingW
Updated a year ago
0
What version is your PostgreSQL, and why doesn't it have gen_random_uuid()?
dikapriska
Updated a year ago
0
I'm using PostgreSQL 12. At first, I was confused why gen_random_uuid() wasn’t available — then I realized it’s part of the pgcrypto extension, which isn’t installed by default in this version.
Once I figured that out, I ran:
CREATE EXTENSION IF NOT EXISTS pgcrypto;
After that, everything worked as expected.
Thanks for pointing it out!