{"action":"created","issue":{"url":"https://api.github.com/repos/declension/squeeze-alexa/issues/52","repository_url":"https://api.github.com/repos/declension/squeeze-alexa","labels_url":"https://api.github.com/repos/declension/squeeze-alexa/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/declension/squeeze-alexa/issues/52/comments","events_url":"https://api.github.com/repos/declension/squeeze-alexa/issues/52/events","html_url":"https://github.com/declension/squeeze-alexa/issues/52","id":325172230,"node_id":"MDU6SXNzdWUzMjUxNzIyMzA=","number":52,"title":"CLI closes connection - too many connections open","user":{"login":"crmbls","id":39514057,"node_id":"MDQ6VXNlcjM5NTE0MDU3","avatar_url":"https://avatars3.githubusercontent.com/u/39514057?v=4","gravatar_id":"","url":"https://api.github.com/users/crmbls","html_url":"https://github.com/crmbls","followers_url":"https://api.github.com/users/crmbls/followers","following_url":"https://api.github.com/users/crmbls/following{/other_user}","gists_url":"https://api.github.com/users/crmbls/gists{/gist_id}","starred_url":"https://api.github.com/users/crmbls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crmbls/subscriptions","organizations_url":"https://api.github.com/users/crmbls/orgs","repos_url":"https://api.github.com/users/crmbls/repos","events_url":"https://api.github.com/users/crmbls/events{/privacy}","received_events_url":"https://api.github.com/users/crmbls/received_events","type":"User","site_admin":false},"labels":[{"id":512200103,"node_id":"MDU6TGFiZWw1MTIyMDAxMDM=","url":"https://api.github.com/repos/declension/squeeze-alexa/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-05-22T07:31:41Z","updated_at":"2018-12-29T09:37:18Z","closed_at":null,"author_association":"NONE","body":"The server refuses any connection maybe due to too many exceptions before. It seems that only LMS restart fixes the problem. \r\nServer log:\r\n_Slim::Plugin::CLI::Plugin::cli_socket_accept (239) Warning: Closing connection: too many connections open! (30)_\r\nLMS Version : 7.5.1-30836\r\n\r\nLambda log:\r\n_Connecting to port 19090 on xxxxx.xxxx.xxx\r\nValidated cert for {'commonName': u'xxxxx.xxxx.xxx'}\r\nNo further response from Squeezebox server at xxxxx.xxxx.xxx:19090. Login problem?: SqueezeboxException\r\nTraceback (most recent call last):\r\nFile \"/var/task/handler.py\", line 37, in lambda_handler\r\nraise e\r\nSqueezeboxException: No further response from Squeezebox server at xxxxx.xxxx.xxx:19090. Login problem?_"},"comment":{"url":"https://api.github.com/repos/declension/squeeze-alexa/issues/comments/450479568","html_url":"https://github.com/declension/squeeze-alexa/issues/52#issuecomment-450479568","issue_url":"https://api.github.com/repos/declension/squeeze-alexa/issues/52","id":450479568,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDQ3OTU2OA==","user":{"login":"rnlgreen","id":34414575,"node_id":"MDQ6VXNlcjM0NDE0NTc1","avatar_url":"https://avatars2.githubusercontent.com/u/34414575?v=4","gravatar_id":"","url":"https://api.github.com/users/rnlgreen","html_url":"https://github.com/rnlgreen","followers_url":"https://api.github.com/users/rnlgreen/followers","following_url":"https://api.github.com/users/rnlgreen/following{/other_user}","gists_url":"https://api.github.com/users/rnlgreen/gists{/gist_id}","starred_url":"https://api.github.com/users/rnlgreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnlgreen/subscriptions","organizations_url":"https://api.github.com/users/rnlgreen/orgs","repos_url":"https://api.github.com/users/rnlgreen/repos","events_url":"https://api.github.com/users/rnlgreen/events{/privacy}","received_events_url":"https://api.github.com/users/rnlgreen/received_events","type":"User","site_admin":false},"created_at":"2018-12-29T09:37:18Z","updated_at":"2018-12-29T09:37:18Z","author_association":"NONE","body":"If it helps, and sorry for the long post... I added some logging to record the AWS side socket details at connect and disconnect, then watched the sockets on my Synology NAS.  \r\n\r\nHere's an extract from a CloudWatch log; I was using Alexa development console to send Alexa commands at the time.\r\n\r\n>08:15:23 START RequestId: e3062003-0b41-11e9-8c38-2f1b593c5445 Version: $LATEST \r\n08:15:23 Creating new server instance \r\n08:15:23 Defaulting to SSL transport \r\n08:15:23 Connecting to port 19090 on myurl.com \r\n08:15:23 Validated cert for {'commonName': 'myurl.com'} \r\n08:15:23 Local IP: 169.254.76.5, Local port: 35384 \r\n08:15:23 Refreshing server and player statuses... \r\n08:15:23 Found 2 connected player(s): ['SB-Playroom', 'SB-Lounge'] \r\n08:15:23 Current player is now: SB-Playroom [ff:01] \r\n08:15:23 Session amzn1.echo-api.session.8ee949f9-659c-4ca2-bc16-a9beacbfcb66 ended \r\n08:15:23 Returning {'outputSpeech': {'type': 'PlainText', 'text': 'Hasta la vista. Baby.'}, 'shouldEndSession': True, 'card': {'type': 'Simple', 'title': 'Session Ended', 'content': 'Hasta la vista. Baby.'}} \r\n08:15:23 END RequestId: e3062003-0b41-11e9-8c38-2f1b593c5445 \r\n08:15:23 REPORT RequestId: e3062003-0b41-11e9-8c38-2f1b593c5445 Duration: 491.85 ms Billed Duration: 500 ms Memory Size: 128 MB Max Memory Used: 29 MB \r\n08:15:23 START RequestId: e3ff9b30-0b41-11e9-9c96-eb7796eae224 Version: $LATEST \r\n08:15:23 Age of instance: 0.1s \r\n08:15:23 Reusing cached instance Squeezebox server over myurl.com:19090 over SSL \r\n08:15:23 Starting new session amzn1.echo-api.session.a91523f5-b3d2-4443-a1ef-17c67bdd3a5b for request amzn1.echo-api.request.cdb81e1c-e108-411f-aa42-113f9b7c2774 \r\n08:15:23 ('SB-Playroom', 95) was the best guess for 'playroom' from dict_keys(['SB-Playroom', 'SB-Lounge']) \r\n08:15:23 Received PlayPlaylistIntent: {'name': 'PlayPlaylistIntent', 'confirmationStatus': 'NONE', 'slots': {'Playlist': {'name': 'Playlist', 'value': 'Christmas', 'resolutions': {'resolutionsPerAuthority': [{'authority': 'amzn1.er-authority.echo-sdk.amzn1.ask.skill.6d82bf02-5050-42a3-bb2b-e04ff8f004cf.PLAYLIST', 'status': {'code': 'ER_SUCCESS_MATCH'}, 'values': [{'value': {'name': 'Christmas', 'id': '81b6\r\n08:15:23 Extracted playlist slot: Christmas \r\n08:15:24 Loaded 45 LMS playlists (e.g. \"I Wish\") \r\n08:15:24 ('Christmas', 100) was the best guess for 'Christmas' from ['00 s Music', '10 s Music', '60 s Music', '70 s Music', '80 s Music', '90 s Music', \"Absolute 80's\", 'Aqualung', 'BBC Radio 4 - Friday Night Comedy from BBC Radio 4', 'Burning Down the House', 'The Carol Album Seven centuries of Christmas music', 'Chris s Mix', 'Christmas', 'Christmas Collections', 'Christmas Lite', 'Classical', 'Classica\r\n08:15:24 END RequestId: e3ff9b30-0b41-11e9-9c96-eb7796eae224 \r\n08:15:24 REPORT RequestId: e3ff9b30-0b41-11e9-9c96-eb7796eae224 Duration: 872.30 ms Billed Duration: 900 ms Memory Size: 128 MB Max Memory Used: 29 MB \r\n08:16:56 START RequestId: 1b54a585-0b42-11e9-8cf1-b795c179d06e Version: $LATEST \r\n08:16:56 Age of instance: 92.9s \r\n08:16:56 Reusing cached instance Squeezebox server over myurl.com:19090 over SSL \r\n08:16:56 Starting new session amzn1.echo-api.session.0ada4b7a-6181-473a-ae75-ebc56aa69b63 for request amzn1.echo-api.request.49f0e0e1-badf-466f-a14f-3280903cc423 \r\n08:16:56 ('SB-Playroom', 95) was the best guess for 'playroom' from dict_keys(['SB-Playroom', 'SB-Lounge']) \r\n08:16:56 Received IncreaseVolumeIntent: {'name': 'IncreaseVolumeIntent', 'confirmationStatus': 'NONE', 'slots': {'Player': {'name': 'Player', 'value': 'playroom', 'resolutions': {'resolutionsPerAuthority': [{'authority': 'amzn1.er-authority.echo-sdk.amzn1.ask.skill.6d82bf02-5050-42a3-bb2b-e04ff8f004cf.PLAYER', 'status': {'code': 'ER_SUCCESS_MATCH'}, 'values': [{'value': {'name': 'Playroom', 'id': '5b00ccb0\r\n08:16:56 END RequestId: 1b54a585-0b42-11e9-8cf1-b795c179d06e \r\n08:16:56 REPORT RequestId: 1b54a585-0b42-11e9-8cf1-b795c179d06e Duration: 1.74 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 29 MB \r\n08:17:36 START RequestId: 331b6059-0b42-11e9-809c-755a705a8cc6 Version: $LATEST \r\n08:17:36 Age of instance: 132.8s \r\n08:17:36 Reusing cached instance Squeezebox server over myurl.com:19090 over SSL \r\n08:17:36 Starting new session amzn1.echo-api.session.f5c3393f-0157-45df-9e7c-7062c2686b2b for request amzn1.echo-api.request.f2b4dee6-0be8-43e4-a401-53f9a28afcc0 \r\n08:17:36 ('SB-Playroom', 95) was the best guess for 'playroom' from dict_keys(['SB-Playroom', 'SB-Lounge']) \r\n08:17:36 Received IncreaseVolumeIntent: {'name': 'IncreaseVolumeIntent', 'confirmationStatus': 'NONE', 'slots': {'Player': {'name': 'Player', 'value': 'playroom', 'resolutions': {'resolutionsPerAuthority': [{'authority': 'amzn1.er-authority.echo-sdk.amzn1.ask.skill.6d82bf02-5050-42a3-bb2b-e04ff8f004cf.PLAYER', 'status': {'code': 'ER_SUCCESS_MATCH'}, 'values': [{'value': {'name': 'Playroom', 'id': '5b00ccb0\r\n08:17:36 END RequestId: 331b6059-0b42-11e9-809c-755a705a8cc6 \r\n08:17:36 REPORT RequestId: 331b6059-0b42-11e9-809c-755a705a8cc6 Duration: 1.51 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 29 MB \r\n08:30:19 START RequestId: f9f1d2ab-0b43-11e9-8f5e-a5be6b39863b Version: $LATEST \r\n08:30:19 Age of instance: 895.9s\r\n08:30:19 Killing stale server instance... \r\n08:30:19 Goodbye from <squeezealexa.squeezebox.server.Server object at 0x7ff2ed0f99b0> \r\n08:30:19 Closing myurl.com:19090 over SSL \r\n08:30:19 Local IP: 169.254.76.5, Local port: 35384 \r\n08:30:19 Creating new server instance \r\n08:30:19 Defaulting to SSL transport \r\n08:30:19 Connecting to port 19090 on myurl.com \r\n08:30:20 Validated cert for {'commonName': 'myurl.com'} \r\n08:30:20 Local IP: 169.254.76.5, Local port: 35502 \r\n08:30:20 Refreshing server and player statuses... \r\n08:30:20 Found 2 connected player(s): ['SB-Playroom', 'SB-Lounge'] \r\n08:30:20 Current player is now: SB-Playroom [ff:01] \r\n08:30:20 Goodbye from <squeezealexa.squeezebox.server.Server object at 0x7ff2ed0f99b0> \r\n08:30:20 Closing myurl.com:19090 over SSL \r\n08:30:20 Local IP: 169.254.76.5, Local port: 35384 \r\n08:30:20 Closing myurl.com:19090 over SSL \r\n08:30:20 Local IP: 169.254.76.5, Local port: 35384 \r\n08:30:20 Starting new session amzn1.echo-api.session.4d91f956-96a2-4bf8-a814-bd38f57c9e58 for request amzn1.echo-api.request.04617f0f-bae9-4051-a7b2-e66165910537 \r\n08:30:20 Received AMAZON.FallbackIntent: {'name': 'AMAZON.FallbackIntent', 'confirmationStatus': 'NONE'} (for player 00:04:20:ff:ff:01) \r\n08:30:20 END RequestId: f9f1d2ab-0b43-11e9-8f5e-a5be6b39863b \r\n08:30:20 REPORT RequestId: f9f1d2ab-0b43-11e9-8f5e-a5be6b39863b Duration: 955.64 ms Billed Duration: 1000 ms Memory Size: 128 MB Max Memory Used: 29 MB \r\n08:33:29 START RequestId: 6b3a388a-0b44-11e9-babd-358f20c2d1d7 Version: $LATEST \r\n08:33:29 Age of instance: 189.1s \r\n08:33:29 Reusing cached instance Squeezebox server over myurl.com:19090 over SSL \r\n08:33:29 Starting new session amzn1.echo-api.session.c8270aca-cd5a-49df-94ee-5ed0346a23d5 for request amzn1.echo-api.request.8b1bfb22-4784-4a66-94a1-2031050c7669 \r\n08:33:29 Received AMAZON.NextIntent: {'name': 'AMAZON.NextIntent', 'confirmationStatus': 'NONE'} (for player 00:04:20:ff:ff:01) \r\n08:33:29 END RequestId: 6b3a388a-0b44-11e9-babd-358f20c2d1d7 \r\n08:33:29 REPORT RequestId: 6b3a388a-0b44-11e9-babd-358f20c2d1d7 Duration: 212.06 ms Billed Duration: 300 ms Memory Size: 128 MB Max Memory Used: 29 MB \r\n08:33:41 START RequestId: 72217ee7-0b44-11e9-91c6-85f935c9637c Version: $LATEST \r\n08:33:41 Age of instance: 200.7s \r\n08:33:41 Reusing cached instance Squeezebox server over myurl.com:19090 over SSL \r\n08:33:41 Starting new session amzn1.echo-api.session.d73a6607-796e-4cc6-83e3-a49692e00259 for request amzn1.echo-api.request.95884198-86f0-4ed8-ba1e-61f03477b7ed \r\n08:33:41 Received AMAZON.NextIntent: {'name': 'AMAZON.NextIntent', 'confirmationStatus': 'NONE'} (for player 00:04:20:ff:ff:01) \r\n08:33:41 END RequestId: 72217ee7-0b44-11e9-91c6-85f935c9637c \r\n08:33:41 REPORT RequestId: 72217ee7-0b44-11e9-91c6-85f935c9637c Duration: 185.09 ms Billed Duration: 200 ms Memory Size: 128 MB Max Memory Used: 29 MB \r\n08:49:09 START RequestId: 9bae04db-0b46-11e9-85e9-e122d30a1b4a Version: $LATEST \r\n08:49:09 Age of instance: 1129.4s \r\n08:49:09 Killing stale server instance... \r\n08:49:09 Goodbye from <squeezealexa.squeezebox.server.Server object at 0x7ff2ed0f95c0> \r\n08:49:09 Closing myurl.com:19090 over SSL \r\n08:49:09 Local IP: 169.254.76.5, Local port: 35502 \r\n08:49:09 Creating new server instance \r\n08:49:09 Defaulting to SSL transport \r\n08:49:09 Connecting to port 19090 on myurl.com \r\n08:49:10 Validated cert for {'commonName': 'myurl.com'} \r\n08:49:10 Local IP: 169.254.76.5, Local port: 35654 \r\n08:49:10 Refreshing server and player statuses... \r\n08:49:10 Found 2 connected player(s): ['SB-Playroom', 'SB-Lounge'] \r\n08:49:10 Current player is now: SB-Playroom [ff:01] \r\n08:49:10 Goodbye from <squeezealexa.squeezebox.server.Server object at 0x7ff2ed0f95c0> \r\n08:49:10 Closing myurl.com:19090 over SSL \r\n08:49:10 Local IP: 169.254.76.5, Local port: 35502 \r\n08:49:10 Closing myurl.com:19090 over SSL \r\n08:49:10 Local IP: 169.254.76.5, Local port: 35502 \r\n08:49:10 Starting new session amzn1.echo-api.session.3e6644b5-f3d3-4048-a075-4bbd82999ed0 for request amzn1.echo-api.request.3ce0f748-de2e-48a2-9aa5-86cb913572a3 \r\n08:49:10 Received AMAZON.NextIntent: {'name': 'AMAZON.NextIntent', 'confirmationStatus': 'NONE'} (for player 00:04:20:ff:ff:01) \r\n08:49:12 END RequestId: 9bae04db-0b46-11e9-85e9-e122d30a1b4a \r\n08:49:12 REPORT RequestId: 9bae04db-0b46-11e9-85e9-e122d30a1b4a Duration: 2142.37 ms Billed Duration: 2200 ms Memory Size: 128 MB Max Memory Used: 29 MB \r\n08:53:51 START RequestId: 438abca0-0b47-11e9-9007-4b7daec09a3d Version: $LATEST \r\n08:53:51 Age of instance: 280.7s \r\n08:53:51 Reusing cached instance Squeezebox server over myurl.com:19090 over SSL \r\n08:53:51 Starting new session amzn1.echo-api.session.91a624b4-d7c3-4f4a-949f-52aed746bb11 for request amzn1.echo-api.request.e6136abe-0588-4809-9407-76b217a6be8a \r\n08:53:51 Received AMAZON.NextIntent: {'name': 'AMAZON.NextIntent', 'confirmationStatus': 'NONE'} (for player 00:04:20:ff:ff:01) \r\n08:53:51 END RequestId: 438abca0-0b47-11e9-9007-4b7daec09a3d \r\n08:53:51 REPORT RequestId: 438abca0-0b47-11e9-9007-4b7daec09a3d Duration: 282.04 ms Billed Duration: 300 ms Memory Size: 128 MB Max Memory Used: 29 MB \r\n08:54:39 START RequestId: 60304419-0b47-11e9-803c-f5dbd238916c Version: $LATEST \r\n08:54:39 Age of instance: 328.8s \r\n08:54:39 Reusing cached instance Squeezebox server over myurl.com:19090 over SSL \r\n08:54:39 Starting new session amzn1.echo-api.session.439814b4-924d-492e-b97d-a03e2d1b0a1e for request amzn1.echo-api.request.82995bc7-593a-4fef-950f-ed6636d1f7ea \r\n08:54:39 Received AMAZON.NextIntent: {'name': 'AMAZON.NextIntent', 'confirmationStatus': 'NONE'} (for player 00:04:20:ff:ff:01) \r\n08:54:39 END RequestId: 60304419-0b47-11e9-803c-f5dbd238916c \r\n08:54:39 REPORT RequestId: 60304419-0b47-11e9-803c-f5dbd238916c Duration: 254.39 ms Billed Duration: 300 ms Memory Size: 128 MB Max Memory Used: 29 MB \r\n09:10:59 START RequestId: a80be227-0b49-11e9-8525-39be65366cb5 Version: $LATEST \r\n09:10:59 Age of instance: 1308.3s \r\n09:10:59 Killing stale server instance... \r\n09:10:59 Goodbye from <squeezealexa.squeezebox.server.Server object at 0x7ff2ed0f9cc0> \r\n09:10:59 Closing myurl.com:19090 over SSL \r\n09:10:59 Local IP: 169.254.76.5, Local port: 35654 \r\n09:10:59 Creating new server instance \r\n09:10:59 Defaulting to SSL transport \r\n09:10:59 Connecting to port 19090 on myurl.com \r\n09:10:59 Validated cert for {'commonName': 'myurl.com'} \r\n09:10:59 Local IP: 169.254.76.5, Local port: 35794 \r\n09:10:59 Refreshing server and player statuses... \r\n09:10:59 Found 2 connected player(s): ['SB-Playroom', 'SB-Lounge'] \r\n09:10:59 Current player is now: SB-Playroom [ff:01] \r\n09:10:59 Goodbye from <squeezealexa.squeezebox.server.Server object at 0x7ff2ed0f9cc0> \r\n09:10:59 Closing myurl.com:19090 over SSL \r\n09:10:59 Local IP: 169.254.76.5, Local port: 35654 \r\n09:10:59 Closing myurl.com:19090 over SSL \r\n09:10:59 Local IP: 169.254.76.5, Local port: 35654 \r\n09:10:59 Starting new session amzn1.echo-api.session.8cf81651-2e33-41e2-b5a1-9dfd3201b9d8 for request amzn1.echo-api.request.b10fba28-c43f-45fc-b822-0f21c540af82 \r\n09:10:59 Received AMAZON.PauseIntent: {'name': 'AMAZON.PauseIntent', 'confirmationStatus': 'NONE'} (for player 00:04:20:ff:ff:01) \r\n09:11:00 END RequestId: a80be227-0b49-11e9-8525-39be65366cb5 \r\n09:11:00 REPORT RequestId: a80be227-0b49-11e9-8525-39be65366cb5 Duration: 846.94 ms Billed Duration: 900 ms Memory Size: 128 MB Max Memory Used: 29 MB\r\n\r\nBut if I look on my NAS those sockets that were supposedly closed are still open\r\n\r\nIncoming AWS connections to stunnel:\r\n>tcp        0      0 10.0.0.50:19090         54.194.164.35:35384     ESTABLISHED 30704/stunnel\r\ntcp        0      0 10.0.0.50:19090         54.194.164.35:35502     ESTABLISHED 30704/stunnel\r\ntcp        0      0 10.0.0.50:19090         54.194.164.35:35654     ESTABLISHED 30704/stunnel\r\ntcp        0      0 10.0.0.50:19090         54.194.164.35:35794     ESTABLISHED 30704/stunnel\r\n\r\nInternal connections between stunnel and LMS CLI:\r\n>tcp        0      0 127.0.0.1:54211         127.0.0.1:9090          ESTABLISHED 30704/stunnel\r\ntcp        0      0 127.0.0.1:54679         127.0.0.1:9090          ESTABLISHED 30704/stunnel\r\ntcp        0      0 127.0.0.1:55237         127.0.0.1:9090          ESTABLISHED 30704/stunnel\r\ntcp        0      0 127.0.0.1:55871         127.0.0.1:9090          ESTABLISHED 30704/stunnel\r\ntcp        0      0 127.0.0.1:9090          127.0.0.1:54211         ESTABLISHED 25094/perl\r\ntcp        0      0 127.0.0.1:9090          127.0.0.1:54679         ESTABLISHED 25094/perl\r\ntcp        0      0 127.0.0.1:9090          127.0.0.1:55237         ESTABLISHED 25094/perl\r\ntcp        0      0 127.0.0.1:9090          127.0.0.1:55871         ESTABLISHED 25094/perl\r\n\r\n"}}
{"actor":{"display_login":"rnlgreen"}}