Error - Multiple GITORA instances on same windows host

Hi,
I have installed GITORA instance 1 in windows host and on the same host i have tried to install second instance but tomcat does not start up for the second instance dumping errors.

Would you please advise me what is required to fix this issue ? Please see catalina logs below for your reference.

Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/7.0.69
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Apr 11 2016 07:57:09 UTC
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 7.0.69.0
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 10
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 10.0
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jdk1.8.0_191\jre
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_191-b12
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.config.file=D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\conf\logging.properties
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\endorsed
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\temp
Jun 20, 2019 6:18:27 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Xmx256M
Jun 20, 2019 6:18:27 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_191\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Oracle\product\11.2.0\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\PuTTY;C:\Program Files (x86)\Brackets\command;C:\Program Files\TortoiseGit\bin;D:\Program Files\apache-ant-1.9.13\bin;C:\Program Files\CVArchiverAddin;C:\Program Files\Git\cmd;D:\Program Files\python-3.7.3;C:\Users\sundaramurthym\AppData\Local\Microsoft\WindowsApps;C:\Users\sundaramurthym\AppData\Local\atom\bin;D:\Program Files\apache-ant-1.9.13\bin;;D:\Program Files\PyCharm Community Edition 2019.1.3\bin;;D:\Program Files\Gerger\GitoraServer\Git\bin;.
Jun 20, 2019 6:18:28 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [“http-bio-8088”]
Jun 20, 2019 6:18:28 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler [“ajp-bio-8009”]
Jun 20, 2019 6:18:28 PM org.apache.coyote.AbstractProtocol init
SEVERE: Failed to initialize end point associated with ProtocolHandler [“ajp-bio-8009”]
java.net.BindException: Address already in use: JVM_Bind :8009
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:413)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:650)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:560)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:838)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:642)
at org.apache.catalina.startup.Catalina.load(Catalina.java:667)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:253)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(DualStackPlainSocketImpl.java:106)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.(ServerSocket.java:237)
at java.net.ServerSocket.(ServerSocket.java:181)
at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:49)
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:400)
… 16 more

Jun 20, 2019 6:18:28 PM org.apache.catalina.core.StandardService initInternal
SEVERE: Failed to initialize connector [Connector[AJP/1.3-8009]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[AJP/1.3-8009]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:560)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:838)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:642)
at org.apache.catalina.startup.Catalina.load(Catalina.java:667)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:253)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:980)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
… 12 more
Caused by: java.net.BindException: Address already in use: JVM_Bind :8009
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:413)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:650)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
… 13 more
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(DualStackPlainSocketImpl.java:106)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.(ServerSocket.java:237)
at java.net.ServerSocket.(ServerSocket.java:181)
at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:49)
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:400)
… 16 more

Jun 20, 2019 6:18:28 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 908 ms
Jun 20, 2019 6:18:28 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jun 20, 2019 6:18:28 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.69
Jun 20, 2019 6:18:28 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\docs
Jun 20, 2019 6:18:28 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jun 20, 2019 6:18:28 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [178] milliseconds.
Jun 20, 2019 6:18:28 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\docs has finished in 739 ms
Jun 20, 2019 6:18:28 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\examples
Jun 20, 2019 6:18:30 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jun 20, 2019 6:18:30 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\examples has finished in 1,226 ms
Jun 20, 2019 6:18:30 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\gitblit
Jun 20, 2019 6:18:34 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jun 20, 2019 6:18:38 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\gitblit has finished in 8,191 ms
Jun 20, 2019 6:18:38 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\gitora
Jun 20, 2019 6:18:38 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\gitora\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Jun 20, 2019 6:18:41 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jun 20, 2019 6:18:42 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\gitora has finished in 4,447 ms
Jun 20, 2019 6:18:42 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\host-manager
Jun 20, 2019 6:18:43 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jun 20, 2019 6:18:43 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\host-manager has finished in 270 ms
Jun 20, 2019 6:18:43 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\manager
Jun 20, 2019 6:18:43 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jun 20, 2019 6:18:43 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\manager has finished in 207 ms
Jun 20, 2019 6:18:43 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\ROOT
Jun 20, 2019 6:18:43 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jun 20, 2019 6:18:43 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\Program Files\Gerger\GitoraServer\apache-tomcat-7.0.69\webapps\ROOT has finished in 188 ms
Jun 20, 2019 6:18:43 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [“http-bio-8088”]
Jun 20, 2019 6:18:43 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 15356 ms
Jun 20, 2019 6:18:43 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[localhost:8005]:
java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(DualStackPlainSocketImpl.java:106)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.(ServerSocket.java:237)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:444)
at org.apache.catalina.startup.Catalina.await(Catalina.java:781)
at org.apache.catalina.startup.Catalina.start(Catalina.java:727)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)

Jun 20, 2019 6:18:43 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler [“http-bio-8088”]
Jun 20, 2019 6:18:43 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler [“ajp-bio-8009”]
Jun 20, 2019 6:18:43 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jun 20, 2019 6:18:43 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
SEVERE: The web application [/gitora] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1e4b8d74]) and a value of type [java.lang.Class] (value [class oracle.xdb.XMLType]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jun 20, 2019 6:18:43 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
SEVERE: The web application [/gitora] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1e28a0a9]) and a value of type [java.lang.Class] (value [class oracle.xdb.XMLTypeFactory]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jun 20, 2019 6:18:44 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [/gitblit] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.
Jun 20, 2019 6:18:44 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [/gitblit] appears to have started a thread named [sshd-SshServer[4271bcf7]-timer-thread-1] but has failed to stop it. This is very likely to create a memory leak.
Jun 20, 2019 6:18:44 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler [“http-bio-8088”]
Jun 20, 2019 6:18:44 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler [“http-bio-8088”]
Jun 20, 2019 6:18:44 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler [“ajp-bio-8009”]
Jun 20, 2019 6:18:44 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler [“ajp-bio-8009”]

Hi Murali,

You can install more than one Gitora instance into the same host but you need to make sure installing only one Gitora per database instance.

To install the second Gitora:

  • Before proceeding to the second Gitora installation, stop the first tomcat server.
  • During installation specify a different port for the tomcat server.
  • After the installation is complete, stop the second tomcat server and edit tomcat/conf/server.xml (for the second server only) file and change port 8005 and 8009 to something different like 8105 and 8109.

After these changes, you should be able to have both tomcat servers running at the same time.

Kind regards,

hi Serdar,
Thank you it worked like a charm. Yes i was trying to install Gitora per database instance.

Thanks,
Murali