Jump to content


Photo

Emby 3.5.3 Web Socket error


  • Please log in to reply
35 replies to this topic

#21 ddurdle OFFLINE  

ddurdle

    Advanced Member

  • Members
  • 316 posts
  • Local time: 02:15 PM

Posted 03 January 2019 - 09:51 AM

Please share your wonderful monitor.

Sent from my SM-G965W using Tapatalk

 

You can adapt it from here:

https://github.com/d...monitor_emby.pl

 

You would need these two files in the same directory:

https://github.com/d...ster/crawler.pm

https://github.com/d...r/common.config

 

It's not doing anything sophisticated.  Simply looks for the websocket error in the embyserver.txt log and then restart the instance if it finds it.  There is also logic in the same script that monitors responsiveness of the instance and restarts it if it is not responding.  I have the script take an optional webhook to push out a notification so I can track when these events happen.



#22 borygo77 OFFLINE  

borygo77

    Member

  • Members
  • 18 posts
  • Local time: 07:15 PM

Posted 12 July 2019 - 04:58 PM

Mind if I ask how can I use this script ? 



#23 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134369 posts
  • Local time: 02:15 PM

Posted 12 July 2019 - 05:00 PM

Mind if I ask how can I use this script ? 

 

Hi there, what are you trying to accomplish?



#24 borygo77 OFFLINE  

borygo77

    Member

  • Members
  • 18 posts
  • Local time: 07:15 PM

Posted 12 July 2019 - 05:13 PM

Hi Luke! Thank you for your quick response! The problem I'm facing is this error 

 

2019-07-12 04:46:47.639 Info HttpServer: HTTP HEAD http://192.168.1.111...9a6dcef039e4253. $

2019-07-12 04:46:47.721 Info HttpServer: HTTP Response 200 to 192.168.1.112. Time: 82ms. http://192.168.1.111...rmat=original&$
2019-07-12 04:46:47.735 Info HttpServer: HTTP HEAD http://192.168.1.111...d0afc31099985f4. $
2019-07-12 04:46:47.814 Info HttpServer: HTTP Response 200 to 192.168.1.112. Time: 79ms. http://192.168.1.111...rmat=original&$
2019-07-12 04:46:52.322 Info HttpServer: HTTP HEAD http://192.168.1.111...80255b4595c5397. $
2019-07-12 04:46:52.324 Info HttpServer: HTTP Response 200 to 192.168.1.112. Time: 2ms. http://192.168.1.111...mat=original&T$
2019-07-12 04:46:52.342 Info HttpServer: HTTP HEAD http://192.168.1.111...ee9635ab478a222. $
2019-07-12 04:46:52.408 Info HttpServer: HTTP Response 200 to 192.168.1.112. Time: 65ms. http://192.168.1.111...rmat=original&$
2019-07-12 04:46:52.548 Error HttpServer: Error processing request
        *** Error Report ***
        Version: 3.5.3.0
        Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepack$
        Operating system: Unix 4.4.0.154
        64-Bit OS: True
        64-Bit Process: True
        User Interactive: True
        Processor count: 2
        Program data path: /var/lib/emby
        Application directory: /opt/emby-server/system
        MediaBrowser.Common.Extensions.ResourceNotFoundException: Item 3b7cd99bc922f78ff6ec2f45fd86031c not found.
           at MediaBrowser.Api.Images.ImageService.GetImage(ImageRequest request, Guid itemId, BaseItem item, Boolean isHeadRequest)
           at Emby.Server.Implementations.Services.ServiceExecGeneral.Execute(Type serviceType, IRequest request, Object instance, Object requestDto, String requestName)
           at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req)
           at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, ILogger logger, String operationName, Cance$
           at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken)
        MediaBrowser.Common.Extensions.ResourceNotFoundException
           at MediaBrowser.Api.Images.ImageService.GetImage(ImageRequest request, Guid itemId, BaseItem item, Boolean isHeadRequest)
           at Emby.Server.Implementations.Services.ServiceExecGeneral.Execute(Type serviceType, IRequest request, Object instance, Object requestDto, String requestName)
           at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req)
           at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, ILogger logger, String operationName, Cance$
           at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IHttpRequest httpReq, String urlString, String host, String localPath, CancellationToken cancellationToken)
 
2019-07-12 04:46:52.549 Info HttpServer: HTTP Response 404 to 192.168.1.112. Time: 5247ms (slow). http://192.168.1.111...mary/0?Format=$
2019-07-12 04:46:58.010 Info HttpServer: HTTP HEAD http://192.168.1.111...f0fc3b946bb472c. $
2019-07-12 04:46:58.093 Info HttpServer: HTTP Response 200 to 192.168.1.112. Time: 83ms. http://192.168.1.111...rmat=original&$
2019-07-12 04:46:58.103 Info HttpServer: HTTP HEAD http://192.168.1.111...b9cd17c1810d162. $
2019-07-12 04:46:58.107 Info HttpServer: HTTP Response 200 to 192.168.1.112. Time: 4ms. http://192.168.1.111...mat=original&T$
2019-07-12 04:46:58.118 Info HttpServer: HTTP HEAD http://192.168.1.111...10cd8db2d7a3c. 

 

 

 

2019-07-12 07:31:18.083 Error HttpServer: WebSocket ConnectionClosedPrematurely

2019-07-12 07:35:06.838 Info TaskManager: IntervalTrigger fired for task: Import playstates from Trakt.tv
2019-07-12 07:35:06.838 Info TaskManager: Queueing task SyncFromTraktTask
2019-07-12 07:35:06.839 Info TaskManager: Executing Import playstates from Trakt.tv
2019-07-12 07:35:06.839 Info HttpClient: GET https://api.trakt.tv.../watched/movies
2019-07-12 07:35:07.297 Info HttpClient: GET https://api.trakt.tv...c/watched/shows
2019-07-12 07:35:07.637 Info Trakt: Trakt.tv watched Movies count = 657
2019-07-12 07:35:07.638 Info Trakt: Trakt.tv watched Shows count = 114
2019-07-12 07:35:08.401 Info TaskManager: Import playstates from Trakt.tv Completed after 0 minute(s) and 1 seconds
2019-07-12 07:35:08.419 Info TaskManager: ExecuteQueuedTasks
2019-07-12 07:39:29.259 Info HttpServer: HTTP GET http://192.168.1.111...er,Taglines,Lo$
2019-07-12 07:39:29.642 Info HttpServer: HTTP Response 200 to 192.168.1.113. Time: 383ms. http://192.168.1.111...ath,Genres,Sor$
2019-07-12 07:43:27.271 Error HttpServer: WebSocket ConnectionClosedPrematurely
2019-07-12 07:43:27.484 Error HttpServer: Error closing web socket response
        *** Error Report ***
        Version: 3.5.3.0
        Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepack$
        Operating system: Unix 4.4.0.154
        64-Bit OS: True
        64-Bit Process: True
        User Interactive: True
        Processor count: 2
        Program data path: /var/lib/emby
        Application directory: /opt/emby-server/system
        System.Net.Sockets.SocketException (32): Broken pipe
           at SocketHttpListener.SocketStream.Write(Byte[] buffer, Int32 offset, Int32 count)
           at SocketHttpListener.Net.HttpResponseStream.DisposeCore()
           at SocketHttpListener.Net.HttpResponseStream.Dispose(Boolean disposing)
           at SocketHttpListener.Net.HttpConnection.Close(Boolean force)
           at EmbyServer.SocketSharp.WebSocketSharpListener.TryClose(HttpListenerContext ctx, Int32 statusCode)
        System.Net.Sockets.SocketException
           at SocketHttpListener.SocketStream.Write(Byte[] buffer, Int32 offset, Int32 count)
           at SocketHttpListener.Net.HttpResponseStream.DisposeCore()
           at SocketHttpListener.Net.HttpResponseStream.Dispose(Boolean disposing)
           at SocketHttpListener.Net.HttpConnection.Close(Boolean force)
           at EmbyServer.SocketSharp.WebSocketSharpListener.TryClose(HttpListenerContext ctx, Int32 statusCode)
 
2019-07-12 07:43:43.914 Info HttpServer: HTTP HEAD http://192.168.1.111...82498c7bc5667e$
2019-07-12 07:43:43.920 Info HttpServer: HTTP Response 200 to 192.168.1.113. Time: 6ms. http://192.168.1.111...bleImageEnhanc$
2019-07-12 07:43:43.967 Info HttpServer: HTTP HEAD http://192.168.1.111...245d74a3c1669a$
2019-07-12 07:43:44.046 Info HttpServer: HTTP HEAD http://192.168.1.111...245d74a3c1669a$
2019-07-12 07:43:44.555 Info HttpServer: HTTP Response 200 to 192.168.1.113. Time: 588ms. http://192.168.1.111...nableImageEnha$
2019-07-12 07:43:44.555 Info HttpServer: HTTP Response 200 to 192.168.1.113. Time: 509ms. http://192.168.1.111...nableImageEnha$
2019-07-12 07:43:44.566 Info HttpServer: HTTP HEAD http://192.168.1.111...aad40e280255b4$
2019-07-12 07:43:44.574 Info HttpServer: HTTP HEAD http://192.168.1.111...aad40e280255b4$
2019-07-12 07:43:44.709 Info HttpServer: HTTP Response 200 to 192.168.1.113. Time: 135ms. http://192.168.1.111...?EnableImageEnh

 

 

As you can see it happens quite often. Emby eats my memory really bad ;)

 

5d28f7fe241f2_1.png

 

 

 

Got 4GB memory in my server and nearly all taken by emby.... Not sure if this error is the reason ? 


ID	Owner	Size	Command
1227	emby	3.39 GB	/opt/emby-server/system/EmbyServer -programdata /var/lib/emby -ffmpeg /opt/emby- ...

Edited by borygo77, 12 July 2019 - 05:18 PM.


#25 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134369 posts
  • Local time: 02:15 PM

Posted 12 July 2019 - 06:00 PM

Can you install the latest version of emby server?

#26 borygo77 OFFLINE  

borygo77

    Member

  • Members
  • 18 posts
  • Local time: 07:15 PM

Posted 12 July 2019 - 06:03 PM

Had this installed Luke but came back to 3.5.3. Hate the way 4.1 is sorting TV Shows... Can't say if 4.1 had same error.... never checked :( 



#27 borygo77 OFFLINE  

borygo77

    Member

  • Members
  • 18 posts
  • Local time: 07:15 PM

Posted 12 July 2019 - 06:27 PM

This is my log right after restart..... Will you have a look what's wrong with it please ? 

Attached Files



#28 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 15035 posts
  • Local time: 11:15 AM
  • LocationWashington State

Posted 12 July 2019 - 06:43 PM

This is my log right after restart..... Will you have a look what's wrong with it please ? 

 

Might not be related but you have a plugin issue since you have changed Emby versions as they are not compatible with previous version (upgrading/downgrading).  Unfortunately can't tell which plugins these are, so you will need to uninstall and reinstall plugins.

Error App: LoaderException: Could not load file or assembly


#29 borygo77 OFFLINE  

borygo77

    Member

  • Members
  • 18 posts
  • Local time: 07:15 PM

Posted 12 July 2019 - 06:45 PM

Seen it in log and was wondering if you'll be able to solve it somehow :D 



#30 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 15035 posts
  • Local time: 11:15 AM
  • LocationWashington State

Posted 12 July 2019 - 06:55 PM

Seen it in log and was wondering if you'll be able to solve it somehow :D

 

In 4.2+ it will handle server installed plugins better but all additional users added plugins will require manual intervention.  I use the Server Configuration Backup plugin so the plugin folder is backed up so I am able restore from backup if ever needing to do a downgrade version like this. I run the task to make a manual backup and rename the folder to that version and restore specific sections that were backed up.

5d290f740aae9_backup.jpg



#31 borygo77 OFFLINE  

borygo77

    Member

  • Members
  • 18 posts
  • Local time: 07:15 PM

Posted 12 July 2019 - 06:57 PM

Does 4.2+ has fixed TV Shows sorting problem I had with 4.1 ? ;) 



#32 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 15035 posts
  • Local time: 11:15 AM
  • LocationWashington State

Posted 12 July 2019 - 07:01 PM

Does 4.2+ has fixed TV Shows sorting problem I had with 4.1 ? ;)

 

Sorry is this issue discussed somewhere?



#33 borygo77 OFFLINE  

borygo77

    Member

  • Members
  • 18 posts
  • Local time: 07:15 PM

Posted 12 July 2019 - 07:26 PM

Well can't find it now as it was 2 months I've tried 4.1... There is some change in emby server 4 to folder structure causing mess in my library :( 

It's perfect in 3.5.3...



#34 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 15035 posts
  • Local time: 11:15 AM
  • LocationWashington State

Posted 12 July 2019 - 07:30 PM

Well can't find it now as it was 2 months I've tried 4.1... There is some change in emby server 4 to folder structure causing mess in my library :(

It's perfect in 3.5.3...

 

There were a lot of changes to folder detection in TV and Mixed content.  But you would have to go over your issues with some specific examples.  But I would do it in a new topic if you can't find a topic that applies.



#35 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134369 posts
  • Local time: 02:15 PM

Posted 12 July 2019 - 09:12 PM

There are some fixes in 4.2 for non standard folder structures, but there shouldn't be any issues in 4.1 with everything listed in the TV naming wiki.

#36 ddurdle OFFLINE  

ddurdle

    Advanced Member

  • Members
  • 316 posts
  • Local time: 02:15 PM

Posted 22 July 2019 - 12:22 AM

The websocket issue doesn't exist on 4.1 and 4.2 so I'd recommend upgrading.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users