Reverse proxy error 503

Hello, i’m trying to use a reverse proxy utilizing AWS ( debian ) and SQUID, it work on fire fox but at N8N show’s 503 error, already tried everything ChatGPT told me to do, searched on youtube videos and forums but nothing worked. I need a proxy to show my brazilian IP instead of the n8n IP to make a API request. I don’t know nothing about proxy, just watched some youtube tutorials and used chatGPT to makeit, please help me

Here’s the log:
{
“errorMessage”: “Service unavailable - try again later or consider setting this node to retry automatically (in the node settings)”,
“errorDetails”: {
“rawErrorMessage”: [
“503 - "\n\n<meta type=\"copyright\" content=\"Copyright (C) 1996-2021 The Squid Software Foundation and contributors\">\n<meta http-equiv=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\nERROR: The requested URL could not be retrieved\n<style type=\"text/css\">\n\n<div id=\"titles\">\n

ERROR

\n

The requested URL could not be retrieved

\n\n
\n\n<div id=\"content\">\n

The following error was encountered while trying to retrieve the URL: <a href=\"ERRO 404”>https://zug.consignadorapido.com.br/api/auth

\n\n<blockquote id=\"error\">\n

Connection to 2606:4700:3031::6815:2928 failed.

\n\n\n<p id=\"sysmsg\">The system returned: (101) Network is unreachable

\n\n

The remote host or network may be down. Please try the request again.

\n\n

Your cache administrator is <a href=\"mailto:webmaster?subject=CacheErrorInfo%20-%20ERR_CONNECT_FAIL&body=CacheHost%3A%20ip-172-31-40-38%0D%0AErrPage%3A%20ERR_CONNECT_FAIL%0D%0AErr%3A%20(101)%20Network%20is%20unreachable%0D%0ATimeStamp%3A%20Thu,%2025%20Jul%202024%2013%3A11%3A31%20GMT%0D%0A%0D%0AClientIP%3A%2020.218.202.73%0D%0AServerIP%3A%20zug.consignadorapido.com.br%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Fapi%2Fauth%20HTTP%2F1.1%0AAccept%3A%20application%2Fjson,text%2Fhtml,application%2Fxhtml+xml,application%2Fxml,text%2F*%3Bq%3D0.9,%20image%2F*%3Bq%3D0.8,%20*%2F*%3Bq%3D0.7%0D%0AContent-Type%3A%20application%2Fjson%0D%0AUser-Agent%3A%20axios%2F1.6.7%0D%0AContent-Length%3A%2045%0D%0AAccept-Encoding%3A%20gzip,%20compress,%20deflate,%20br%0D%0AConnection%3A%20keep-alive%0D%0AHost%3A%20zug.consignadorapido.com.br%0D%0A%0D%0A%0D%0A\">webmaster.

\n\n
\n\n\n
\n<div id=\"footer\">\n

Generated Thu, 25 Jul 2024 13:11:31 GMT by ip-172-31-40-38 (squid/5.7)

\n\n\n\n""
],
“httpCode”: “503”
},
“n8nDetails”: {
“nodeName”: “HTTP Request”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.2,
“itemIndex”: 0,
“time”: “25/07/2024, 10:11:31”,
“n8nVersion”: “1.47.3 (Cloud)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeApiError: Service unavailable - try again later or consider setting this node to retry automatically (in the node settings)”,
" at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:1634:35)“,
" at processTicksAndRejections (node:internal/process/task_queues:95:5)”,
" at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:728:19)“,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:664:51”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1076:20"
]
}
}

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
1 Like

Thanks, i edited the topic

Hey @Pedro_Barbosa,

It looks you are getting an error back from your Squid proxy, If the proxy is something you set up yourself you may need to refer to the the documentation for it while we support the n8n application we don’t directly provide support for Squid. Looking at the error maybe it is an ipv6 issue, You could try seeing if Squid has an option to always use IPv4 and see if that helps.

If the site you are accessing is over https as well you may have an issue if you don’t have Squid configured to listen for https traffic as well.

OK, i triyed some configs and now i am able to make the request, but only at the terminal from my virtual machine, on N8N still returning error 503. I gess this shows that the error isn’t the Squid anymore.

Hey @Pedro_Barbosa,

What error are you seeing in n8n now? If you are still getting the HTML page back from Squid it could be the old CONNECT issue we are aware of and you will need to configure squid to use HTTPS.

Hi, so yeah, im getting the same HTML page when trying HTTP, but when I tried HTTPS ( after i installed auto-asigned certificates, and configured squid to use HTTPS ) this is the error:

{
“errorMessage”: “write EPROTO E8B1255EA67F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:354:\n”,
“errorDetails”: {
“httpCode”: “rejected”
},
“n8nDetails”: {
“nodeName”: “HTTP Request”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.2,
“itemIndex”: 0,
“time”: “30/07/2024, 14:27:18”,
“n8nVersion”: “1.47.3 (Cloud)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeApiError: write EPROTO E8B1255EA67F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:354:”,
“”,
" at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:1634:35)“,
" at processTicksAndRejections (node:internal/process/task_queues:95:5)”,
" at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:728:19)“,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:664:51”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1076:20"
]
}
}

Hey @Pedro_Barbosa,

That looks like it might be using SSL instead of TLS which is odd, Do you have both the proxy using https in n8n and the url using https?

I think so, the proxy is in HTTPS and the endpoint too. I don’t get it why in the Bash i did the request and on N8N it crashes

Hey @Pedro_Barbosa,

Bash and n8n both use different methods to connect, in n8n we use Axios for the requests which can have issues with some proxies. I have tested again with my local squid setup and it appears to be working for both HTTP and HTTPS when the proxy is configured with a cert.

Hi there, so the solution I founded was installing the N8N on docker at the VPS, it worked fine

1 Like

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