Hi All,
Please may I have your assistance with getting speckle up and running on Azure Kubernetes. The status of the pods are as follows
NAME READY STATUS RESTARTS AGE
pod/speckle-frontend-7945f8648-4tvfb 1/1 Running 0 4d21h
pod/speckle-monitoring-5c59c9c78d-cgmvx 1/1 Running 0 4d21h
pod/speckle-preview-service-85576b6797-vg7w7 1/1 Running 1105 (8m25s ago) 4d21h
pod/speckle-server-7f65d48d55-zh4nj 0/1 CrashLoopBackOff 1128 (5m4s ago) 4d
pod/speckle-webhook-service-6f69bf9fbf-qzl4l 0/1 CrashLoopBackOff 872 (2m20s ago) 4d
When I start a pod in debug mode
PS C:\Users\shiangj> kubectl debug node/aks-agentpool-31857045-vmss000002 -it --image=speckle/speckle-webhook-service:2.12.5-alpha.27056 --env=“REDIS_URL=my_azure_redisu_rl.windows.net:6380,password=my_redis_password,ssl=True,abortConnect=False” --env=“POSTGRES_URL=“psql host=postgres_host_name.postgres.database.azure.com port=5432 dbname=speckle user=postgres@postgres_host_name password=my_postgres_password sslmode=require””
Creating debugging pod node-debugger-aks-agentpool-31857045-vmss000002-m89dq with container debugger on node aks-agentpool-31857045-vmss000002.
If you don’t see a command prompt, try pressing enter.
{“level”:“error”,“time”:“2023-03-13T16:39:40.160Z”,“component”:“webhook-service”,“err”:{“type”:“Error”,“message”:“connect ECONNREFUSED 127.0.0.1:5432”,“stack”:“Error: connect ECONNREFUSED 127.0.0.1:5432\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)”,“errno”:-111,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:5432},“msg”:“Error executing task”}
Error from server (NotFound): pods “host=pg-ldd-dev-uksouth.postgres.database.azure.com” not found
PS C:\Users\shiangj> kubectl debug node/aks-agentpool-31857045-vmss000002 -it --image=speckle/speckle-server:2.12.5-alpha.27056 --env=“REDIS_URL=speckle-lld.redis.cache.windows.net:6380,password=my_redis_password=,ssl=True,abortConnect=False” --env=“POSTGRES_URL=“psql host=pg-ldd-dev-uksouth.postgres.database.azure.com port=5432 dbname=speckle user=postgres@pg-ldd-dev-uksouth password=my_postgres_password sslmode=require””
Creating debugging pod node-debugger-aks-agentpool-31857045-vmss000002-vfp82 with container debugger on node aks-agentpool-31857045-vmss000002.
If you don’t see a command prompt, try pressing enter.
{“level”:“info”,“time”:“2023-03-13T16:51:41.335Z”,“phase”:“db-startup”,“msg”:“Loaded knex conf for production”}
{“level”:“error”,“time”:“2023-03-13T16:51:41.818Z”,“err”:{“type”:“Error”,“message”:“connect ECONNREFUSED 127.0.0.1:5432”,“stack”:“Error: connect ECONNREFUSED 127.0.0.1:5432\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)”,“errno”:-111,“code”:“ECONNREFUSED”,“syscall”:“connect”,“address”:“127.0.0.1”,“port”:5432},“msg”:“connect ECONNREFUSED 127.0.0.1:5432”}
{“level”:“error”,“time”:“2023-03-13T16:51:48.133Z”,“component”:“redis”,“err”:{“type”:“Error”,“message”:“read ECONNRESET”,“stack”:“Error: read ECONNRESET\n at TCP.onStreamRead (node:internal/stream_base_commons:217:20)”,“errno”:-104,“code”:“ECONNRESET”,“syscall”:“read”},“msg”:“Redis encountered an error.”}
/speckle-server/packages/server/dist/modules/shared/redis/redis.js:18
throw new errors_1.EnvironmentResourceError(‘Redis encountered an error.’, err); //FIXME backoff and retry?
^
EnvironmentResourceError: Redis encountered an error.: read ECONNRESET
at EventEmitter. (/speckle-server/packages/server/dist/modules/shared/redis/redis.js:18:23)
at EventEmitter.emit (node:events:513:28)
at EventEmitter.emit (node:domain:489:12)
at EventEmitter.silentEmit (/speckle-server/node_modules/ioredis/built/Redis.js:460:30)
at Socket. (/speckle-server/node_modules/ioredis/built/redis/event_handler.js:189:14)
at Object.onceWrapper (node:events:628:26)
at Socket.emit (node:events:525:35)
at Socket.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3) {
jse_shortmsg: ‘Redis encountered an error.’,
jse_cause: Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20) {
errno: -104,
code: ‘ECONNRESET’,
syscall: ‘read’
},
jse_info: { code: ‘ENVIRONMENT_RESOURCE_ERROR’ },
cause: [Function: ve_cause]
}
Node.js v18.14.1
Error from server (NotFound): pods “host=pg-ldd-dev-uksouth.postgres.database.azure.com” not found
The strange thing is its trying to connect using local host (127.0.0.1) when I’ve clearly specified the use of the host name. Does this mean my connection string is not the right type for Speckle? I’ve used the same string to connect from a client successfully. Or is it because it cannot resolve the address and by default it will use localhost?
I’m also getting an issue with connecting to Redis (Azure Redis Cache), my feeling is these are related.
Any help would be greatly appreciated
Kind Regards
John