Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getCacheEntry - failed with error: connect ECONNREFUSED ::1:8080 #5

Closed
michalcs opened this issue Mar 19, 2023 · 4 comments · Fixed by #8
Closed

getCacheEntry - failed with error: connect ECONNREFUSED ::1:8080 #5

michalcs opened this issue Mar 19, 2023 · 4 comments · Fixed by #8

Comments

@michalcs
Copy link

Hey

Following up from a thread in the nektos/act repo. At least a couple of us are experiencing an issue where the localhost server rejects to connect.

I'm on macOS and launching the cache server with:

ACT_CACHE_AUTH_KEY=1234 docker compose up --build

Then act with:

act -j lint -W .github/workflows/test.yml \
  	--env ACTIONS_CACHE_URL=http://localhost:8080/ \
	--env ACTIONS_RUNTIME_URL=http://localhost:8080/ \
	--env ACTIONS_RUNTIME_TOKEN=1234

And it yields this error:

::***::Resource Url: http://***:8080/_apis/artifactcache/cache?keys=Linux-yarn-e8943332524d13b75456a47ad703d0a691233a8b9b4b9a8f7146be54228fb5a2%252CLinux-yarn-&version=84d7b02a61d0b31f347fcddab445d98204dc22e7f42a4366ff8a82ec6de1ae78
[ci/test]   ❓  ::***::getCacheEntry - Attempt 1 of 2 failed with error: connect ECONNREFUSED ::1:8080
[ci/test]   💬  ::***::Resource Url: http://***:8080/_apis/artifactcache/cache?keys=Linux-yarn-e8943332524d13b75456a47ad703d0a691233a8b9b4b9a8f7146be54228fb5a2%252CLinux-yarn-&version=84d7b02a61d0b31f347fcddab445d98204dc22e7f42a4366ff8a82ec6de1ae78
[ci/test]   ❓  ::***::getCacheEntry - Attempt 2 of 2 failed with error: connect ECONNREFUSED ::1:8080
[ci/test]   ❓  ::warning::Failed to restore: getCacheEntry failed: connect ECONNREFUSED ::1:8080

Any ideas? 🙏

I've tried all sorts of different ways to initialise the env variables but it's always the same 🤷

@sp-ricard-valverde
Copy link
Owner

sp-ricard-valverde commented Mar 20, 2023

Sorry I have no idea as I'm not actively using the server anymore.
I would try with a different port configuration(other than 8080, you can configure it in the docker-compose file), or a previous cache action version or nekos-act version in case something relevant changed as they are known to work previously.

@sp-ricard-valverde
Copy link
Owner

I've dug a little bit into it:
https://stackoverflow.com/questions/15227154/inexplicable-node-js-http-throwing-connect-econnrefused-ipv6
I suspect that the cache server is binding to ipv4 while nekos-act is trying to access ipv6.
I would try to replace localhost for 127.0.0.1 in the ACTIONS_ env vars to enforce ipv4 in nekos-act.

@michalcs
Copy link
Author

I would try to replace localhost for 127.0.0.1 in the ACTIONS_ env vars to enforce ipv4 in nekos-act.

This worked perfectly. Awesome. Thank you 🙌

@melMass
Copy link

melMass commented Nov 18, 2023

@sp-ricard-valverde Thanks a lot for this project! I would either link this issue or just use 127.0.0.1 in the readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants