EAI_AGAIN axios error on http nodes

I am getting axios “EAI” and “EAI_AGAIN” type errors when trying get requests to my custom fastapi hosted on railway. I had no problems with this before. I have another railway node setup in pretty much the exact way but it works fine.

When i do a basic HTTP request via POWERSHELL the request works fine.

When i do it in n8n I get the errors. Same request as far as I can tell, same endpoint, same URL.

Describe the problem/error/question

getaddrinfo EAI_AGAIN jobapply-fastapi-production-0990.up.railway.app

What is the error message (if any)?

Error: getaddrinfo EAI_AGAIN jobapply-fastapi-production-0990.up.railway.app
    at Function.AxiosError.from (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/axios/lib/core/AxiosError.js:92:14)
    at RedirectableRequest.handleRequestError (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/axios/lib/adapters/http.js:620:25)
    at RedirectableRequest.emit (node:events:536:35)
    at ClientRequest.eventHandlers.<computed> (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/follow-redirects/index.js:49:24)
    at ClientRequest.emit (node:events:524:28)
    at emitErrorEvent (node:_http_client:101:11)
    at TLSSocket.socketErrorListener (node:_http_client:504:5)
    at TLSSocket.emit (node:events:524:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at Axios.request (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/axios/lib/core/Axios.js:45:41)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at invokeAxios (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:206:10)
    at proxyRequestToAxios (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:656:20)
    at Object.request (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1698:4)

Please share your workflow

Share the output returned by the last node

[
  {
    "error": {
      "message": "getaddrinfo EAI_AGAIN jobapply-fastapi-production-0990.up.railway.app",
      "name": "Error",
      "stack": "Error: getaddrinfo EAI_AGAIN jobapply-fastapi-production-0990.up.railway.app\n    at Function.AxiosError.from (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/axios/lib/core/AxiosError.js:92:14)\n    at RedirectableRequest.handleRequestError (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/axios/lib/adapters/http.js:620:25)\n    at RedirectableRequest.emit (node:events:536:35)\n    at ClientRequest.eventHandlers.<computed> (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/follow-redirects/index.js:49:24)\n    at ClientRequest.emit (node:events:524:28)\n    at emitErrorEvent (node:_http_client:101:11)\n    at TLSSocket.socketErrorListener (node:_http_client:504:5)\n    at TLSSocket.emit (node:events:524:28)\n    at emitErrorNT (node:internal/streams/destroy:169:8)\n    at emitErrorCloseNT (node:internal/streams/destroy:128:3)\n    at Axios.request (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/axios/lib/core/Axios.js:45:41)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at invokeAxios (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:206:10)\n    at proxyRequestToAxios (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:656:20)\n    at Object.request (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1698:4)",
      "code": "EAI_AGAIN"
    }
  }
]

Information on your n8n setup

  • n8n version: 1.97.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): self-hosted, docker
  • **Operating system: local: windows 11 **

There is an API key, but it is not required for the /health endpoint so this http request should work with or without the API key. I tested it in powershell:

 Write-Host "Testing FastAPI Health Endpoint..." -ForegroundColor Yellow
Testing FastAPI Health Endpoint...
PS C:\Users\aaa\Documents\GitHub\bbb\jobapply\fastapi> Write-Host "URL: $apiUrl" -ForegroundColor Cyan
URL: https://jobapply-fastapi-production-0990.up.railway.app/health
PS C:\Users\aaa\Documents\GitHub\bbb\jobapply\fastapi>
PS C:\Users\aaa\Documents\GitHub\bbb\jobapply\fastapi> try {
>>     # Make the HTTP request
>>     $response = Invoke-RestMethod -Uri $apiUrl -Method GET -ContentType "application/json"
>>
>>     Write-Host "✅ SUCCESS!" -ForegroundColor Green
>>     Write-Host "Response:" -ForegroundColor White
>>     $response | ConvertTo-Json -Depth 5
>>
>> } catch {
>>     Write-Host "❌ FAILED!" -ForegroundColor Red
>>     Write-Host "Error Message: $($_.Exception.Message)" -ForegroundColor Red
>>     Write-Host "Status Code: $($_.Exception.Response.StatusCode)" -ForegroundColor Red
>>     Write-Host "Status Description: $($_.Exception.Response.StatusDescription)" -ForegroundColor Red
>> }


✅ SUCCESS!
Response:
{
    "status":  "healthy",
    "timestamp":  "2025-06-17T08:21:40.935118"
}

This is now resolved. From what I can tell it was an issue on railway’s side with issuing a valid TLS certificate.

So for others here - make sure you have no security warnings on your http request url (and that its using https) for public cases.

1 Like

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