Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

ERROR mas_listener::server: error shutting down connection: Socket not connected (os error 107) #1835

Closed
jacotec opened this issue Sep 22, 2023 · 5 comments

Comments

@jacotec
Copy link

jacotec commented Sep 22, 2023

I've configured the MAS exactly following the documentation, found the "metrics" issue here and changed "none" to "prometheus", so MAS starts. But always shortly after the start, I'm getting repeated error messages:

2023-09-22T12:18:06.012090Z  INFO cli.run.init: mas_cli::commands::server: Starting task worker worker_name="7lvKv8JSRD"
2023-09-22T12:18:06.076241Z  INFO cli.run.init: mas_cli::commands::server: Listening on http://[::]:8082 with resources [Discovery, Human, OAuth, Compat, GraphQL { playground: true }, Assets { path: "./share/assets/" }]
2023-09-22T12:18:06.079178Z  INFO cli.run.init: mas_cli::commands::server: Listening on http://[::]:8083 with resources [Health]
2023-09-22T12:18:15.781569Z ERROR mas_listener::server: error shutting down connection: Socket not connected (os error 107)
2023-09-22T12:18:25.785975Z ERROR mas_listener::server: error shutting down connection: Socket not connected (os error 107)
2023-09-22T12:18:35.787174Z ERROR mas_listener::server: error shutting down connection: Socket not connected (os error 107)
2023-09-22T12:18:45.788918Z ERROR mas_listener::server: error shutting down connection: Socket not connected (os error 107)

The ports 8082 and 8083 (8080 and 8081 are already used by bridges) are free, and after starting MAS I see that 8082 and 8083 are happily used as listeners from MAS.

So I have no clue what these error messages want to tell me.

Also, when opening Element-Web I'm always getting:

Es gab ein Problem bei der Kommunikation mit dem Heim-Server. Bitte versuche es später erneut.(M_UNRECOGNIZED)

But I guess as long as the errors above are showing up, MAS is not working properly.

Either there is an issue, or something is still undocumented ...

@sandhose
Copy link
Member

This should probably be clearer in the documentation, but in the section about setting up a reverse proxy in front of it, it mentions that a few Matrix C-S API should be handled by MAS

See the last paragraph here: https://matrix-org.github.io/matrix-authentication-service/setup/reverse-proxy.html#example-nginx-configuration

The errors spitting out are I think unrelated, but something I need to investigate

@jacotec
Copy link
Author

jacotec commented Sep 22, 2023

@sandhose I have a proxy in front, my HAProxy. But no relation to this error, if MAS does not run there's nothing to proxy ;-)

@sandhose
Copy link
Member

sandhose commented Sep 22, 2023

My point is, in your setup, /_matrix/client/v3/login (and a few other endpoints) should not be handled by Synapse, they should be handled by MAS.
This is a requirement for "legacy" (non-OIDC-native clients including Element Web) to work with MAS

@jacotec
Copy link
Author

jacotec commented Sep 28, 2023

@sandhose Indeed the passing of the endpoints to MAS was missing, MAS is now called and the registration / authentication flow looked good up to a point where I grant the permissions for the Element-Web client. Then ... #1864

BTW: Where can I find how to configure my Keycloak as upstream OIDC provider for MAS? Looked several time through the docs, but it's not mentioned in the config section ...

@sandhose
Copy link
Member

I think I captured most of the issues you had in other issues?

And I think the logs you had were mostly resolved by #1814 and #1775

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

No branches or pull requests

2 participants