Jump to content

Unhandled exception / media browser shutdown in error


Recommended Posts

Posted (edited)

I woke up this morning and woke my htpc/server and media browser server was shutdown with the following error......

 

Unhandled exception: only one usage of each socket address (protocol/ network address/ port) is normally permitted.

 

Media Browser Server Version 3.0.5171.19958

 

Has anyone seen this error and have a fix.

post-446-0-98126000-1393801999_thumb.jpg

Edited by pd veeps
Koleckai Silvestri
Posted

I've seen the error. Don't have a fix. Do you have an unhandled exception error log in your %appdata%/MediaBrowser-Server/logs folder?

Posted

I've seen the error. Don't have a fix. Do you have an unhandled exception error log in your %appdata%/MediaBrowser-Server/logs folder?

I'll check later tonight.

Posted (edited)

There are 2 logs. One at 9:02:47 and the second and 9:02:54 this morning.

 

"

Cannot access a disposed object.

Object name: 'System.Net.Sockets.Socket'.

System.ObjectDisposedException

at System.Net.Sockets.Socket.BeginAccept(Socket acceptSocket, Int32 receiveSize, AsyncCallback callback, Object state)

at System.Net.Sockets.Socket.BeginAccept(AsyncCallback callback, Object state)

at System.Net.Sockets.TcpListener.BeginAcceptTcpClient(AsyncCallback callback, Object state)

at Alchemy.TcpServer.Listen(Object state)

at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)

at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()

at System.Threading.ThreadPoolWorkQueue.Dispatch()

at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

"

 

"

Only one usage of each socket address (protocol/network address/port) is normally permitted

System.Net.Sockets.SocketException

at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)

at System.Net.Sockets.Socket.Bind(EndPoint localEP)

at System.Net.Sockets.TcpListener.Start(Int32 backlog)

at System.Net.Sockets.TcpListener.Start()

at Alchemy.TcpServer.Listen(Object state)

at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)

at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()

at System.Threading.ThreadPoolWorkQueue.Dispatch()

at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

"

Edited by pd veeps
Posted

There is no permanent fix (as yet), it's just a timing issue I believe.

 

Basically the server uses the same socket and if it doesn't die when the server is closed, then it can't re-use it when it starts again.

 

Might be worth closing MB Server before sleeping and starting on wake-up.

 

I'm sure Luke will offer a better explanation than I have ;)

Posted

There is no permanent fix (as yet), it's just a timing issue I believe.

 

Basically the server uses the same socket and if it doesn't die when the server is closed, then it can't re-use it when it starts again.

 

Might be worth closing MB Server before sleeping and starting on wake-up.

 

I'm sure Luke will offer a better explanation than I have ;)

I thought maybe it wS an issue with the server update as I've never had the issue before.

Shutting down the server before sleeping won't work for my setup. The server is on the same machine as my main htpc and can live with it if it only occurs intermittently. I auto sleep the pc after 30 min and the roku in the bedroom wakes the pc when media browser is opened.

 

I restarted the pc and slept and woke it a few tine last night and once this morning without the error. I'll see if it happens again.

Posted

Concur. I get this every time I start MBS (after upgrading to this version - 3.0.5171.19958). Not a random timing issue as I receive it every time. If I let this window hang there, server keeps running; if I "OK" or just close it, server dies.

Posted

Concur. I get this every time I start MBS (after upgrading to this version - 3.0.5171.19958). Not a random timing issue as I receive it every time. If I let this window hang there, server keeps running; if I "OK" or just close it, server dies.

Glad it's not only me.

Posted

So, any idea or solution? This problem is still very much there (as mentioned, for me it happens every time MBS is started).

Koleckai Silvestri
Posted

Have you tried reinstalling the server completely from the web download?

Posted

I think I might have the same problem.

 

I installed MB3 two days ago - as a wmc replacement for our new xbox1 - and it worked fine for about a day. Then it just stopped.

 

Now on the xbox1 there's just a white screen and on the PC it just stalls trying to open the dashboard.

 

MediaBrowser.ServerApplication.exe*32 process is running. MediaBrowser service is Stopped and can't be started. Says "The operation could not be completed. Access is denied". If I go into services admin it says the startup type is manual but I try to start it I get "Windows could not start the Media Browser service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion." If I try running the .exe I get multiple error windows (all the same) the same as the OP.

Posted

You cannot run both the actual application and the service.  You have to choose one or the other.  You said the application is running so you need to stop it before you can start the service.

Posted (edited)

You cannot run both the actual application and the service.  You have to choose one or the other.  You said the application is running so you need to stop it before you can start the service.

 

Yes I had read that. But unable to find any fix online I resort to trying to trying all sorts of things.

 

It shouldn't be the cause of this problem should it?

 

Would you recommend I stop the process and start the service?

Edited by Greeno
Posted

If you want to run the service, then you must shut down the other process.

 

Also, be sure it isn't set to run automatically at startup.

 

If you don't want to run the service, then try disabling it in the Services setup in Windows.

Posted

You seem to have completely missed the point of the OP and my reply.

 

I couldn't care less whether it runs as a process or a service. The problem isn't that I'm trying to run it simultaneously as a process and a service. The problem is it isn't running, period.

 

I just tried ending the process and running the .exe. Bingo it works again.

 

This doesn't explain why it stopped and I wouldn't be surprised to see it stall again. But at least I can make it work again when it does.

Koleckai Silvestri
Posted

Need the log files from when it stops. If you go to %appdata%/MediaBrowser-Server/Logs you should see the server logs when it stops working, get the last log file and post it to here or to http://pasteb.in. Once the log is obtained, the developers can see the problem with more detail.

Posted

Have you tried reinstalling the server completely from the web download?

 

I just tried, and failed, and by that I found the root of the issue (in my case at least).

After the installer failed, I investigated what was going on and found an old instance of the server process still lurking there. Now the error message makes perfect sense too :-) After killing that process, and restarting server, all is well. Thanks. (I suppose I should have noticed this sooner.)

  • Like 1
Koleckai Silvestri
Posted

Glad you found the issue in your case. Sometimes it takes another pair of eyes to spot something, so to speak.

Posted

You seem to have completely missed the point of the OP and my reply.

 

I couldn't care less whether it runs as a process or a service. The problem isn't that I'm trying to run it simultaneously as a process and a service. The problem is it isn't running, period.

 

I just tried ending the process and running the .exe. Bingo it works again.

 

This doesn't explain why it stopped and I wouldn't be surprised to see it stall again. But at least I can make it work again when it does.

 

I was just explaining why the service wouldn't start at that particular moment.  You stated you saw the process running and that the service would not start and the above is why that is the case - you cannot run the server twice in any form.

 

So, the point of all of that was just to try and tell you how to configure things for the future depending on how you want the program to run.  If you do what I said, then it should mitigate this issue in the future.  If you want the normal app, if you disable the service then it will never get started and potentially cause this problem.  If you want the service, you need to be sure you uncheck "Run server at startup".

  • 3 months later...
fuzzypiglet
Posted (edited)

Ignore this I think i fixed my issue

Edited by fuzzypiglet
  • 9 months later...
turntablejunky
Posted

Guys, I'm having this same issue ever since this thing got updated to EMBY.

 

Not sure what the difference is between the 'service' and the 'other process' (as ebr had stated).  Nothing has changed in my setup, except updating to EMBY.

 

Please help, so I can watch movies again.

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...