Unable to restart your Germain environment? You may need to determine what program is using the port that Germain is configured to use.

Discovering which Application is Holding the Port

Determine what program is using the port that you need.

You can use the following commands ( Replace the value in the square brackets “[portnumber]” ):

Linux:

netstat -apn | grep [portnumber]
BASH

Windows Command Line

First:

netstat -ano -p tcp | find “[portnumber]”
POWERSHELL

Then:

 tasklist /fi "pid eq [processid]"
POWERSHELL

Windows PowerShell (Provides process name too):

Try { (Get-NetTCPConnection -LocalPort [portnumber] | Select LocalAddress,LocalPort,state,@{Name="PID";Expression={($_.OwningProcess)}},@{Name="Process";Expression={(Get-Process -Id $_.OwningProcess).ProcessName}} | Sort -Property LocalPort | Format-Table ) } Catch { Write-Host "Port not in use" -ForegroundColor Red }
POWERSHELL

Determining Germain's Port

To determine what port Germain is using, go to …/[tomcat_home]/config/server.xml

Find the sections covering connection by searching for: “<Connector”

You will get a few hit, but you are interested int he ones that look like these:

(Near line 69)

    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
			   maxPostSize="52428800"
               maxHttpHeaderSize="65536"
               redirectPort="8443" />
XML

(Near Line 90)

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true">
        <SSLHostConfig>
            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
XML