Does the proxy log show any errors? Is your proxy also configured to use a self signed certificate for the connection or is it a proper cert? Looking at the previous post this is something that I know works so I suspect there is going to be another configuration issue somewhere.
If you are using a self signed certificate that will likely be the issue as the Node instance for n8n won’t trust the certificate and it would fail.
@Jon The proxy log shows it has been routed and no error. I does use self-signed certificate, but I’ve add the CA to the n8n docker image, and add NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt env.
Is there any method to make n8n show more detailed error?
Or, how can I patch n8n’s axios to fix the proxy bug?
If the request is being routed then it would suggest that it is a legitimate 400 error and the data you are sending to Telegram is incorrect somewhere. You could try making the same request using the HTTP request node to see what that returns with the full response option on.
@Jon This is what I got from GET https://google.com:
{"status":"rejected","reason":{"message":"503 - \"\"","name":"Error","stack":"Error: 503 - \"\"\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at RedirectableRequest.handleResponse (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:238:9)\n at RedirectableRequest.emit (node:events:525:35)\n at RedirectableRequest.emit (node:domain:489:12)\n at RedirectableRequest._processResponse (/usr/local/lib/node_modules/n8n/node_modules/follow-redirects/index.js:356:10)\n at ClientRequest.RedirectableRequest._onNativeResponse (/usr/local/lib/node_modules/n8n/node_modules/follow-redirects/index.js:62:10)\n at Object.onceWrapper (node:events:628:26)\n at ClientRequest.emit (node:events:513:28)\n at ClientRequest.emit (node:domain:489:12)"}}
Here is the stack:
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:1253:27)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:652:28)
at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:596:53
What did n8n report back as the error? Looking at the page I can see the curl user-agent but I can’t see one for n8n which makes me wonder if maybe the connection is not going through and there is still some odd proxy setting that Axios is not able to work with.
I can confirm that n8n is still working as expected when using Squid as a proxy.
{"status":"rejected","reason":{"message":"503 - \"\"","name":"Error","stack":"Error: 503 - \"\"\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at RedirectableRequest.handleResponse (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:238:9)\n at RedirectableRequest.emit (node:events:525:35)\n at RedirectableRequest.emit (node:domain:489:12)\n at RedirectableRequest._processResponse (/usr/local/lib/node_modules/n8n/node_modules/follow-redirects/index.js:356:10)\n at ClientRequest.RedirectableRequest._onNativeResponse (/usr/local/lib/node_modules/n8n/node_modules/follow-redirects/index.js:62:10)\n at Object.onceWrapper (node:events:628:26)\n at ClientRequest.emit (node:events:513:28)\n at ClientRequest.emit (node:domain:489:12)"}}
{"status":"rejected","reason":{"message":"400 - \"Client sent an HTTP request to an HTTPS server.\\n\"","name":"Error","stack":"Error: 400 - \"Client sent an HTTP request to an HTTPS server.\\n\"\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at RedirectableRequest.handleResponse (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:238:9)\n at RedirectableRequest.emit (node:events:525:35)\n at RedirectableRequest.emit (node:domain:489:12)\n at RedirectableRequest._processResponse (/usr/local/lib/node_modules/n8n/node_modules/follow-redirects/index.js:356:10)\n at ClientRequest.RedirectableRequest._onNativeResponse (/usr/local/lib/node_modules/n8n/node_modules/follow-redirects/index.js:62:10)\n at Object.onceWrapper (node:events:628:26)\n at ClientRequest.emit (node:events:513:28)\n at ClientRequest.emit (node:domain:489:12)"}}
It looks like the server didn’t receive request. It’s so interesting that curl works well and n8n just don’t work. No idea how to debug it.
I suspect it could be more oddness with Axios and the way your proxy is configured, Although that second error seems to think an http request was sent almost like the https_proxy isn’t using https. Does your proxy log the url it is getting?
I don’t know V2Ray but I suspect there is going to be some checkbox somewhere that is doing something odd.
I can provide you with the steps that I use for testing but it should be considered as just a test environment and for something that you plan to use in production it would be worth investigating a safer configuration.
This assumes you have your SSL certificate under ~/squidcert.pem, If you plan to use a self signed certificate there is more risk involved.