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

Connection lost after a few minutes #78

Open
pp7En opened this issue Feb 15, 2025 · 2 comments
Open

Connection lost after a few minutes #78

pp7En opened this issue Feb 15, 2025 · 2 comments

Comments

@pp7En
Copy link

pp7En commented Feb 15, 2025

Mollysocket loses the connection after few minutes.

The ping test always works:

root@ec321035126d:/data# mollysocket connection ping f8b5e891-5762-4425-b3dc-a0783f7e5bca
[2025-02-15T08:43:13Z DEBUG mollysocket::cli] env_logger initialized
[2025-02-15T08:43:13Z INFO  mollysocket::config] Config file: /opt/mollysocket/prod.toml
[2025-02-15T08:43:14Z INFO  mollysocket::vapid] VAPID public key: "..."
[2025-02-15T08:43:14Z DEBUG reqwest::connect] starting new connection: https://ntfy.mydomain.com/
root@ec321035126d:/data# mollysocket connection ping f8b5e891-5762-4425-b3dc-a0783f7e5bca
[2025-02-15T11:01:12Z DEBUG mollysocket::cli] env_logger initialized
[2025-02-15T11:01:12Z INFO  mollysocket::config] Config file: /opt/mollysocket/prod.toml
[2025-02-15T11:01:12Z INFO  mollysocket::vapid] VAPID public key: "..."
[2025-02-15T11:01:12Z DEBUG reqwest::connect] starting new connection: https://ntfy.mydomain.com/
root@ec321035126d:/data# mollysocket connection ping f8b5e891-5762-4425-b3dc-a0783f7e5bca
[2025-02-15T11:30:28Z DEBUG mollysocket::cli] env_logger initialized
[2025-02-15T11:30:28Z INFO  mollysocket::config] Config file: /opt/mollysocket/prod.toml
[2025-02-15T11:30:28Z INFO  mollysocket::vapid] VAPID public key: "..."
[2025-02-15T11:30:28Z DEBUG reqwest::connect] starting new connection: https://ntfy.mydomain.com/

Log (complete log file attached)

[2025-02-15T07:00:54Z DEBUG mollysocket::ws::websocket_connection] Sending Keepalive
[2025-02-15T07:00:54Z DEBUG mollysocket::ws::websocket_connection] send_keepalive
[2025-02-15T07:00:54Z DEBUG mollysocket::ws::websocket_connection] New message
[2025-02-15T07:00:54Z DEBUG mollysocket::ws::signalwebsocket] New response
[2025-02-15T07:00:59Z DEBUG tungstenite::protocol] Received close frame: Some(CloseFrame { code: Library(4409), reason: Utf8Bytes(b"Connected elsewhere") })
[2025-02-15T07:00:59Z DEBUG tungstenite::protocol] Replying to close with Frame { header: FrameHeader { is_final: true, rsv1: false, rsv2: false, rsv3: false, opcode: Control(Close), mask: None }, payload: b"\x119Connected elsewhere" }
[2025-02-15T07:00:59Z DEBUG mollysocket::ws::websocket_connection] New message
[2025-02-15T07:00:59Z ERROR mollysocket::ws::websocket_connection] Failed to decode protobuf: failed to decode Protobuf message: invalid wire type value: 7
[2025-02-15T07:00:59Z WARN  mollysocket::ws::websocket_connection] Websocket finished
[2025-02-15T07:00:59Z INFO  mollysocket::ws::signalwebsocket] Retrying to connect in 10 secondes.
[2025-02-15T07:01:09Z DEBUG tungstenite::handshake::client] Client handshake done.
[2025-02-15T07:01:09Z INFO  mollysocket::ws::websocket_connection] WebSocket handshake has been successfully completed
[2025-02-15T07:01:09Z DEBUG mollysocket::ws::websocket_connection] New message
[2025-02-15T07:01:09Z DEBUG mollysocket::ws::signalwebsocket] New request
...
[2025-02-15T11:11:34Z DEBUG tungstenite::handshake::client] Client handshake done.
[2025-02-15T11:11:34Z INFO  mollysocket::ws::websocket_connection] WebSocket handshake has been successfully completed
[2025-02-15T11:11:34Z DEBUG mollysocket::ws::websocket_connection] New message
[2025-02-15T11:11:34Z DEBUG mollysocket::ws::signalwebsocket] New request
[2025-02-15T11:11:45Z DEBUG tungstenite::protocol] Received close frame: Some(CloseFrame { code: Library(4409), reason: Utf8Bytes(b"Connected elsewhere") })
[2025-02-15T11:11:45Z DEBUG tungstenite::protocol] Replying to close with Frame { header: FrameHeader { is_final: true, rsv1: false, rsv2: false, rsv3: false, opcode: Control(Close), mask: None }, payload: b"\x119Connected elsewhere" }
[2025-02-15T11:11:45Z DEBUG mollysocket::ws::websocket_connection] New message
[2025-02-15T11:11:45Z ERROR mollysocket::ws::websocket_connection] Failed to decode protobuf: failed to decode Protobuf message: invalid wire type value: 7
[2025-02-15T11:11:45Z WARN  mollysocket::ws::websocket_connection] Websocket finished
[2025-02-15T11:11:45Z INFO  mollysocket::ws::signalwebsocket] Retrying to connect in 540 secondes.
  • mollysocket 1.6.0
  • Molly v7.32.2-1-FOSS
  • ntfy 2.11.0

log.txt

@pp7En
Copy link
Author

pp7En commented Feb 16, 2025

If I use the binary directly and my own docker container with debian:12-slim, the connection seems to be more stable (see log_2.txt).

Could the problem only occur in air gapped mode and with this image ghcr.io/mollyim/mollysocket?

log_2.txt


Update: These connection problems then occur again. More often when Alpine is used as basis docker image. With v1.5.6 it works since a few hours without any errors.

@p1gp1g
Copy link
Member

p1gp1g commented Feb 20, 2025

It looks like you are running 2 instances of mollysocket: Some(CloseFrame { code: Library(4409), reason: Utf8Bytes(b"Connected elsewhere") })

Other users had this issue because they were running the binary and the container in the same time

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

No branches or pull requests

2 participants