Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
ServletExec Self-Help: FAQ
Back to Search >  Back to Search Results

Faq ID 185
Product ServletExec
Category Administration, Miscellaneous
Question When I start a ServletExec AS Instance, I get " socket already in use". What is wrong?
Answer An SE AS instance listens on a port. Typcially this is port 8888. It sounds like ServletExec (or something else) is already running and using that port.

If you previously attempted to stop ServletExec, perhaps ServletExec didn't actually stop. Some possible reasons for this include:

  • No matter which version of SE AS you are using, the most common cause for this is that the StopServletExec batch/script is not configured to use the correct port. So it's not sending the stop message to the port that the SE AS Instance is using. So your instance never receives the stop command. So it just stays up and running. If you then try to start it again, you can expect this Exception. The Windows OS can make this issue harder to detect due to the following facts:
    When you start or stop an SE AS Service via the Windows Services Dialog, the Windows Service mechanism simply calls StartServletExec.bat or StopServletExec.bat under the covers, and then says "OK, I'm done... I've called the appropriate batch file... so I'll now report that that service is started or stopped without actually checking if that's truly the case."
    If either of those scripts fails to do it's job correctly, then the Windows Services dialog will be lying to you... telling you that the service is stopped when really it's not (or vice-versa). The Task Manager might be used to confirm this (use it to see if java.exe is still running) of course if you have more than 1 java.exe going on your machine that's not too helpful. You could use your browser to try to request something from SE to confirm whether SE is truly up or truly down.

    If you suspect that your StopServletExec script might not be using the correct port, then you could try confirming it by doing this:
    Open a DOS command window and cd down to the folder that contains the StopServletExec script for you ASI. Then invoke that script by typing it with the keyboard >StopServletExec.bat
    If an error occurs, then you'll see it there in the DOS window.
    If you need to configure the stop script to use the correct port then use the -port option (see the SE User Guide for more details about that and other options available in that script).

    SE FAQ #186 has a NOTE that gives other scenarios of the Windows Services Dialog lying to you.

  • If using SE 4.2 or older, perhaps you have entered a username and password for the ServletExec Admin and you didn't edit your StopServletExec batch/script to reflect this information. You will need to specify the username/password in the StopServletExec batch/script file by using:
    -admin <username/password>.

    Only then will StopServletExec actually stop ServletExec, thus allowing StartServletExec to start it again without issue.
    Note: The -admin option is only used with versions of SE AS prior to SE AS 5.0.
    For more information about that option, look in the SE AS chapter (for your operating system) in the appropriate SE Installation Guide.
    Specifically the section that discusses "StopServletExec".
    For example (for Unix) in the SE 4.1.1 Installation Guide, that is table #10 of section Here are more examples:
    • For SE AS 4.2 on Windows, look at table #7 in the SE 4.2 Installation Guide, section
    • For SE AS 4.2 on Unix, look at table #10 in the SE 4.2 Installation Guide, section

    Basically just look in the appropriate Installation Guide.

company media information terms of use privacy policy contact us