Jump to content

Port in Use - Unhandled Exception on Server Launch


walshy002000

Recommended Posts

walshy002000

Hi Everyone,

 

First off, apologies if this is a bit brash, the forum just lost my last full post about this :/

 

Anyhow, I've running the beta (3.0.5233.40306), everything has been running smooth until last few weeks when it's saying a port is in use when starting MB server. Funny thing is, if I don't close the error dialog and leave it open, everything works fine (web and accessing via MB classic), so I'm not sure what port isn't working. MB server is a fairly vanilla install with ServerWMC and a couple of other plugins I've been using for ages (Trailers, Trakt, etc.).

 

I've killed every process/service I can (except for VMWare workstation and SVN server services), and it still claims a port is in use. The web GUI says it's using ports 8096 and 8945, both of which are free when I launch it. The only real werid thing I've noticed is that one MB process/service is running when I've closed everything and I can't kill it:

 

MediaBrowser.ServerApplication.exe:9996 UDP Morpheus:ssdp *:*

 

TCPView can't find the process, and I can't terminate the connection (I request the process and connection to close and nothing happens). I've done a reinstall and multiple restarts with no luck.

 

I've attached the MB server log and my TCP View log with everything (VMWare and SVN aside) closed.

 

Anyone have any ideas?

 

log.txt

 

unhandled_4d577e32-3e86-4cb8-8581-fd6ae79d1f77.zip

 

Edit: Forgot to put version number in

Edited by walshy002000
Link to comment
Share on other sites

ginjaninja

i got the same unhandled error in logs for the 1st time of 03/05. Only happened once. never experienced your symptoms though.

 

not any help i suspect, but i thought i'd mention it.

MB also uses UDP 7359 for server discovery broadcasts

is UDP 9996 used by a plugin, have you tried disabling all plugins.

Edited by ginjaninja
Link to comment
Share on other sites

Happy2Play

I have noticed with this build (3.0.5233.40306) the process hangs around for anywhere from 1 minute to 5 minutes before dying, when MBS is closed or the service is stopped.

Link to comment
Share on other sites

walshy002000

Thanks guys. Can't see anything using either of those UDP ports. The weird thing is, it will do this even after a reboot, so all ports should be open (instead of pending closure from just a shutdown of MBS).

 

How can I start MBS without loading the plugins? Couldn't find anything online.

Link to comment
Share on other sites

ginjaninja

Thanks guys. Can't see anything using either of those UDP ports. The weird thing is, it will do this even after a reboot, so all ports should be open (instead of pending closure from just a shutdown of MBS).

 

How can I start MBS without loading the plugins? Couldn't find anything online.

Theres no quick n easy way I am aware of. You will need to remove plugins, test, then add back later. Normally plugins persistently store their configuration and come back ok.

 

Sent from my GT-I9505 using Tapatalk

Link to comment
Share on other sites

  • 1 month later...
walshy002000

Sorry about the delayed response, just had our first son recently :)

 

Anyhow, still can't get it working. Tried complete uninstall and new install (beta 3.0.5287.19943 reconfiguring everything so no settings we re-used), no plugins, tried to run as service (crashes (presumably because of the same error). Even tried changing the ports, and I still get the error, which to me, says it's actually MB trying to create sockets that have already been created by the same MB instance, which is kind of hard to troubleshoot :(

Link to comment
Share on other sites

I've seen this issue happen on users machine for a few different reasons - other app using the port, malware installed, bad entries in system hosts file, or some kind of UAC/permissions issue where we're not able to get authorization from windows to use the port.

Link to comment
Share on other sites

walshy002000

Thanks Luke, I've checked the relevant ports are free when MB is not running (using TCPView) and they're all free. My hosts file has no entries in it and UAC is completely disabled. Malware scans show nothing (and since this is my server that never actually does much this is very remote).

 

Looking at the log excerpt below, it doesn't actually tell me what port/resource is causing the problem. Can someone else look in this part of their logs and tell me what their log shows MB is trying to do after starting the web server?

 

2014-06-25 11:12:58.5559 Info - HttpServer: Adding HttpListener prefix http://+:8096/mediabrowser/
2014-06-25 11:12:58.5715 Info - HttpServer: Starting HttpListner
2014-06-25 11:12:58.5715 Info - App: Starting Alchemy web socket server on port 8945
2014-06-25 11:12:58.5715 Info - App: Alchemy Web Socket Server started
2014-06-25 11:12:58.6027 Error - Main: UnhandledException
 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.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
 
2014-06-25 11:12:58.8367 Info - App: Core startup complete
2014-06-25 11:12:58.8679 Info - Dlna: SSDP service started
2014-06-25 11:12:58.8679 Debug - Dlna: Starting alive notifier

Link to comment
Share on other sites

leedavies

I've started seeing this problem regularly on my MB3 server.  Sometimes my Xbox extender won't connect to the server so I check the Windows box and the icon isn't there in the systray.  I start the MB3 server and get told the port is in use.  There's normally a hung MediaBrowserServer task that needs killing.

Link to comment
Share on other sites

thousandbuckle

I am having this problem with one of my PC's now as stated in above posts. App on the laptop was finding the server just fine until a month or so ago. I can specify the IP address and it will find it but it does not happen on its own. Would really like to figure out what is broken and fix it in case it shows up on other clients.

 

PC is on same LAN Network, same IP scheme and subnet. Can ping the server from the client as well. Checked LMHost files and nothing is in there except stock values from Microsoft.

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