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

An attempt was made to access a socket in a way forbidden by its access permissions. #6555

Closed
R9anSmart opened this issue Aug 31, 2024 · 2 comments

Comments

@R9anSmart
Copy link

R9anSmart commented Aug 31, 2024

OS:
Windows 10 Pro

Error:
Error: loading initial config: loading new config: http app module: start: listening on :80: listen tcp :80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
Error: caddy process exited with error: exit status 1

Details:
Caddy used to work and now is throwing this error on my system. No edits or changes made to the caddyfile or Windows service.
Windows Service errors with: Windows not start the Caddy Server service on
Computer. Error 2: The system cannot find the file

Caddyfile - Redacted.zip

@1m188
Copy link

1m188 commented Oct 9, 2024

I also got the similarly problem, my error infomation is Error: loading initial config: loading new config: starting caddy administration endpoint: listen tcp 127.0.0.1:2019: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

mybe it cause to the windows dynamic tcp port , you can change it , or let caddy admin port in other place, like this:

{
admin 127.0.0.1:5000
}

http://localhost:5001 {

root ./dist

file_server

}

this Caddyfile run correct in my windows 11

@francislavoie
Copy link
Member

Ultimately I don't think there's anything for us to do here. Caddy is just trying to set up network listeners using the typical APIs. We're not Windows experts so we can't really suggest why the OS would decide to block it or not.

Make sure to check Windows Firewall rules, make sure to run as a user which has permission to bind to those ports, etc.

@francislavoie francislavoie closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2024
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

No branches or pull requests

3 participants