Locally, the n8n service forwards its port properly, but in GitHub Actions the HTTP API is unreachable. For example, try:
curl --fail http://127.0.0.1:6000/api/check || exit 2
What could explain this discrepancy?
Locally, the n8n service forwards its port properly, but in GitHub Actions the HTTP API is unreachable. For example, try:
curl --fail http://127.0.0.1:6000/api/check || exit 2
What could explain this discrepancy?
hey, seems like a timing issue: the container might not be fully ready when your curl runs. also look into using 0.0.0.0 for binding. try adding a slight delay to see if it checks out.
Based on my experience, a common issue relates to differences in how containers are networked in CI environments versus local setups. The container may be listening on a different interface than expected inside GitHub Actions. Binding to 0.0.0.0 rather than 127.0.0.1 can help since it allows external connections within the container’s network namespace. It is also advisable to check the container’s startup logs to confirm that the service is fully operational before executing the curl command. Adjusting these settings often resolves the discrepancy observed in port forwarding behavior.
In my experience, this problem can also be due to network configuration differences between local setups and GitHub Actions, where the container runtime sometimes does not expose the ports as expected, or binds to localhost only. I once encountered a similar issue and resolved it by specifically setting the binding to listen on all network interfaces and adding explicit wait commands to ensure the service was fully initialized. Logging the container’s network configuration further helped in diagnosing the issue.
hey, i hit this issue too. it turned out that github actions used a different networking setup. you might need to double check your container network config and try binding to 0.0.0.0. a brief wait or re-init the net bridge helped in my case.