Jump to content

Reverse proxy - 404 Handshake error


DiscoDuck79

Recommended Posts

DiscoDuck79

I'm trying to setup a reverse proxy with Letsencrypt in a Docker. It's working and I can access my server from WAN, everything seems to be working but I get this annoying 404 error in my nginx log file.
 

 

External IP[17/Dec/2019:21:59:23 +0100] "GET /emby/Plugins HTTP/1.1" 200 1109 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:23 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2/Items?IncludeItemTypes=Series%2CSeason%2CEpisode%2CBoxSet%2CMovie%2CMusicVideo%2CMusicArtist%2CMusicAlbum%2CAudio&MinDateLastSaved=2019-12-17T20%3A49%3A39z&Recursive=True&LocationTypes=FileSystem%2CRemote%2COffline&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CTaglines%2CLocalTrailerCount%2CVideo3DFormat%2COfficialRating%2CCumulativeRunTimeTicks%2CItemCounts%2CPremiereDate%2CProductionYear%2CMetascore%2CAirTime%2CDateCreated%2CPeople%2COverview%2CCommunityRating%2CStartDate%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CStatus%2CEndDate%2CMediaSources%2CVoteCount%2CRecursiveItemCount%2CPrimaryImageAspectRatio%2CDisplayOrder%2CPresentationUniqueKey%2COriginalTitle&CollapseBoxSetItems=False&IsMissing=False&Limit=1&SortOrder=Ascending&ParentId=bc3a7d1d3dac1f10e170387270df67fa&EnableTotalRecordCount=True&IsVirtualUnaired=False&SortBy=SortName HTTP/1.1" 200 33 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:44 +0100] "GET /emby/system/info/public HTTP/1.1" 200 165 "-" "python-requests/2.9.1"
External IP[17/Dec/2019:21:59:44 +0100] "GET /emby/System/Info HTTP/1.1" 200 848 "-" "python-requests/2.9.1"
External IP[17/Dec/2019:21:59:45 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2 HTTP/1.1" 200 788 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:45 +0100] "GET /emby/System/Configuration HTTP/1.1" 200 739 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:46 +0100] "GET /embywebsocket?api_key=7e0fcc6b674f46219cb4e172450c2d69&device_id=33CDE86A1230491D97168F567D0842D8 HTTP/1.1" 404 34 "-" "-"
External IP[17/Dec/2019:21:59:46 +0100] "POST /emby/Sessions/Capabilities/Full HTTP/1.1" 204 0 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:46 +0100] "GET /emby/Sessions?DeviceId=33CDE86A1230491D97168F567D0842D8 HTTP/1.1" 200 673 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:46 +0100] "GET /emby/Sessions?DeviceId=33CDE86A1230491D97168F567D0842D8 HTTP/1.1" 200 673 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:47 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2/Items HTTP/1.1" 200 599 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:47 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2/Views HTTP/1.1" 200 1149 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:48 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2/Items HTTP/1.1" 200 599 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:48 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2/Views HTTP/1.1" 200 1150 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:50 +0100] "GET /emby/Plugins HTTP/1.1" 200 1109 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:50 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2/Items?IncludeItemTypes=Series%2CSeason%2CEpisode%2CBoxSet%2CMovie%2CMusicVideo%2CMusicArtist%2CMusicAlbum%2CAudio&MinDateLastSaved=2019-12-17T20%3A49%3A39z&Recursive=True&LocationTypes=FileSystem%2CRemote%2COffline&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CTaglines%2CLocalTrailerCount%2CVideo3DFormat%2COfficialRating%2CCumulativeRunTimeTicks%2CItemCounts%2CPremiereDate%2CProductionYear%2CMetascore%2CAirTime%2CDateCreated%2CPeople%2COverview%2CCommunityRating%2CStartDate%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CStatus%2CEndDate%2CMediaSources%2CVoteCount%2CRecursiveItemCount%2CPrimaryImageAspectRatio%2CDisplayOrder%2CPresentationUniqueKey%2COriginalTitle&CollapseBoxSetItems=False&IsMissing=False&Limit=1&SortOrder=Ascending&ParentId=bc3a7d1d3dac1f10e170387270df67fa&EnableTotalRecordCount=True&IsVirtualUnaired=False&SortBy=SortName HTTP/1.1" 200 33 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:50 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2/Items?IncludeItemTypes=Episode%2CMovie%2CMusicVideo%2CAudio&Recursive=True&LocationTypes=FileSystem%2CRemote%2COffline&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CTaglines%2CLocalTrailerCount%2CVideo3DFormat%2COfficialRating%2CCumulativeRunTimeTicks%2CItemCounts%2CPremiereDate%2CProductionYear%2CMetascore%2CAirTime%2CDateCreated%2CPeople%2COverview%2CCommunityRating%2CStartDate%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CStatus%2CEndDate%2CMediaSources%2CVoteCount%2CRecursiveItemCount%2CPrimaryImageAspectRatio%2CDisplayOrder%2CPresentationUniqueKey%2COriginalTitle&CollapseBoxSetItems=False&Limit=1&IsMissing=False&MinDateLastSavedForUser=2019-12-17T20%3A49%3A39z&SortOrder=Ascending&ParentId=bc3a7d1d3dac1f10e170387270df67fa&EnableTotalRecordCount=True&IsVirtualUnaired=False&SortBy=SortName HTTP/1.1" 200 33 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:50 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2/Items?IncludeItemTypes=Series%2CSeason%2CEpisode%2CBoxSet%2CMovie%2CMusicVideo%2CMusicArtist%2CMusicAlbum%2CAudio&MinDateLastSaved=2019-12-17T20%3A49%3A39z&Recursive=True&LocationTypes=FileSystem%2CRemote%2COffline&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CTaglines%2CLocalTrailerCount%2CVideo3DFormat%2COfficialRating%2CCumulativeRunTimeTicks%2CItemCounts%2CPremiereDate%2CProductionYear%2CMetascore%2CAirTime%2CDateCreated%2CPeople%2COverview%2CCommunityRating%2CStartDate%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CStatus%2CEndDate%2CMediaSources%2CVoteCount%2CRecursiveItemCount%2CPrimaryImageAspectRatio%2CDisplayOrder%2CPresentationUniqueKey%2COriginalTitle&CollapseBoxSetItems=False&IsMissing=False&Limit=1&SortOrder=Ascending&ParentId=fd5b576abdb5657b0bb5b3eef24e0dc2&EnableTotalRecordCount=True&IsVirtualUnaired=False&SortBy=SortName HTTP/1.1" 200 33 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:50 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2/Items?IncludeItemTypes=Episode%2CMovie%2CMusicVideo%2CAudio&Recursive=True&LocationTypes=FileSystem%2CRemote%2COffline&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CTaglines%2CLocalTrailerCount%2CVideo3DFormat%2COfficialRating%2CCumulativeRunTimeTicks%2CItemCounts%2CPremiereDate%2CProductionYear%2CMetascore%2CAirTime%2CDateCreated%2CPeople%2COverview%2CCommunityRating%2CStartDate%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CStatus%2CEndDate%2CMediaSources%2CVoteCount%2CRecursiveItemCount%2CPrimaryImageAspectRatio%2CDisplayOrder%2CPresentationUniqueKey%2COriginalTitle&CollapseBoxSetItems=False&Limit=1&IsMissing=False&MinDateLastSavedForUser=2019-12-17T20%3A49%3A39z&SortOrder=Ascending&ParentId=fd5b576abdb5657b0bb5b3eef24e0dc2&EnableTotalRecordCount=True&IsVirtualUnaired=False&SortBy=SortName HTTP/1.1" 200 33 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:51 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2/Items?IncludeItemTypes=Series%2CSeason%2CEpisode%2CBoxSet%2CMovie%2CMusicVideo%2CMusicArtist%2CMusicAlbum%2CAudio&MinDateLastSaved=2019-12-17T20%3A49%3A39z&Recursive=True&LocationTypes=FileSystem%2CRemote%2COffline&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CTaglines%2CLocalTrailerCount%2CVideo3DFormat%2COfficialRating%2CCumulativeRunTimeTicks%2CItemCounts%2CPremiereDate%2CProductionYear%2CMetascore%2CAirTime%2CDateCreated%2CPeople%2COverview%2CCommunityRating%2CStartDate%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CStatus%2CEndDate%2CMediaSources%2CVoteCount%2CRecursiveItemCount%2CPrimaryImageAspectRatio%2CDisplayOrder%2CPresentationUniqueKey%2COriginalTitle&CollapseBoxSetItems=False&IsMissing=False&Limit=1&SortOrder=Ascending&ParentId=9138b462f5e87e69b2f2123b10cadc38&EnableTotalRecordCount=True&IsVirtualUnaired=False&SortBy=SortName HTTP/1.1" 200 33 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:51 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2/Items?IncludeItemTypes=Episode%2CMovie%2CMusicVideo%2CAudio&Recursive=True&LocationTypes=FileSystem%2CRemote%2COffline&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CTaglines%2CLocalTrailerCount%2CVideo3DFormat%2COfficialRating%2CCumulativeRunTimeTicks%2CItemCounts%2CPremiereDate%2CProductionYear%2CMetascore%2CAirTime%2CDateCreated%2CPeople%2COverview%2CCommunityRating%2CStartDate%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CStatus%2CEndDate%2CMediaSources%2CVoteCount%2CRecursiveItemCount%2CPrimaryImageAspectRatio%2CDisplayOrder%2CPresentationUniqueKey%2COriginalTitle&CollapseBoxSetItems=False&Limit=1&IsMissing=False&MinDateLastSavedForUser=2019-12-17T20%3A49%3A39z&SortOrder=Ascending&ParentId=9138b462f5e87e69b2f2123b10cadc38&EnableTotalRecordCount=True&IsVirtualUnaired=False&SortBy=SortName HTTP/1.1" 200 33 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:51 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2/Items?IncludeItemTypes=Series%2CSeason%2CEpisode%2CBoxSet%2CMovie%2CMusicVideo%2CMusicArtist%2CMusicAlbum%2CAudio&MinDateLastSaved=2019-12-17T20%3A49%3A39z&Recursive=True&LocationTypes=FileSystem%2CRemote%2COffline&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CTaglines%2CLocalTrailerCount%2CVideo3DFormat%2COfficialRating%2CCumulativeRunTimeTicks%2CItemCounts%2CPremiereDate%2CProductionYear%2CMetascore%2CAirTime%2CDateCreated%2CPeople%2COverview%2CCommunityRating%2CStartDate%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CStatus%2CEndDate%2CMediaSources%2CVoteCount%2CRecursiveItemCount%2CPrimaryImageAspectRatio%2CDisplayOrder%2CPresentationUniqueKey%2COriginalTitle&CollapseBoxSetItems=False&IsMissing=False&Limit=1&SortOrder=Ascending&ParentId=9ec840fc98bc99fab0bc952ee46828ad&EnableTotalRecordCount=True&IsVirtualUnaired=False&SortBy=SortName HTTP/1.1" 200 33 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:51 +0100] "GET /emby/Users/87393a1143a144b19558682a8cd889f2/Items?IncludeItemTypes=Episode%2CMovie%2CMusicVideo%2CAudio&Recursive=True&LocationTypes=FileSystem%2CRemote%2COffline&Fields=Path%2CGenres%2CSortName%2CStudios%2CWriter%2CTaglines%2CLocalTrailerCount%2CVideo3DFormat%2COfficialRating%2CCumulativeRunTimeTicks%2CItemCounts%2CPremiereDate%2CProductionYear%2CMetascore%2CAirTime%2CDateCreated%2CPeople%2COverview%2CCommunityRating%2CStartDate%2CCriticRating%2CCriticRatingSummary%2CEtag%2CShortOverview%2CProductionLocations%2CTags%2CProviderIds%2CParentId%2CRemoteTrailers%2CSpecialEpisodeNumbers%2CStatus%2CEndDate%2CMediaSources%2CVoteCount%2CRecursiveItemCount%2CPrimaryImageAspectRatio%2CDisplayOrder%2CPresentationUniqueKey%2COriginalTitle&CollapseBoxSetItems=False&Limit=1&IsMissing=False&MinDateLastSavedForUser=2019-12-17T20%3A49%3A39z&SortOrder=Ascending&ParentId=9ec840fc98bc99fab0bc952ee46828ad&EnableTotalRecordCount=True&IsVirtualUnaired=False&SortBy=SortName HTTP/1.1" 200 33 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:51 +0100] "GET /emby/Emby.Kodi.SyncQueue/87393a1143a144b19558682a8cd889f2/GetItems?LastUpdateDT=2019-12-17T20%3A49%3A39z HTTP/1.1" 200 74 "-" "Emby-Kodi/4.1.19"
External IP[17/Dec/2019:21:59:51 +0100] "GET /embywebsocket?api_key=7e0fcc6b674f46219cb4e172450c2d69&device_id=33CDE86A1230491D97168F567D0842D8 HTTP/1.1" 404 34 "-" "-"
External IP[17/Dec/2019:21:59:51 +0100] "GET /emby/Plugins HTTP/1.1" 200 1109 "-" "Emby-Kodi/4.1.19"

 


 
This gives a Handshake status 404 error in Kodi
 

 

