Self hosted n8n connection timed out (using aws instance)

Hi, I am getting started with using self hosted n8n.
I used AWS ec2 instance(t2.micro) and ubuntu 20.04, and connected the nodes below, and have made 6 workflows.

  • MongoDB Cluster
  • Google Spreadsheet
  • Slack
  • SendGrid

For example, I connected MongoDB Cluster for every 1-5 minutes to bring data and stack data to Spreadsheet.

2 days ago, my instance had not passed the instance reachability check, and the self-hosted n8n has stopped. It showed: “ERR_CONNECTION_TIMED_OUT”
and the http page completely failed to load response data. (No resource with given identifier found)

So I changed the AWS instance type to t.2medium and reload it, but it still doesn’t work. Same error message and failed to load response data.

How could I solve this issue? Thank you in advance!

Hey @LuciaWoo,

Welcome to the community :tada:

How do you have n8n installed? It could that it isn’t running, a good starting point would be to check the console log to see if there are any errors there.

Thanks for your reply!
The ec2 instance server is currently working well, and the web console does not report an error, but a single notice saying “crbug/1173575, non-JS module files deprecated.”

Hey @LuciaWoo,

Sorry when I mentioned console I meant on the server not in the browser window.

I have made an assumption that n8n isn’t loading at all though, are you able to access it in a browser or does it fail?

I also think that n8n isn’t loading at all, but it does fail every time, even when I access by IPv4 address.
I checked through ec2 instance > Ubuntu console, and the Docker was active.

Hey @LuciaWoo,

Can you check what the docker log is saying? If it is failing when you access from the IP it could be that n8n is not running properly in the container or there has been some other change that we are not aware of.

Let’s start with what we do know though and check the docker logs to make sure it is happy.

1 Like

Hey @Jon , thank you for your replies!
The docker logs passed similar errors when I first built n8n, but I forgot how to solve it😅
maybe similar with this? https://community.n8n.io/t/traefik-errors-when-starting-docker-compose/7915

time="2022-04-14T11:21:27Z" level=error msg="accept tcp [::]:8080: use of closed network
 connection" entryPointName=traefik
time="2022-04-14T11:21:27Z" level=error msg="Error while starting server: accept tcp [::
]:8080: use of closed network connection" entryPointName=traefik
time="2022-04-14T11:21:27Z" level=error msg="accept tcp [::]:80: use of closed network c
onnection" entryPointName=web
time="2022-04-14T11:21:27Z" level=error msg="Error while starting server: accept tcp [::
]:80: use of closed network connection" entryPointName=web
time="2022-04-14T11:21:27Z" level=error msg="accept tcp [::]:443: use of closed network 
connection" entryPointName=websecure
time="2022-04-14T11:21:27Z" level=error msg="Error while starting server: accept tcp [::
]:443: use of closed network connection" entryPointName=websecure
time="2022-04-14T11:23:25Z" level=info msg="Configuration loaded from flags."

Hey @LuciaWoo,

Have you tried restarting the server? That looks like the networking has got in a bit of a funky state. Although there could be more to it, it might be worth restarting the containers and following the logs to see if it has any issues from the initial binding.