citizenkraft 2 Posted January 22, 2023 Share Posted January 22, 2023 This occurs both on a Roku stick plugged into a TV, and also a TCL smart tv with Roku built in. It doesn't always crash, but usually does and the initial home screen loading used to be seamless but now takes ~30 seconds and then will sometimes crash. I just turn it on the Roku stick TV and made it crash before uploading the log. I also turned debugging on prior. Can anyone advise? I saw there was a new version of the Roku Emby App dated Jan 8 which is around when I started having issues. I noticed the logs were full of the following, so I excerpted it below. 2023-01-21 19:45:42.227 Debug PortMapper: Creating port map on local port 8096 to public port 8096 with device 192.168.50.208 2023-01-21 19:45:42.227 Debug HttpClient: POST http://192.168.50.1:41504/ctl/IPConn 2023-01-21 19:45:44.258 Error PortMapper: Error creating port map *** Error Report *** Version: 4.7.11.0 Command line: C:\Users\Dustin-Setup\AppData\Roaming\Emby-Server\system\EmbyServer.dll Operating system: Microsoft Windows 10.0.19044 Framework: .NET 6.0.10 OS/Process: x64/x64 Runtime: C:/Users/Dustin-Setup/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll Processor count: 12 Data path: C:\Users\Dustin-Setup\AppData\Roaming\Emby-Server\programdata Application path: C:\Users\Dustin-Setup\AppData\Roaming\Emby-Server\system System.Net.Http.HttpRequestException: System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (192.168.50.1:41504) ---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it. at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod) at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod) at Mono.Nat.Upnp.UpnpNatDevice.CreatePortMapInternal(Mapping mapping, CancellationToken cancellationToken) at Mono.Nat.Upnp.UpnpNatDevice.CreatePortMap(Mapping mapping, CancellationToken cancellationToken) at Emby.PortMapper.ExternalPortForwarding.CreateRules(INatDevice device, CancellationToken cancellationToken) Source: Emby.Server.Implementations TargetSite: Void MoveNext() InnerException: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it. Source: System.Net.Sockets TargetSite: Void ThrowException(System.Net.Sockets.SocketError, System.Threading.CancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) embyserver.txt Link to comment Share on other sites More sharing options...
pwhodges 1534 Posted January 22, 2023 Share Posted January 22, 2023 (edited) That error is nothing related to the Roku. The portmapper is used to set up port forwarding in your router automatically. It appears that your router doesn't accept the portmapper's uPNP commands (which is good, TBH). Do you use remote access? If not, then just turn of the port mapping in the Network Settings. Or have you set up port mapping manually? If so, again turn off the portmapping. As for the Roku, I have both TV and stick, and have never seen a crash, so I guess there's something very particular in your system or media - hopefully those that read logs will see something! Paul Edited January 22, 2023 by pwhodges Link to comment Share on other sites More sharing options...
ebr 14935 Posted January 22, 2023 Share Posted January 22, 2023 Hi. What region of the world are you in? Link to comment Share on other sites More sharing options...
citizenkraft 2 Posted January 22, 2023 Author Share Posted January 22, 2023 (edited) I'm in the US. We only use emby on our home network, so I went ahead and disabled the port forwarding, at least that'll clean up the error log going forward. I also saw an option to "vacuum" the database, sound like it'll be a rebuild, so I tried that as well but it didn't seem to help. I just looked at the debug logs, and this is clearly a big part of the reason why its so sluggish these days: 023-01-22 12:07:18.522 Debug Server: http/1.1 Response 200 to host1. Time: 8766ms. http://192.168.50.208:8096/emby/Users/4ba7c43159bf4ffd9943f2d6e87618a4/Items/Resume?MediaTypes=Video&EnableImageTypes=Primary,Thumb,Backdrop&recursive=true&fields=SortName,PrimaryImageAspectRatio,OfficialRating,CriticRating,CommunityRating,PremiereDate,StartDate,EndDate,ProductionYear&imagetypelimit=1&limit=50 023-01-22 12:07:18.522 Debug Server: http/1.1 Response 200 to host1. Time: 8766ms. http://192.168.50.208:8096/emby/Users/4ba7c43159bf4ffd9943f2d6e87618a4/Items/Resume?MediaTypes=Video&EnableImageTypes=Primary,Thumb,Backdrop&recursive=true&fields=SortName,PrimaryImageAspectRatio,OfficialRating,CriticRating,CommunityRating,PremiereDate,StartDate,EndDate,ProductionYear&imagetypelimit=1&limit=50 Edit: Went to the TV with the Roku stick and turned it on. it stalled and then crashed like normal, found these entries in the log: 2023-01-22 12:12:53.918 Debug SqliteItemRepository: GetItems query time (slow): 2966ms. Query: select A.type,A.Id,A.StartDate,A.EndDate,A.CommunityRating,A.IndexNumber,A.Name,A.PremiereDate,A.ParentIndexNumber,A.ProductionYear,A.OfficialRating,A.SortName,A.RunTimeTicks,A.ParentId,A.CriticRating,A.IsVirtualItem,A.SeriesName,A.Album,A.AlbumId,A.SeriesId,A.PresentationUniqueKey,A.Images,A.ExternalId,A.SortIndexNumber,A.SortParentIndexNumber,A.IndexNumberEnd,UserDatas.IsFavorite,UserDatas.Played,UserDatas.PlayCount,UserDatas.PlaybackPositionTicks,UserDatas.LastPlayedDateInt,UserDatas.AudioStreamIndex,UserDatas.SubtitleStreamIndex,((Coalesce(SortParentIndexNumber,ParentIndexNumber, 1) * 1000000) + Coalesce(SortIndexNumber, IndexNumber, 0) + (Select Case When Coalesce(ParentIndexNumber,1)=0 Then 0 Else 0.5 End) + (Select Case When Coalesce(ParentIndexNumber,1)=0 Then (Cast(Coalesce(IndexNumber, 0) as REAL) / 100000) Else 0 End)) EpisodeAbsoluteIndexNumber from MediaItems A left join (Select N.SeriesPresentationUniqueKey,((Coalesce(N.SortParentIndexNumber,N.ParentIndexNumber, 1) * 1000000) + Coalesce(N.SortIndexNumber, N.IndexNumber, 0) + (Select Case When Coalesce(N.ParentIndexNumber,1)=0 Then 0 Else 0.5 End) + (Select Case When Coalesce(N.ParentIndexNumber,1)=0 Then (Cast(Coalesce(N.IndexNumber, 0) as REAL) / 100000) Else 0 End)) AbsoluteIndexNumber,UserDatas_N.LastPlayedDateInt LastPlayedDateInt,UserDatas_N.playbackPositionTicks playbackPositionTicks from MediaItems N join UserDatas UserDatas_N on N.UserDataKeyId=UserDatas_N.UserDataKeyId And (UserDatas_N.UserId=@UserId) where Type=8 and (UserDatas_N.Played=1 or UserDatas_N.playbackPositionTicks > 0) Group By N.SeriesPresentationUniqueKey ORDER BY MAX(UserDatas_N.LastPlayedDateInt) desc, Coalesce(SortParentIndexNumber,ParentIndexNumber) desc, Coalesce(SortIndexNumber,IndexNumber) desc) LastWatchedEpisodes on LastWatchedEpisodes.SeriesPresentationUniqueKey=A.SeriesPresentationUniqueKey left join UserDatas on A.UserDataKeyId=UserDatas.UserDataKeyId And (UserDatas.UserId=@UserId) where ((UserDatas.playbackPositionTicks > 0) OR (A.Type=8 and Coalesce(UserDatas.Played,0)=0 and EpisodeAbsoluteIndexNumber > LastWatchedEpisodes.AbsoluteIndexNumber and LastWatchedEpisodes.LastPlayedDateInt not null)) AND (A.Type <> 8 or UserDatas.playbackPositionTicks > 0 or Coalesce(A.SortParentIndexNumber, A.ParentIndexNumber, -1) <> 0) AND IsVirtualItem=@IsVirtualItem AND Coalesce(HideFromResume,0)=@HideFromResume AND Coalesce((select HideFromResume from UserDatas where UserDataKeyId=(Select UserDataKeyId from MediaItems MediaItemsHideFromResumeInner where MediaItemsHideFromResumeInner.Id=A.SeriesId) and UserId=@UserId),0)=@HideFromResume AND MediaType=@MediaTypes AND TopParentId in (9691,9794) Group by coalesce(A.SeriesPresentationUniqueKey, A.PresentationUniqueKey) ORDER BY coalesce(LastWatchedEpisodes.LastPlayedDateInt, Max(UserDatas.LastPlayedDateInt)) DESC,Max(UserDatas.LastPlayedDateInt) DESC,Min(EpisodeAbsoluteIndexNumber) ASC LIMIT 50 2023-01-22 12:12:56.624 Debug SqliteItemRepository: GetItems-TotalRecordCount query time (slow): 2707ms. Query: select count (distinct coalesce(A.SeriesPresentationUniqueKey, A.PresentationUniqueKey)),((Coalesce(SortParentIndexNumber,ParentIndexNumber, 1) * 1000000) + Coalesce(SortIndexNumber, IndexNumber, 0) + (Select Case When Coalesce(ParentIndexNumber,1)=0 Then 0 Else 0.5 End) + (Select Case When Coalesce(ParentIndexNumber,1)=0 Then (Cast(Coalesce(IndexNumber, 0) as REAL) / 100000) Else 0 End)) EpisodeAbsoluteIndexNumber from MediaItems A left join (Select N.SeriesPresentationUniqueKey,((Coalesce(N.SortParentIndexNumber,N.ParentIndexNumber, 1) * 1000000) + Coalesce(N.SortIndexNumber, N.IndexNumber, 0) + (Select Case When Coalesce(N.ParentIndexNumber,1)=0 Then 0 Else 0.5 End) + (Select Case When Coalesce(N.ParentIndexNumber,1)=0 Then (Cast(Coalesce(N.IndexNumber, 0) as REAL) / 100000) Else 0 End)) AbsoluteIndexNumber,UserDatas_N.LastPlayedDateInt LastPlayedDateInt,UserDatas_N.playbackPositionTicks playbackPositionTicks from MediaItems N join UserDatas UserDatas_N on N.UserDataKeyId=UserDatas_N.UserDataKeyId And (UserDatas_N.UserId=@UserId) where Type=8 and (UserDatas_N.Played=1 or UserDatas_N.playbackPositionTicks > 0) Group By N.SeriesPresentationUniqueKey ORDER BY MAX(UserDatas_N.LastPlayedDateInt) desc, Coalesce(SortParentIndexNumber,ParentIndexNumber) desc, Coalesce(SortIndexNumber,IndexNumber) desc) LastWatchedEpisodes on LastWatchedEpisodes.SeriesPresentationUniqueKey=A.SeriesPresentationUniqueKey left join UserDatas on A.UserDataKeyId=UserDatas.UserDataKeyId And (UserDatas.UserId=@UserId) where ((UserDatas.playbackPositionTicks > 0) OR (A.Type=8 and Coalesce(UserDatas.Played,0)=0 and EpisodeAbsoluteIndexNumber > LastWatchedEpisodes.AbsoluteIndexNumber and LastWatchedEpisodes.LastPlayedDateInt not null)) AND (A.Type <> 8 or UserDatas.playbackPositionTicks > 0 or Coalesce(A.SortParentIndexNumber, A.ParentIndexNumber, -1) <> 0) AND IsVirtualItem=@IsVirtualItem AND Coalesce(HideFromResume,0)=@HideFromResume AND Coalesce((select HideFromResume from UserDatas where UserDataKeyId=(Select UserDataKeyId from MediaItems MediaItemsHideFromResumeInner where MediaItemsHideFromResumeInner.Id=A.SeriesId) and UserId=@UserId),0)=@HideFromResume AND MediaType=@MediaTypes AND TopParentId in (9691,9794) 2023-01-22 12:12:56.712 Debug Server: http/1.1 Response 200 to host2. Time: 5761ms. http://192.168.50.208:8096/emby/Users/4ba7c43159bf4ffd9943f2d6e87618a4/Items/Resume?MediaTypes=Video&EnableImageTypes=Primary,Thumb,Backdrop&recursive=true&fields=SortName,PrimaryImageAspectRatio,OfficialRating,CriticRating,CommunityRating,PremiereDate,StartDate,EndDate,ProductionYear&imagetypelimit=1&limit=50 2023-01-22 12:12:58.127 Debug SqliteItemRepository: GetItemList query time (slow): 1502ms. Query: select A.type,A.Id,A.IndexNumber,A.Name,A.Path,A.ParentIndexNumber,A.ProductionYear,A.OfficialRating,A.RunTimeTicks,A.ParentId,A.IsVirtualItem,A.SeriesName,A.Album,A.AlbumId,A.SeriesId,A.PresentationUniqueKey,A.Images,A.ExternalId,A.SortIndexNumber,A.SortParentIndexNumber,A.IndexNumberEnd,UserDatas.IsFavorite,UserDatas.Played,UserDatas.PlayCount,UserDatas.PlaybackPositionTicks,UserDatas.LastPlayedDateInt,UserDatas.AudioStreamIndex,UserDatas.SubtitleStreamIndex from MediaItems A left join UserDatas on A.UserDataKeyId=UserDatas.UserDataKeyId And (UserDatas.UserId=@UserId) where IsFolder=@IsFolder AND (UserDatas.played is null or UserDatas.played=@IsPlayed) AND IsVirtualItem=@IsVirtualItem AND TopParentId in (9794) Group by Coalesce(A.SeriesPresentationUniqueKey,A.PresentationUniqueKey) ORDER BY MAX(A.DateCreated) DESC LIMIT 24 2023-01-22 12:12:58.132 Debug Server: http/1.1 Response 200 to host2. Time: 7167ms. http://192.168.50.208:8096/emby/Users/4ba7c43159bf4ffd9943f2d6e87618a4/Items/Latest?ImageTypeLimit=1&excludelocationtypes=Virtual&EnableImageTypes=Primary,Thumb,Backdrop&groupitems=true&Fields=PrimaryImageAspectRatio,OfficialRating,ProductionYear&limit=24&ParentId=4 2023-01-22 12:12:58.295 Debug Server: http/1.1 GET http://192.168.50.208:8096/emby/Items/30343/Images/Primary/0?EnableImageEnhancers=true&tag=37aa931a98557dab35f307cd12b73f02&maxwidth=216&maxHeight=1080&quality=80. UserAgent: Roku/DVP-11.5 (11.5.0.4312-24) 2023-01-22 12:12:58.301 Debug Server: http/1.1 GET http://192.168.50.208:8096/emby/Items/30497/Images/Primary/0?EnableImageEnhancers=true&tag=40d29b5c79f2c569a73ac48fe727cb13&maxwidth=216&maxHeight=1080&quality=80. UserAgent: Roku/DVP-11.5 (11.5.0.4312-24) 2023-01-22 12:12:58.305 Debug Server: http/1.1 GET http://192.168.50.208:8096/emby/Items/30344/Images/Primary/0?EnableImageEnhancers=true&tag=122c75f575c64aa2b1d8ec9e8cad38f7&maxwidth=216&maxHeight=1080&quality=80. UserAgent: Roku/DVP-11.5 (11.5.0.4312-24) 2023-01-22 12:12:58.331 Debug Server: http/1.1 GET http://192.168.50.208:8096/emby/Items/29513/Images/Primary/0?EnableImageEnhancers=true&tag=a3067d793167b0479c881cb5569281ff&maxwidth=216&maxHeight=1080&quality=80. UserAgent: Roku/DVP-11.5 (11.5.0.4312-24) 2023-01-22 12:12:59.466 Debug SqliteItemRepository: GetItems-TotalRecordCount query time (slow): 1334ms. Query: select count (distinct A.PresentationUniqueKey) from MediaItems A left join UserDatas on A.UserDataKeyId=UserDatas.UserDataKeyId And (UserDatas.UserId=@UserId) where IsFolder=@IsFolder AND type in (8,7) AND (UserDatas.played is null or UserDatas.played=@IsPlayed) AND IsVirtualItem=@IsVirtualItem AND TopParentId in (9691,9794) AND A.SeriesPresentationUniqueKey=@SeriesPresentationUniqueKey 2023-01-22 12:12:59.466 Debug Server: http/1.1 Response 200 to host2. Time: 1136ms. http://192.168.50.208:8096/emby/Items/29513/Images/Primary/0?EnableImageEnhancers=true&tag=a3067d793167b0479c881cb5569281ff&maxwidth=216&maxHeight=1080&quality=80 2023-01-22 12:12:59.466 Debug Server: http/1.1 Response 200 to host2. Time: 1172ms. http://192.168.50.208:8096/emby/Items/30343/Images/Primary/0?EnableImageEnhancers=true&tag=37aa931a98557dab35f307cd12b73f02&maxwidth=216&maxHeight=1080&quality=80 2023-01-22 12:12:59.466 Debug Server: http/1.1 Response 200 to host2. Time: 1161ms. http://192.168.50.208:8096/emby/Items/30344/Images/Primary/0?EnableImageEnhancers=true&tag=122c75f575c64aa2b1d8ec9e8cad38f7&maxwidth=216&maxHeight=1080&quality=80 2023-01-22 12:12:59.466 Debug Server: http/1.1 Response 200 to host2. Time: 1165ms. http://192.168.50.208:8096/emby/Items/30497/Images/Primary/0?EnableImageEnhancers=true&tag=40d29b5c79f2c569a73ac48fe727cb13&maxwidth=216&maxHeight=1080&quality=80 2023-01-22 12:12:59.473 Debug Server: http/1.1 Response 200 to host2. Time: 8511ms. http://192.168.50.208:8096/emby/Users/4ba7c43159bf4ffd9943f2d6e87618a4/Items/Latest?ImageTypeLimit=1&excludelocationtypes=Virtual&EnableImageTypes=Primary,Thumb,Backdrop&groupitems=true&Fields=PrimaryImageAspectRatio,OfficialRating,ProductionYear&limit=24&ParentId=2981 2023-01-22 12:12:59.492 Debug Server: http/1.1 GET http://192.168.50.208:8096/emby/Items/29493/Images/Primary/0?EnableImageEnhancers=true&tag=f68556372065ec28474f0e6daa6ab003&maxwidth=216&maxHeight=1080&quality=80. UserAgent: Roku/DVP-11.5 (11.5.0.4312-24) Nothing has changed with the network configuration or anything, literally just started acting up one day. All Emby apps and server are up to date, have emby premiere if that matters any. Edited January 22, 2023 by citizenkraft Add more logs. Link to comment Share on other sites More sharing options...
speechles 1920 Posted January 22, 2023 Share Posted January 22, 2023 What plugins do you have installed? 2023-01-21 03:38:22.750 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 0 - Succeeded 2023-01-21 03:38:22.760 Info MediaProbeManager: ProcessRun 'ffprobe' Execute: C:\Users\Dustin-Setup\AppData\Roaming\Emby-Server\system\ffprobe.exe -i file:"F:\TV\Friends.Complete.Series.720p.BluRay.2CH.x265.HEVC-PSA\S03\Friends.S03E16.The.One.the.Morning.After.720p.BluRay.2CH.x265.HEVC-PSA.mkv" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data 2023-01-21 03:38:22.818 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 0 - Succeeded 2023-01-21 03:38:22.821 Info MediaProbeManager: ProcessRun 'ffprobe' Execute: C:\Users\Dustin-Setup\AppData\Roaming\Emby-Server\system\ffprobe.exe -i file:"F:\TV\Friends.Complete.Series.720p.BluRay.2CH.x265.HEVC-PSA\S03\Friends.S03E17.The.One.Without.the.Ski.Trip.720p.BluRay.2CH.x265.HEVC-PSA.mkv" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data 2023-01-21 03:38:22.897 Info MediaProbeManager: ProcessRun 'ffprobe' Process exited with code 0 - Succeeded Your Emby server might be a little busy doing this extra process. That might be all this is. During that process your Emby server may get very slow depending on the CPU burden thrown upon it. Link to comment Share on other sites More sharing options...
Luke 37118 Posted January 23, 2023 Share Posted January 23, 2023 @citizenkraft can you try running the database vacuum as well as increasing the database cache in the server database options? Please let us know if that helps. Thanks. Link to comment Share on other sites More sharing options...
citizenkraft 2 Posted January 23, 2023 Author Share Posted January 23, 2023 @Luke I had ran the database vacuum before with the same results, I just now increased the cache to 192MB but I am unable to test. Yesterday when I was installing another roku for my impending mother in laws visit downstairs I noticed the problem was not occurring on the new Emby user account I set up for her. I created a new account for myself and got rid of the problematic one. So whatever the issue was, it was tied in with the user data and can be considered resolved with a variant on the ole "turn it off and back on again" @speechles My Plugins are all stock except for addicted for when I was trying to improve the subtitles. 1 Link to comment Share on other sites More sharing options...
lstethem 0 Posted October 25, 2023 Share Posted October 25, 2023 This is happening to my TV as well. TCL Roku ver. 12.0.0 Build: 4182 with the Emby app ver. 4.0 Build 85. I bet it froze and restarted 20 times before I gave up. It was working fine and this was a rarity before last tonight. Any info on what caused this? Link to comment Share on other sites More sharing options...
ebr 14935 Posted October 25, 2023 Share Posted October 25, 2023 2 hours ago, lstethem said: This is happening to my TV as well. TCL Roku ver. 12.0.0 Build: 4182 with the Emby app ver. 4.0 Build 85. I bet it froze and restarted 20 times before I gave up. It was working fine and this was a rarity before last tonight. Any info on what caused this? Hi. This is a very old post but did your Roku just do a firmware update? Link to comment Share on other sites More sharing options...
citizenkraft 2 Posted October 25, 2023 Author Share Posted October 25, 2023 @ebri ended up completely installing emby and reinstalling. Cleared everything up just lost some time correcting some things in my library. My thought is that the database got corrupted in some way that was causing the slowness and crashes, as deleting emby without reading the database didn't fix it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now