2019-12-17 21:59:23.679 T:3844109024  NOTICE: Emby -> ---[ START EMBYCLIENT ]---
2019-12-17 21:59:23.681 T:3852501728  NOTICE: EMBY.hooks.monitor -> -->[ q:monitor/StopServer ]
2019-12-17 21:59:23.683 T:3844109024  NOTICE: EMBY.helper.utils -> exiiiiitttinggg
2019-12-17 21:59:23.708 T:3844109024  NOTICE: EMBY.entrypoint.service -> ERROR::
2019-12-17 21:59:24.625 T:3241935584  NOTICE: EMBY.library -> ---<[ library ]
2019-12-17 21:59:25.261 T:3860894432  NOTICE: Emby.emby.core.ws_client -> ---<[ websocket ]
2019-12-17 21:59:25.325 T:3844109024  NOTICE: EMBY.entrypoint.service -> [ onNotification/plugin.video.emby/WebSocketRestarting ]
2019-12-17 21:59:43.204 T:3877941984  NOTICE: EMBY.connect -> --[ server/default ]
2019-12-17 21:59:43.220 T:3877941984  NOTICE: Emby.emby.core.connection_manager -> Begin connect
2019-12-17 21:59:44.228 T:3877941984  NOTICE: Emby.emby.core.connection_manager -> Found Servers: []
2019-12-17 21:59:44.229 T:3877941984  NOTICE: Emby.emby.core.connection_manager -> Begin connectToServers, with 1 servers
2019-12-17 21:59:44.230 T:3877941984  NOTICE: Emby.emby.core.connection_manager -> testing connection mode 2 with server Emby
2019-12-17 21:59:44.230 T:3877941984  NOTICE: Emby.emby.core.connection_manager -> tryConnect url: https://my.domain.here/emby/system/info/public
2019-12-17 21:59:44.605 T:3877941984  NOTICE: Emby.emby.core.connection_manager -> calling onSuccessfulConnection with connection mode 2 with server Emby
2019-12-17 21:59:44.956 T:3877941984  NOTICE: Emby.emby.client -> User is authenticated.
2019-12-17 21:59:45.915 T:3860894432  NOTICE: Emby.emby.core.ws_client -> Websocket url: wss://my.domain.here/embywebsocket?api_key=7e0fcc6b674f46219cb4e172450c2d69&device_id=33CDE86A1230491D97168F567D0842D8
2019-12-17 21:59:46.208 T:3852501728  NOTICE: EMBY.hooks.monitor -> -->[ q:monitor/LoadServer ]
2019-12-17 21:59:46.292 T:3877941984  NOTICE: EMBY.setup -> ---<[ setup ]
2019-12-17 21:59:46.302 T:3852501728  NOTICE: EMBY.hooks.monitor -> --[ post capabilities/b4c3377815e44e1881de0c497a94e8d1 ]
2019-12-17 21:59:46.325 T:3241935584  NOTICE: EMBY.library -> --->[ library ]
2019-12-17 21:59:46.327 T:3860894432  NOTICE: Emby.emby.core.ws_client -> ERROR:: Handshake Status 404
2019-12-17 21:59:46.825 T:3844109024  NOTICE: EMBY.entrypoint.service -> [ onNotification/plugin.video.emby/ServerOnline ]
2019-12-17 21:59:47.578 T:3241935584  NOTICE: EMBY.database -> [emby] 1 rows updated.
2019-12-17 21:59:50.529 T:3241935584  NOTICE: Previous line repeats 5 times.
2019-12-17 21:59:50.529 T:3241935584  NOTICE: EMBY.library -> --[ retrieve changes ] 2019-12-17T20:49:39z
2019-12-17 21:59:51.411 T:3844109024  NOTICE: EMBY.entrypoint.service -> [ onNotification/plugin.video.emby/WebSocketRestarting ]
2019-12-17 21:59:51.439 T:3241935584  NOTICE: EMBY.library -> --<[ retrieve changes ]
2019-12-17 21:59:51.666 T:3860894432  NOTICE: Emby.emby.core.ws_client -> ERROR:: Handshake Status 404
2019-12-17 21:59:51.807 T:3844109024  NOTICE: EMBY.library -> --[ retrieve changes ] 2019-12-17T20:49:39z
2019-12-17 21:59:52.699 T:3844109024  NOTICE: EMBY.library -> --<[ retrieve changes ]
2019-12-17 21:59:56.800 T:3844109024  NOTICE: EMBY.entrypoint.service -> [ onNotification/plugin.video.emby/WebSocketRestarting ]
2019-12-17 21:59:56.888 T:3844109024  NOTICE: EMBY.library -> --[ retrieve changes ] 2019-12-17T20:49:39z
2019-12-17 21:59:56.962 T:3860894432  NOTICE: Emby.emby.core.ws_client -> ERROR:: Handshake Status 404
2019-12-17 21:59:57.840 T:3844109024  NOTICE: EMBY.library -> --<[ retrieve changes ]
2019-12-17 22:00:02.050 T:3844109024  NOTICE: EMBY.entrypoint.service -> [ onNotification/plugin.video.emby/WebSocketRestarting ]
2019-12-17 22:00:02.176 T:3844109024  NOTICE: EMBY.library -> --[ retrieve changes ] 2019-12-17T20:49:39z
2019-12-17 22:00:02.297 T:3860894432  NOTICE: Emby.emby.core.ws_client -> ERROR:: Handshake Status 404
2019-12-17 22:00:03.080 T:3844109024  NOTICE: EMBY.library -> --<[ retrieve changes ]

 

 

 

