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

Liquidsoap + Icecast connection problem #932

Closed
nscpro opened this issue Aug 26, 2019 · 4 comments
Closed

Liquidsoap + Icecast connection problem #932

nscpro opened this issue Aug 26, 2019 · 4 comments
Assignees
Milestone

Comments

@nscpro
Copy link

nscpro commented Aug 26, 2019

interesting issue, i'm using safari browser. if i connect webcaster client over wss:// liquidsoap show me:

2019/08/26 15:37:36 [harbor:4] New client on port 8089: 85.89.38.62
2019/08/26 15:37:36 [harbor:4] Header: Upgrade, value: websocket.
2019/08/26 15:37:36 [harbor:4] Header: Connection, value: Upgrade.
2019/08/26 15:37:36 [harbor:4] Header: Host, value: kommentaator.nsc.ee:8089.
2019/08/26 15:37:36 [harbor:4] Header: Origin, value: https://kommentaator.nsc.ee.
2019/08/26 15:37:36 [harbor:4] Header: Sec-WebSocket-Protocol, value: webcast.
2019/08/26 15:37:36 [harbor:4] Header: Pragma, value: no-cache.
2019/08/26 15:37:36 [harbor:4] Header: Cache-Control, value: no-cache.
2019/08/26 15:37:36 [harbor:4] Header: Sec-WebSocket-Key, value: X9NvIrzSCs7S0V2iKuGCnw==.
2019/08/26 15:37:36 [harbor:4] Header: Sec-WebSocket-Version, value: 13.
2019/08/26 15:37:36 [harbor:4] Header: Sec-WebSocket-Extensions, value: x-webkit-deflate-frame.
2019/08/26 15:37:36 [harbor:4] Header: User-Agent, value: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15.
2019/08/26 15:37:36 [harbor:4] Mime type: audio/mpeg
2019/08/26 15:37:36 [harbor:4] Mount point: /proov
2019/08/26 15:37:36 [harbor:4] Requested username: source, password: hackme.
2019/08/26 15:37:36 [harbor:4] Client logged in.
2019/08/26 15:37:36 [decoder:4] Trying method "WAV" for "audio/mpeg"...
2019/08/26 15:37:36 [decoder:4] Trying method "AIFF" for "audio/mpeg"...
2019/08/26 15:37:36 [decoder:4] Trying method "PCM/BASIC" for "audio/mpeg"...
2019/08/26 15:37:36 [decoder:4] Trying method "RAW AUDIO" for "audio/mpeg"...
2019/08/26 15:37:36 [decoder:4] Trying method "OGG" for "audio/mpeg"...
2019/08/26 15:37:36 [decoder:4] Trying method "MAD" for "audio/mpeg"...
2019/08/26 15:37:36 [decoder:3] Method "MAD" accepted "audio/mpeg".
2019/08/26 15:37:36 [threads:4] Created thread "harbor source feeding" (2 total).
2019/08/26 15:37:36 [input(dot)harbor(dot)ssl_7844:3] Decoding...
2019/08/26 15:37:38 [mount:3] Connecting mount mount for source@kommentaator.nsc.ee...
2019/08/26 15:37:39 [mount:3] Connection setup was successful.
2019/08/26 15:37:39 [fallback_7846:3] Switch to input(dot)harbor(dot)ssl_7844.
2019/08/26 15:37:39 [input(dot)harbor(dot)ssl_7844:4] Activations changed: static=[fallback_7846:mount:mount], dynamic=[fallback_7846:mount:mount].

if i disconnect wss:// streaming log end is that:

2019/08/26 15:41:48 [input(dot)harbor(dot)ssl_7844:4] End of track.
2019/08/26 15:41:48 [input(dot)harbor(dot)ssl_7844:4] Buffer emptied, buffering needed.
2019/08/26 15:41:48 [input(dot)harbor(dot)ssl_7844:4] Activations changed: static=[], dynamic=[fallback_7846:mount:mount].
2019/08/26 15:41:48 [mount:3] Source failed (no more tracks) stopping output...
2019/08/26 15:41:48 [mount:3] Closing connection...

but if i start again connection over wss://, liquidsoap log show:

2019/08/26 15:42:51 [harbor:4] New client on port 8089: 85.89.38.62
2019/08/26 15:42:51 [harbor:4] Header: Upgrade, value: websocket.
2019/08/26 15:42:51 [harbor:4] Header: Connection, value: Upgrade.
2019/08/26 15:42:51 [harbor:4] Header: Host, value: kommentaator.nsc.ee:8089.
2019/08/26 15:42:51 [harbor:4] Header: Origin, value: https://kommentaator.nsc.ee.
2019/08/26 15:42:51 [harbor:4] Header: Sec-WebSocket-Protocol, value: webcast.
2019/08/26 15:42:51 [harbor:4] Header: Pragma, value: no-cache.
2019/08/26 15:42:51 [harbor:4] Header: Cache-Control, value: no-cache.
2019/08/26 15:42:51 [harbor:4] Header: Sec-WebSocket-Key, value: tkFNVvYl3Y+3LPTarH1Jog==.
2019/08/26 15:42:51 [harbor:4] Header: Sec-WebSocket-Version, value: 13.
2019/08/26 15:42:51 [harbor:4] Header: Sec-WebSocket-Extensions, value: x-webkit-deflate-frame.
2019/08/26 15:42:51 [harbor:4] Header: User-Agent, value: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15.
2019/08/26 15:42:51 [harbor:4] Mime type: audio/mpeg
2019/08/26 15:42:51 [harbor:4] Mount point: /proov
2019/08/26 15:42:51 [harbor:4] Requested username: source, password: hackme.
2019/08/26 15:42:51 [harbor:4] Client logged in.
2019/08/26 15:42:51 [harbor:4] Harbor.Make(T).Mount_taken

and icecast server not showing mountpoint. If i disconnect wss:// and connect again, nothing change, other lines not coming

@toots
Copy link
Member

toots commented Aug 27, 2019

Thanks for this report. I'll look at it asap.

@toots toots closed this as completed in b909a79 Aug 28, 2019
@toots
Copy link
Member

toots commented Aug 28, 2019

Ok, this is now fixed, thanks for reporting! SSL socket was taking too long to timeout on read operations after the client had disconnected. I just set a timeout of 0.1s by default.

BTW, it looks like chrome is accepting connections on localhost over non-SSL websocket for testing..

@nscpro
Copy link
Author

nscpro commented Aug 28, 2019

Okay, do I need to upgrade or do something to get this upgrade going?

@smimram smimram added this to the 1.4.0 milestone Aug 28, 2019
@toots
Copy link
Member

toots commented Aug 30, 2019

Hey! I'm partially reverting this to not set any timeout by default. A bit nervous to change the default behavior just yet. However, you should still have a configuration key to set the timeout too.

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