matrix-org / matrix-authentication-service

OAuth2.0 + OpenID Provider for Matrix Homeservers
https://matrix-org.github.io/matrix-authentication-service/
Apache License 2.0
111 stars 32 forks source link

Unix socket listener cannot bind on restart #2424

Open AndrewFerr opened 7 months ago

AndrewFerr commented 7 months ago

System: Fedora Linux 39 (Workstation Edition)

When using a Unix socket as a listener (via a config of http.listeners[*].binds.socket), the socket file is not deleted when MAS is shut down. This prevents MAS from starting up again later with an error of:

Error: could not bind socket

Caused by:
    Address already in use (os error 98)

Only when I manually delete the socket file can MAS be started again.

Perhaps relevant: when created, the socket file has file mode bits of 0755 (user read-write, group/others read-only).

matrixbot commented 1 month ago

For your information, this issue has been copied over to the Element fork of matrix-authentication-service: https://github.com/element-hq/matrix-authentication-service/issues/2424