And the same is seen in the Emby log

 

 

2019-12-17 21:59:44.549 Info HttpServer: HTTP GET http://my.domain.here:8096/emby/system/info/public. UserAgent: python-requests/2.9.1
2019-12-17 21:59:44.550 Info HttpServer: HTTP Response 200 to WAN_address. Time: 1ms. http://my.domain.here:8096/emby/system/info/public
2019-12-17 21:59:44.909 Info HttpServer: HTTP GET http://my.domain.here:8096/emby/System/Info. UserAgent: python-requests/2.9.1
2019-12-17 21:59:44.911 Info HttpServer: HTTP Response 200 to WAN_address. Time: 2ms. http://my.domain.here:8096/emby/System/Info
2019-12-17 21:59:45.269 Info HttpServer: HTTP GET http://my.domain.here:8096/emby/Users/87393a1143a144b19558682a8cd889f2. UserAgent: Emby-Kodi/4.1.19
2019-12-17 21:59:45.270 Info HttpServer: HTTP Response 200 to WAN_address. Time: 2ms. http://my.domain.here:8096/emby/Users/87393a1143a144b19558682a8cd889f2
2019-12-17 21:59:45.649 Info HttpServer: HTTP GET http://my.domain.here:8096/emby/System/Configuration. UserAgent: Emby-Kodi/4.1.19
2019-12-17 21:59:45.650 Info HttpServer: HTTP Response 200 to WAN_address. Time: 1ms. http://my.domain.here:8096/emby/System/Configuration
2019-12-17 21:59:46.189 Info HttpServer: HTTP GET http://my.domain.here:8096/embywebsocket?device_id=33CDE86A1230491D97168F567D0842D8. UserAgent: 
2019-12-17 21:59:46.190 Info HttpServer: HTTP Response 404 to WAN_address. Time: 0ms. http://my.domain.here:8096/embywebsocket?device_id=33CDE86A1230491D97168F567D0842D8
2019-12-17 21:59:46.637 Info HttpServer: HTTP POST http://my.domain.here:8096/emby/Sessions/Capabilities/Full. UserAgent: Emby-Kodi/4.1.19
2019-12-17 21:59:46.639 Info HttpServer: HTTP Response 204 to WAN_address. Time: 2ms. http://my.domain.here:8096/emby/Sessions/Capabilities/Full
2019-12-17 21:59:46.721 Info HttpServer: HTTP GET http://my.domain.here:8096/emby/Sessions?DeviceId=33CDE86A1230491D97168F567D0842D8. UserAgent: Emby-Kodi/4.1.19
2019-12-17 21:59:46.722 Info HttpServer: HTTP Response 200 to WAN_address. Time: 2ms. http://my.domain.here:8096/emby/Sessions?DeviceId=33CDE86A1230491D97168F567D0842D8

 


 

I don't know much about reverse proxies so not sure what's wrong, maybe websockets isn't being forwarded as they should?

When checking the logs after connecting with an Android phone and windows computer via the proxy everything looks normal, so it seems to only be when using Emby For Kodi, although I've only tested these 3 options...

 

Configuration as per below, it's Linuxserverio default config.

Can anyone see anything obvious I've missed?

 

emby.subdomain.conf

 

 

# make sure that your dns has a cname set for emby, if emby is running in bridge mode, the below config should work as is, although,
# the container name is expected to be "emby", if not, replace the lines "set $upstream_emby emby;" with "set $upstream_emby <containername>;"
# for host mode, replace the lines "proxy_pass http://$upstream_emby:8096;" with "proxy_pass http://HOSTIP:8096;" HOSTIP being the IP address of emby
# in emby settings, under "Advanced" change the public https port to 443, leave the local ports as is, set the "external domain" to your url,
# and set the "Secure connection mode" to "Handled by reverse proxy"

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name emby.*;
    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_emby emby;
        proxy_pass http://$upstream_emby:8096;
		
        proxy_set_header Range $http_range;
        proxy_set_header If-Range $http_if_range;
    }
	
    location ~ (/emby)?/socket {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_emby emby;
        proxy_pass http://$upstream_emby:8096;
	
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;
   }
}

 

 

 

 

