Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start server service #313

Closed
tjpeel opened this issue Dec 5, 2013 · 5 comments
Closed

Cannot start server service #313

tjpeel opened this issue Dec 5, 2013 · 5 comments

Comments

@tjpeel
Copy link

tjpeel commented Dec 5, 2013

Installed 2.0.2.808 server.
Running on portal address: http://localhost:81/octopus
Service starts and then crashes.
Running Windows 8.1 (dev machine).
Event log:

2013-12-05 18:57:22.5820 ERROR The process cannot access the file because it is being used by another process
System.Net.HttpListenerException (0x80004005): The process cannot access the file because it is being used by another process
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at Nancy.Hosting.Self.NancyHost.TryStartListener()
at Nancy.Hosting.Self.NancyHost.StartListener()
at Nancy.Hosting.Self.NancyHost.Start()
at Octopus.Server.Web.WebServerInitializer.Start() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Server\Web\WebServerInitializer.cs:line 45
at Octopus.Server.OctopusServerEngine.Start() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Server\OctopusServerEngine.cs:line 47
at Octopus.Server.Commands.RunCommand.Start() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Server\Commands\RunCommand.cs:line 21
at Octopus.Shared.Startup.WindowsServiceHost.<>c__DisplayClass2.b__0() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Startup\WindowsServiceHost.cs:line 20
at Octopus.Shared.Startup.WindowsServiceAdapter.RunService() in c:\TeamCity\buildAgent\work\1116bd9da9e239fd\source\Octopus.Shared\Startup\WindowsServiceAdapter.cs:line 44

Application: Octopus.Server.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Net.HttpListenerException
Stack:
at Octopus.Shared.Startup.WindowsServiceAdapter.RunService()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()

Faulting application name: Octopus.Server.exe, version: 2.0.2.808, time stamp: 0x529c6dc0
Faulting module name: KERNELBASE.dll, version: 6.3.9600.16408, time stamp: 0x523d557d
Exception code: 0xe0434352
Fault offset: 0x000000000000ab78
Faulting process ID: 0x43c
Faulting application start time: 0x01cef1ebd3d82841
Faulting application path: C:\Program Files (x86)\Octopus 2.0\Server\Octopus.Server.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report ID: 1371a7be-5ddf-11e3-8262-b8e8563a9d0b
Faulting package full name:
Faulting package-relative application ID:

@nblumhardt
Copy link
Contributor

Hi, thanks for the report!

It is possible there's already an application listening on port 81. Can you please run netstat -o -n -a as an admin user on the machine? You'll get output like:

C:\Windows\system32>netstat -o -n -a

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       1004
  TCP    0.0.0.0:443            0.0.0.0:0              LISTENING       6332
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
  ...

What we're looking for is an entry (it may be some way down the list) with a Local Address ending in :81. The PID in the rightmost column will tell you which Windows process is using the port. You can find this in Task Manager by right-clicking the columns and selecting to show PID.

Hope this helps, we may be able to improve this experience via #277

@nblumhardt
Copy link
Contributor

Added exception help via #277 - if the suggestion above doesn't help with this please reopen. Thanks!

@tjpeel
Copy link
Author

tjpeel commented Dec 16, 2013

Hi Nicholas - yes, my bad, I had something else running on that port.

Thanks

@nblumhardt
Copy link
Contributor

Glad it is sorted out, thanks for the follow-up.

@lock
Copy link

lock bot commented Nov 29, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. If you think you've found a related issue, please contact our support team so we can triage your issue, and make sure it's handled appropriately.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants