bschoss
By:
bschoss

connection timeout on node.js app on Fedora

December 7, 2016 570 views
Fedora Node.js Arch Linux

Hi,

I am running my MEAN stack on a new Fedora droplet. I seem to have the same problem as described in https://www.digitalocean.com/community/questions/connection-timeout-on-node-js-app.

The interesting thing is that it was working after creating the droplet, but stopped about 24hrs after creation of the droplet.

$ node -v gives a result, ping and tracert to my IP work, curl however does not.

I tried a simple http-server ($ npm install http-server), same result (ports open, ping working):
Starting up http-server, serving ./
Available on:
http://127.0.0.1:8080
http://46.101.123.3:8080
http://10.19.0.5:8080
[root@fedora-512mb-fra1-01 ~]# sudo netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 19235/mongod
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 28920/node
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 996/sshd
tcp6 0 0 :::22 :::* LISTEN 996/sshd

Pinging 46.101.123.3 with 32 bytes of data:
Reply from 46.101.123.3: bytes=32 time=29ms TTL=54
Reply from 46.101.123.3: bytes=32 time=27ms TTL=54
Reply from 46.101.123.3: bytes=32 time=26ms TTL=54
Reply from 46.101.123.3: bytes=32 time=47ms TTL=54

curl: (7) Failed to connect to 46.101.123.3 port 8080: Timed out

Thx.

3 Answers

so this is what I did:

  • destroyed the old droplet
  • created a new droplet (I hope I dont get billed again ;) )
  • installed yum, git, nodejs, npm, vim
  • installed http-server ($ npm install http-server -g)
  • started server ($ http-server)
  • all good, I get a response at my remote client and the protocol at the server, naturally also curl gives a response now

I will install my stack and see how it evolves. As said the problem only occurred about 24hrs after the original droplet creation.

added my stack and the DNS-settings, everything working. Possibly fail2ban was the issue, this is the only element still missing from the original configuration.

ok, everything still up and running, was also able to send conf e-mails. Clearly fail2ban caused the issue.

Have another answer? Share your knowledge.