Nginx

 

 

## Version 2019/10/27 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/nginx.conf

user abc;
worker_processes 4;
pid /run/nginx.pid;
include /etc/nginx/modules/*.conf;

events {
	worker_connections 768;
	# multi_accept on;
}

http {

	##
	# Basic Settings
	##

	sendfile on;
	tcp_nopush on;
	tcp_nodelay on;
	keepalive_timeout 65;
	types_hash_max_size 2048;
	variables_hash_max_size 2048;
	
	# server_tokens off;

	# server_names_hash_bucket_size 64;
	# server_name_in_redirect off;

	client_max_body_size 0;

	include /etc/nginx/mime.types;
	default_type application/octet-stream;

	##
	# Logging Settings
	##

	access_log /config/log/nginx/access.log;
	error_log /config/log/nginx/error.log;

	##
	# Gzip Settings
	##

	gzip on;
	gzip_disable "msie6";

	# gzip_vary on;
	# gzip_proxied any;
	# gzip_comp_level 6;
	# gzip_buffers 16 8k;
	# gzip_http_version 1.1;
	# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

	##
	# nginx-naxsi config
	##
	# Uncomment it if you installed nginx-naxsi
	##

	#include /etc/nginx/naxsi_core.rules;

	##
	# nginx-passenger config
	##
	# Uncomment it if you installed nginx-passenger
	##

	#passenger_root /usr;
	#passenger_ruby /usr/bin/ruby;

	##
	# Virtual Host Configs
	##
	include /etc/nginx/conf.d/*.conf;
	include /config/nginx/site-confs/*;
	lua_load_resty_core off;

}


#mail {
#	# See sample authentication script at:
#	# http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
#	# auth_http localhost/auth.php;
#	# pop3_capabilities "TOP" "USER";
#	# imap_capabilities "IMAP4rev1" "UIDPLUS";
#
#	server {
#		listen     localhost:110;
#		protocol   pop3;
#		proxy      on;
#	}
#
#	server {
#		listen     localhost:143;
#		protocol   imap;
#		proxy      on;
#	}
#}
daemon off;

 

 

 

Proxy

 

## Version 2019/10/23 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/proxy.conf

client_body_buffer_size 128k;

#Timeout if the real server is dead
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;

# Advanced Proxy Config
send_timeout 5m;
proxy_read_timeout 240;
proxy_send_timeout 240;
proxy_connect_timeout 240;

# TLS 1.3 early data
proxy_set_header Early-Data $ssl_early_data;

# Basic Proxy Config
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Ssl on;
proxy_redirect  http://  $scheme://;
proxy_http_version 1.1;
proxy_set_header Connection "";
#proxy_cookie_path / "/; HTTPOnly; Secure"; # enable at your own risk, may break certain apps
proxy_cache_bypass $cookie_session;
proxy_no_cache $cookie_session;
proxy_buffers 32 4k;
proxy_headers_hash_bucket_size 128;
proxy_headers_hash_max_size 1024;

 

 

 

SSL

 

 

## Version 2019/08/11 - Changelog: https://github.com/linuxserver/docker-letsencrypt/commits/master/root/defaults/ssl.conf

# session settings
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;

# Diffie-Hellman parameter for DHE cipher suites
ssl_dhparam /config/nginx/dhparams.pem;

# ssl certs
ssl_certificate /config/keys/letsencrypt/fullchain.pem;
ssl_certificate_key /config/keys/letsencrypt/privkey.pem;

# protocols
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';

# HSTS, remove # from the line below to enable HSTS
#add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;

# OCSP Stapling
ssl_stapling on;
ssl_stapling_verify on;
resolver 127.0.0.11 valid=30s; # Docker DNS Server

# Enable TLS 1.3 early data
ssl_early_data on;

# Optional additional headers
#add_header Content-Security-Policy "upgrade-insecure-requests";
#add_header X-Frame-Options "SAMEORIGIN" always;
#add_header X-XSS-Protection "1; mode=block" always;
#add_header X-Content-Type-Options "nosniff" always;
#add_header X-UA-Compatible "IE=Edge" always;
#add_header Cache-Control "no-transform" always;
#add_header Referrer-Policy "same-origin" always;

 

 

 

Link to comment
Share on other sites

DiscoDuck79

That was an amazingly quick answer.

I've compared towards it earlier and adjusted, couldn't get it to work properly then either. Tomorrow I'll probably try to completely replace my config with his.

Link to comment
Share on other sites

pir8radio

Yea whoever keeps writing these messed up nginx emby configs for these docker installs  PLEASE STOP lol...    

Just because you can doesn't mean you should.    I'm not sure if they are trying to make the configs difficult to seem smart?  But its a very inefficient config.   You don't need 4 different config files when you just include them in every request anyway.     Yea put a single config in, and enjoy..  :)

Link to comment
Share on other sites

D34DC3N73R

Yea whoever keeps writing these messed up nginx emby configs for these docker installs  PLEASE STOP lol...    

Just because you can doesn't mean you should.    I'm not sure if they are trying to make the configs difficult to seem smart?  But its a very inefficient config.   You don't need 4 different config files when you just include them in every request anyway.     Yea put a single config in, and enjoy..  :)

 

Submit a PR if you think it should be changed. Those are the included proxy confs that ship with LS letsencrypt image. https://github.com/linuxserver/reverse-proxy-confs

However, I will say, the emby conf is one of the few custom confs I use instead of their defaults.

Link to comment
Share on other sites

DiscoDuck79

Ended up with keeping the original "layout" with 4 files, it was the easiest way since the files are recreated if deleted the next time the container starts.

When I changed the subdomain.conf file to the below the 404 errors went away. Couldn't see any references to "location ~ (/emby)?/socket {" in @@pir8radio config so when I removed it, it seemed to have resolved the issue.

 location / {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_emby emby;
        proxy_pass http://$upstream_emby:8096;

        proxy_set_header Range $http_range;
        proxy_set_header If-Range $http_if_range;

        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;
   }

 

 

 

Let us know how that goes, thanks.

 

 

Yea whoever keeps writing these messed up nginx emby configs for these docker installs  PLEASE STOP lol...    

Just because you can doesn't mean you should.    I'm not sure if they are trying to make the configs difficult to seem smart?  But its a very inefficient config.   You don't need 4 different config files when you just include them in every request anyway.     Yea put a single config in, and enjoy..  :)

 

  • Like 1
Link to comment
Share on other sites

  • 3 months later...
aptalca

Hi, I'm one of the maintainers of the letsencrypt image in question here.

 

I'm really surprised that no one raised this with the actual maintainers of the repo (not on github, not on discord). Anyway. 

 

We provide a letsencrypt/nginx image that comes with preset proxy confs so users can easily enable for popular apps (including emby) with simply a file rename in most cases. The proxy confs are hosted in this repo: https://github.com/linuxserver/reverse-proxy-confs

 

They are mostly community driven. And looking at the git history, we had started out with @@pir8radio 's conf (many thanks for that) but then someone PR'ed a change to separate out the websocket uri. No idea why. That may have caused the regression. We're looking into it and will update it accordingly.

 

To answer @@pir8radio 's question about why we use 4 config files when just include them in every request anyway, that's precisely the reason. They are included in almost every request, so we separate them out. That way, when the user wants to make a change to, say, their ssl config (drop TLS v1.1 for instance) they only edit one file (ssl.conf) and not all 30 proxy confs for the apps they may use. Keep in mind that the confs are enabled and disabled at will, and we provide dozens.

 

If you have any suggestions, or improvements, please let us know. Or PR ;) as most are community submitted anyway.

Here's our letsencrypt image: https://github.com/linuxserver/docker-letsencrypt

And here's the reverse proxy confs: https://github.com/linuxserver/reverse-proxy-confs

  • Like 2
Link to comment
Share on other sites

pir8radio

Hi, I'm one of the maintainers of the letsencrypt image in question here.

 

I'm really surprised that no one raised this with the actual maintainers of the repo (not on github, not on discord). Anyway. 

 

We provide a letsencrypt/nginx image that comes with preset proxy confs so users can easily enable for popular apps (including emby) with simply a file rename in most cases. The proxy confs are hosted in this repo: https://github.com/linuxserver/reverse-proxy-confs

 

They are mostly community driven. And looking at the git history, we had started out with @@pir8radio 's conf (many thanks for that) but then someone PR'ed a change to separate out the websocket uri. No idea why. That may have caused the regression. We're looking into it and will update it accordingly.

 

To answer @@pir8radio 's question about why we use 4 config files when just include them in every request anyway, that's precisely the reason. They are included in almost every request, so we separate them out. That way, when the user wants to make a change to, say, their ssl config (drop TLS v1.1 for instance) they only edit one file (ssl.conf) and not all 30 proxy confs for the apps they may use. Keep in mind that the confs are enabled and disabled at will, and we provide dozens.

 

If you have any suggestions, or improvements, please let us know. Or PR ;) as most are community submitted anyway.

Here's our letsencrypt image: https://github.com/linuxserver/docker-letsencrypt

And here's the reverse proxy confs: https://github.com/linuxserver/reverse-proxy-confs

 

lol, sorry...     ^_^     Yea almost every nginx issue lately has been with docker setups they seem to be getting from the locations you linked above...  I'll try to take a look, not sure if I will be much help, I know you guys like to use these "cookie cutter" templates, but maybe we can help with the emby one.  it would be nice for these guys to have an easy to setup version without having to fight through config changes to make it work with emby..  

Link to comment
Share on other sites

@pir8radio sounds like a plan. Keen to work out the kinks on this and with the PR reversion @@aptalca made my live setup seems to be free of socket 404s but ideally we refine this more if there are improvements to make.

 

The lsio community is very large with almost 9 billion container pulls to date so the chances that the majority of these docker RP issues stem from this config source is pretty high.

 

Discord would be better for this timezone and world-problems not withstanding but this thread can be used as well.

 

Either way now we have seen this thread people are on it. :)

Link to comment
Share on other sites

pir8radio

@pir8radio sounds like a plan. Keen to work out the kinks on this and with the PR reversion @@aptalca made my live setup seems to be free of socket 404s but ideally we refine this more if there are improvements to make.

 

The lsio community is very large with almost 9 billion container pulls to date so the chances that the majority of these docker RP issues stem from this config source is pretty high.

 

Discord would be better for this timezone and world-problems not withstanding but this thread can be used as well.

 

Either way now we have seen this thread people are on it. :)

post your discord server I'll add it to my collection too...  :-)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...