URGENT: Unable to login after connect

Hi,
I just deployed on of our sites. However, I am not able to login to the site, or load it. And in logs I get the following error:

2021-11-08T20:01:41.019 runner[9601eb64] maa [info] Starting instance
2021-11-08T20:01:41.051 runner[9601eb64] maa [info] Configuring virtual machine
2021-11-08T20:01:41.054 runner[9601eb64] maa [info] Pulling container image
2021-11-08T20:01:44.875 runner[9601eb64] maa [info] Unpacking image
2021-11-08T20:01:44.883 runner[9601eb64] maa [info] Preparing kernel init
2021-11-08T20:01:45.004 runner[9601eb64] maa [info] Setting up volume ‘appdata’
2021-11-08T20:01:45.171 runner[9601eb64] maa [info] Configuring firecracker
2021-11-08T20:01:45.803 runner[9601eb64] maa [info] Starting virtual machine
2021-11-08T20:01:45.975 app[9601eb64] maa [info] Starting init (commit: 7943db6)…
2021-11-08T20:01:45.996 app[9601eb64] maa [info] Mounting /dev/vdc at ./usr/src/app/resources
2021-11-08T20:01:46.008 app[9601eb64] maa [info] Preparing to run: docker-entrypoint.sh npm start as root
2021-11-08T20:01:46.024 app[9601eb64] maa [info] 2021/11/08 20:01:46 listening on [fdaa:0:3014:a7b:1449:0:3baf:2]:22 (DNS: [fdaa::3]:53)
2021-11-08T20:01:46.607 app[9601eb64] maa [info] > chatapp@1.0.0 start
2021-11-08T20:01:46.607 app[9601eb64] maa [info] > node chat.js
2021-11-08T20:01:46.988 proxy[9601eb64] maa [error] Error 2000: problem connecting to app instance
2021-11-08T20:01:47.110 proxy[9601eb64] dxb [error] Error 1: Undocumented

@ponchinchon Could you mention the app ID? Will check out.

9601eb64

It looks like the app keeps exiting with status code 1 — which means that Fly can’t keep it running at all. Could you try adding more logging to see what’s going on?

Below is further error. However, It was working before I deployed and the same code is working locally. There is no timeout and no issues. Only after deployment, these issues have started.

2021-11-08T20:56:36.621 app[9601eb64] maa [info] /usr/src/app/routes/index.js:52
2021-11-08T20:56:36.621 app[9601eb64] maa [info] if (error) throw new Error(error);
2021-11-08T20:56:36.621 app[9601eb64] maa [info] ^
2021-11-08T20:56:36.621 app[9601eb64] maa [info] Error: Error: connect ETIMEDOUT 2606:4700:3032::ac43:da39:443
2021-11-08T20:56:36.621 app[9601eb64] maa [info] at Request._callback (/usr/src/app/routes/index.js:52:26)
2021-11-08T20:56:36.621 app[9601eb64] maa [info] at self.callback (/usr/src/app/node_modules/request/request.js:185:22)
2021-11-08T20:56:36.621 app[9601eb64] maa [info] at Request.emit (node:events:390:28)
2021-11-08T20:56:36.621 app[9601eb64] maa [info] at Request.onRequestError (/usr/src/app/node_modules/request/request.js:877:8)
2021-11-08T20:56:36.621 app[9601eb64] maa [info] at ClientRequest.emit (node:events:390:28)
2021-11-08T20:56:36.621 app[9601eb64] maa [info] at TLSSocket.socketErrorListener (node:_http_client:447:9)
2021-11-08T20:56:36.621 app[9601eb64] maa [info] at TLSSocket.emit (node:events:390:28)
2021-11-08T20:56:36.621 app[9601eb64] maa [info] at emitErrorNT (node:internal/streams/destroy:164:8)
2021-11-08T20:56:36.621 app[9601eb64] maa [info] at emitErrorCloseNT (node:internal/streams/destroy:129:3)
2021-11-08T20:56:36.621 app[9601eb64] maa [info] at processTicksAndRejections (node:internal/process/task_queues:83:21)
2021-11-08T20:56:36.621 app[9601eb64] maa [info] Node.js v17.0.1
2021-11-08T20:56:36.630 proxy[9601eb64] maa [error] Error 2003: App connection closed before request/response completed
2021-11-08T20:56:37.162 app[9601eb64] maa [info] Main child exited normally with code: 1

Any idea what URL is being hit in usr/src/app/routes/index.js:52? It doesn’t seem to be accessible and is causing the app to error out.

I cannot disclose the URL here, But I tested that url, and its working locally, as well as from Postman and CURL

And is that URL internal to the network that your computer is on? Or is it publicly accessible from the internet? You can also fly ssh console into one of your VMs to try hitting it, and run a traceroute to make sure you’re getting a path there.

I just redeployed and it appears to be working.
It looks like there was an issue with NodeJS version. It was running on node 17 on server, whereas locally it was Node 16. I set server version to Node 16, and it appears to be working.

Will look in detail tomm. But for now, it appears to be fixed.

1 Like