Can't connect to Telegram - EHOSTUNREACH

Hello,

For some reason I can’t connect Telegram to n8n.

When I enter my Access Token I receive the following error: Couldn’t connect with these settings. “More details” shows: EHOSTUNREACH

The access token is correct - I have a 3rd party service working with this token without issues.

I created new Telegram bot to check if a new token would fix the issue and it doesn’t.

Once I save the credentials and try to run a workflow with a Telegram node, I receive this error:

Problem in node 'Telegram'
connect EHOSTUNREACH 2001:67c:4e8:f004::9:443
Issues:

connect EHOSTUNREACH 2001:67c:4e8:f004::9:443 (connect EHOSTUNREACH 2001:67c:4e8:f004::9:443)
Execution Error.
Error stack:

NodeApiError: connect EHOSTUNREACH 2001:67c:4e8:f004::9:443
    at Object.apiRequest (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Telegram/GenericFunctions.ts:179:9)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.execute (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Telegram/Telegram.node.ts:2003:21)
    at Workflow.runNode (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1269:19)
    at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:952:29

2001:67c:4e8:f004::9 should be an IP of Telegram, but it’s unlikely that this is a Telegram issue.

I hope you could help me fix it.

Describe the problem/error/question

Can’t connect to Telegram API.

What is the error message (if any)?

Problem in node ‘Telegram‘

connect EHOSTUNREACH 2001:67c:4e8:f004::9:443

Issues:

* connect EHOSTUNREACH 2001:67c:4e8:f004::9:443 (connect EHOSTUNREACH 2001:67c:4e8:f004::9:443)
* Execution Error.

Please share your workflow


    {
      "parameters": {
        "chatId": "{CHAT ID}",
        "text": "{TEXT}",
        "additionalFields": {}
      },
      "id": "{ID}",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1,
      "position": [
        1040,
        420
      ],
      "executeOnce": false,
      "alwaysOutputData": false,
      "credentials": {
        "telegramApi": {
          "id": "3",
          "name": "Telegram account"
        }
      }
    }
  ],
  "connections": {}
}

Share the output returned by the last node

Issues:

  • connect EHOSTUNREACH 2001:67c:4e8:f004::9:443 (connect EHOSTUNREACH 2001:67c:4e8:f004::9:443)
  • Execution Error.

Information on your n8n setup

  • n8n version: 0.233.1
  • Database (default: SQLite): Default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Ubuntu 22

Hey @alex_st,

Host unreachable is normally a network issue, in this case for some reason your n8n instance is not able to reach Telegram using the ipv6 address.

A quick check on the IP shows it is one for Telegram, there is going to be something between you and Telegram blocking this connection or Telegram is no longer using that address.

Is the other service running from the same machine and is it also using ipv6? As a quick test it could be worth disabling ipv6 to see if that connects or try using curl / postman / insomnia from the same machine to see if that is able to connect to telegram.

1 Like

Hello once again, @Jon,

It was indeed an issue with the connection from my machine.

Recently I detatched the machine’s IPv6, so it works with IPv4 only.

It seems n8n can’t connect to Telegram without IPv6.

Do you know a workaround which could help me working with the Telegram app without IPv6?

Cheers!

Hey @alex_st,

I am not aware of any current issues with n8n not being able to support ipv6 so it could be an issue outside of n8n still although I would have expected something odd like this to impact Docker rather than npm.

I know that Telegram doesn’t support IPv6 with webhooks which is in their docs, I am not sure if the normal api has the same issues I will do some digging and see what I can find.

Hey, @Jon,

Thank you very much.

Yes, I have no Docker on my machine and installed n8n with npm. Pretty odd indeed.

I just want to confirm that I managed to fix the issue once I re-attached the IPv6 to my machine.

Other connections and nodes, such as Stripe and Mattermost were functioning normally without the IPv6.

Thank you very much for digging in!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.