Connection problems

Hi, I use the tunnel mode and all of the sudden my gui tells me that connection is lost. I cannot find a problem on my side … may I assume that the n8n servers currently have a problem?

Hey @daniello :wave:

Can you please specify how are you using n8n? For me, it is running as expected and I am not getting any issues.

hi @harshil1712
I use:
pm2 start ‘n8n start --tunnel’
worked for several days withouth a problem. Did some changes to a workflow and all of a sudden it fails … some connection problems to some api thing.
When I refresh at the moment I either get a connection error from the browser, a blank white screen or I see the GUI faded-out … trying to connect.
SSH access to the my VM works.

@harshil1712

Caught a snap of when the gui partially loads.

That error means that your backend is not running or can not be reached. Impossible to say why that would be the case. You have to check your n8n process and see if it is running and/or if there are any error messages.

Some possible reasons:

  • You did configure n8n wrong and you tell the frontend to look for a server where there is none
  • n8n crashed (for whatever reason) and could not start again (but then also the frontend should not be reachable)
  • Network related issues. Everything is correctly up but it can not connect

Btw. the tunnel is only for testing & development. You should not use it to run n8n in production.

Very strange … I didn’t change the config … I just changed the workflow.
I did reboot the VM before I posted the problem
SSH is working well

Oh my :frowning:

My use cases are tiny … and I have no official server in the internet that I can use. As long as the tunnel does the trick … I’m fine with it I guess.

Could it be I wrecked it with a workflow? Anyway to fix this … without losing what I had already done?

================================
Start Active Workflows:

  • creditcard_reminder
    ADD ID (active): 1
    events.js:291
    throw er; // Unhandled ‘error’ event
    ^

Error: self signed certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1502:34)
at TLSSocket.emit (events.js:314:20)
at TLSSocket._finishInit (_tls_wrap.js:937:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:711:12)
at Socket.ondata (internal/js_stream_socket.js:77:22)
at Socket.emit (events.js:314:20)
at addChunk (_stream_readable.js:298:12)
at readableAddChunk (_stream_readable.js:273:9)
at Socket.Readable.push (_stream_readable.js:214:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
Emitted ‘error’ event on Connection instance at:
at TLSSocket._onError (/usr/lib/node_modules/n8n/node_modules/imap/lib/Connection.js:151:10)
at TLSSocket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
code: ‘DEPTH_ZERO_SELF_SIGNED_CERT’,
source: ‘socket’
}

Yes, it looks like that n8n crashes on startup as it tries to activate the workflow with the ID 1. The only way to fix that would be to manually deactivate the workflow via tha database.

Can you guide me?

just some side information:

I had tested several actions on that worklow … each of them working by themselves. The last step I made was to deactivate a few of them (pause button) … and connect an email trigger to two actions.

Bang!

That depends on your database.

But generally, you have to download a tool like https://dbeaver.io/ then connect to your database, open the table with the name “workflow_entity”, look for the workflow with the ID 1, and change “active” from 01.

After you have done that, n8n should start fine again. But you should not activate that workflow again.

hmm … what I’d like to keep is the authorisations I had set up in the meantime.
Are the workflows perhaps in a separate DB … which I could just delete?

delete db would still work fine for me … I installed the tool (don’t know if I will manage) … but I think I need the path to the db

If you say path I assume you are using SQLite. That file (named database.sqlite) can be found in the folder .n8n in your users home directory.

So the path on Linux would be:

~/.n8n/database.sqlite

trying to connect from my windows machine but obviously I’m not capable enough … sorry to be such a pain.
Any easy way to get n8n up again? Delete VM … start over?

The easiest thing would be to simply delete the database-file in your VM and then restart n8n. It will then automatically recreate it again.

Did so … works again.

Maybe this could be a feature request. Have a script that deactivates all workflows … in case of emergency.

And it might be a bright idea to separate workflows from credentials :slight_smile:

Now … all I did was configure one imap trigger and immedately - when I start the workflow - it happens again (see screenshot) … this was the only thing I did. What is wrong?

@jan
could this be fixed with todays release … coming from 0.87.2 ?