Jenkins windows 10 local Bad Request - Invalid Hostname - java

After doing a fresh installation of Jenkins version 2.202 and an installation of the latest jdk 1.8.0 on Windows 10 Pro, I kept on receiving the same error: Bad Reqest - Invalid hostname.
I tried to run the following java command from cmd: java -jar jenkins.war
I got the following error:
Running from: C:\Program Files (x86)\Jenkins\jenkins.war
webroot: $user.home/.jenkins
2019-11-04 17:36:31.259+0000 [id=1] INFO org.eclipse.jetty.util.log.Log#initialized: Logging initialized #541ms to org.eclipse.jetty.util.log.JavaUtilLog
2019-11-04 17:36:31.344+0000 [id=1] INFO winstone.Logger#logInternal: Beginning extraction from war file
2019-11-04 17:36:31.364+0000 [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
2019-11-04 17:36:31.401+0000 [id=1] INFO org.eclipse.jetty.server.Server#doStart: jetty-9.4.z-SNAPSHOT; built: 2019-05-02T00:04:53.875Z; git: e1bc35120a6617ee3df052294e433f3a25ce7097; jvm 1.8.0_231-b11
2019-11-04 17:36:31.796+0000 [id=1] INFO o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2019-11-04 17:36:31.833+0000 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
2019-11-04 17:36:31.833+0000 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults
2019-11-04 17:36:31.836+0000 [id=1] INFO o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 660000ms
2019-11-04 17:36:32.102+0000 [id=1] INFO hudson.WebAppMain#contextInitialized: Jenkins home directory: C:\Users\alainghawi\.jenkins found at: $user.home/.jenkins
2019-11-04 17:36:32.169+0000 [id=1] INFO o.e.j.s.handler.ContextHandler#doStart: Started w.#5efa40fe{Jenkins v2.202,/,file:///C:/Users/alainghawi/.jenkins/war/,AVAILABLE}{C:\Users\alainghawi\.jenkins\war}
2019-11-04 17:36:32.176+0000 [id=1] INFO o.e.j.server.AbstractConnector#doStop: Stopped ServerConnector#5ebec15{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2019-11-04 17:36:32.176+0000 [id=1] INFO o.e.j.server.session.HouseKeeper#stopScavenging: node0 Stopped scavenging
2019-11-04 17:36:32.179+0000 [id=1] INFO hudson.WebAppMain#contextDestroyed: Shutting down a Jenkins instance that was still starting up
java.lang.Throwable: reason
at hudson.WebAppMain.contextDestroyed(WebAppMain.java:388)
at org.eclipse.jetty.server.handler.ContextHandler.callContextDestroyed(ContextHandler.java:965)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextDestroyed(ServletContextHandler.java:566)
at org.eclipse.jetty.server.handler.ContextHandler.stopContext(ContextHandler.java:942)
at org.eclipse.jetty.servlet.ServletContextHandler.stopContext(ServletContextHandler.java:376)
at org.eclipse.jetty.webapp.WebAppContext.stopWebapp(WebAppContext.java:1503)
at org.eclipse.jetty.webapp.WebAppContext.stopContext(WebAppContext.java:1467)
at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:1009)
at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:288)
at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:569)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:178)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:199)
at org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:124)
at org.eclipse.jetty.server.Server.doStop(Server.java:464)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at winstone.Launcher.shutdown(Launcher.java:313)
at winstone.Launcher.<init>(Launcher.java:200)
at winstone.Launcher.main(Launcher.java:362)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at Main._main(Main.java:375)
at Main.main(Main.java:151)
Exception in thread "Jenkins initialization thread" 2019-11-04 17:36:32.189+0000 [id=1] INFO o.e.j.s.handler.ContextHandler#doStop: Stopped w.#5efa40fe{Jenkins v2.202,/,null,UNAVAILABLE}{C:\Users\alainghawi\.jenkins\war}
java.lang.NoClassDefFoundError: hudson/util/HudsonFailedToLoad
at hudson.WebAppMain$3.run(WebAppMain.java:247)
Caused by: java.lang.ClassNotFoundException: hudson.util.HudsonFailedToLoad
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:555)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
2019-11-04 17:36:32.191+0000 [id=1] INFO winstone.Logger#logInternal: Jetty shutdown successfully
java.io.IOException: Failed to start Jetty
at winstone.Launcher.<init>(Launcher.java:189)
at winstone.Launcher.main(Launcher.java:362)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at Main._main(Main.java:375)
at Main.main(Main.java:151)
Caused by: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8080
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:346)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:308)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:396)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at winstone.Launcher.<init>(Launcher.java:187)
... 7 more
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:342)
... 14 more
2019-11-04 17:36:32.211+0000 [id=1] SEVERE winstone.Logger#logInternal: Container startup failed
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:342)
Caused: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8080
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:346)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:308)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:396)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at winstone.Launcher.<init>(Launcher.java:187)
Caused: java.io.IOException: Failed to start Jetty
at winstone.Launcher.<init>(Launcher.java:189)
at winstone.Launcher.main(Launcher.java:362)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at Main._main(Main.java:375)
at Main.main(Main.java:151)
However, when I run netstat -ano | find "8080", I only find the System pid which is 4 listening to the port 8080, and I can't kill it as it is the sytem process. What should I do to make Jenkins work on my Windows 10 local machine?
Any help would be appreciated.

Related

exe file generated from jar not running in windows [duplicate]

This question already has an answer here:
executable created with "jpackage"silently fails if jar is missing
(1 answer)
Closed 1 year ago.
I have generated an exe file using jpackager in windows, when I install it and try to run, this error is generated.
Device initialization failed for : d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: No toolkit found
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
... 5 more
Any ideas on how to solve this will be really appreciated
This is how I generated the exe file
jpackage -t exe --name "wetu" --app-version 1.0 --input "C:\Users\home\Documents\Andrew\Projects\Java\WetuLantern\dist" --dest "C:\Users\home\Documents\Andrew\wetu-exe" --main-jar "WetuLantern.jar" --icon "C:\Users\home\Documents\Andrew\icon.ico" --module-path "C:\Users\home\Downloads\Compressed\javafx-jmods-16" --add-modules javafx.controls,javafx.graphics,javafx.fxml,javafx.base --win-shortcut --win-menu --win-console
Activate Windows console with --win-console as outlined in this answer. This allow you to identify the error message.
Secondly, the installer does not upgrade the previous installation after each build unless you increase the --app-version each time or un-install the previous copy before installing new copy.

Address Bind exception in Tomcat

We are running Java 8 web application in Apache Tomcat 8.0.36 server since 1 year.
From past few days sometimes when we restart the Tomcat server , the application is not working. Logs are showing address bind exception for Https port.
I tried checking the process associated with the port using below command in cmd:
netstat -aon | findstr [port]
but it is not showing any process associated with the port.
I have tried closing tomcat process from task manager and also tried executing tomact shutdown.bat and then started tomcat again but nothing helped.
If the system is restarted where application is deployed the issue gets resolved but we can't restart the system anytime
Please help what could be the issue and what else can be checked?
Below is the error in tomcat error log:
03-Aug-2018 11:42:32.008 INFO [main] org.apache.coyote.AbstractProtocol.init
Initializing ProtocolHandler ["http-nio-443"]
03-Aug-2018 11:42:32.008 SEVERE [main]
org.apache.coyote.AbstractProtocol.init Failed to initialize end point
associated with ProtocolHandler ["http-nio-443"]
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:351)
at
org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:748)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:459)
at
org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11Jss
eProtocol.java:120)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardService.initInternal
(StandardService.java:568)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal
(StandardServer.java:869)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:580)
at org.apache.catalina.startup.Catalina.load(Catalina.java:603)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
03-Aug-2018 11:42:32.008 SEVERE [main]
org.apache.catalina.core.StandardService.initInternal Failed to initialize
connector [Connector[HTTP/1.1-443]]
org.apache.catalina.LifecycleException: Failed to initialize component
[Connector[HTTP/1.1-443]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at org.apache.catalina.core.StandardService.initInternal
(StandardService.java:568)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal
(StandardServer.java:869)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:580)
at org.apache.catalina.startup.Catalina.load(Catalina.java:603)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
Caused by: org.apache.catalina.LifecycleException: Protocol handler
initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:962)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 12 more
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:351)
at
org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:748)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:459)
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init
(AbstractHttp11JsseProtocol.java:120)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
... 13 more03-Aug-2018 11:42:32.008 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-
nio-443"]
03-Aug-2018 11:42:32.008 SEVERE [main]
org.apache.coyote.AbstractProtocol.init
Failed to initialize end point associated with ProtocolHandler ["http-nio-
443"]
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:351)
at org.apache.tomcat.util.net.AbstractEndpoint.init
(AbstractEndpoint.java:748)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:459)
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init
(AbstractHttp11JsseProto col.java:120)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardService.initInternal
(StandardService.java:568)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal
(StandardServer.java:869)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:580)
at org.apache.catalina.startup.Catalina.load(Catalina.java:603)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
03-Aug-2018 11:42:32.008 SEVERE [main]
org.apache.catalina.core.StandardService.initInternal Failed to initialize
connector [Connector[HTTP/1.1-443]]
org.apache.catalina.LifecycleException: Failed to initialize component
[Connector[HTTP/1.1-443]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at org.apache.catalina.core.StandardService.initInternal
(StandardService.java:568)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal
(StandardServer.java:869)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:580)
at org.apache.catalina.startup.Catalina.load(Catalina.java:603)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
Caused by: org.apache.catalina.LifecycleException: Protocol handler
initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:962)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 12 more
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:351)
at org.apache.tomcat.util.net.AbstractEndpoint.init
(AbstractEndpoint.java:748)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:459)
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init
(AbstractHttp11JsseProtocol.java:120)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
... 13 more
See the update below. We think we have found the root cause and a solution
We have the same problem: A tomcat service that was operating without problems for nearly a year was not able to bind to the port which it used after it was stopped and then restarted.
We usually stop and restart our tomcat service regularly every night, and it used to work without problems. The problem first occurred on July 24th, so after a lot of research that I and our IT have done, I suspect that some kind of change in our IT infrastructure that happened shortly before July 24th causes this problem.
Our server is a Windows Server 2012 R2, 64 Bit, but our IT environment is virtualized, running on vSphere Host Version 6. On what server/infrastructure is your tomcat operating? Is it a virtualized system or is it running on a physical server?
In my opinion, the problem came in either with the last installed patches for Windows
(KB4338815 and/or KB4339093) or with some Hypervisor updates. But our IT is still researching.
For the moment as a workaround we do a server restart when we shutdown the service
and restart it regularly every night. But because the problem does not reliable occur on
each and every shutdown/restart, we restart the server only if it is really necessary. To achieve this we use a listener we have implemented and configured in the server.xml that scans the stderr.log just after the tomcat service has started. If it detects, that a Bind Exception occurs it restarts the server (tomcat service is installed as automatic). If you find the cause of this problem, please post it here, as I will, if I or our IT will find it.
Update August 7th:
We think we have found the root cause. Obviously the Windows Monthly Quality Rollup for July introduced this problem. In our case (Windows Server 2012 R2, 64 Bit) the problematic update was KB4338815 (see https://support.microsoft.com/en-us/help/4338815/windows-81-update-kb4338815).
If you do a quick research on the internet, the problem, which also affects Windows IIS Webserver and MS SQL Server is mostly described as related to KB4338818 (see https://support.microsoft.com/en-us/help/4338818/windows-7-update-kb4338818) but this is the same kind of update for Windows Server 2008 R2 and Windows 7.
Microsoft is already aware of the problem and describes it in its documentation for KB4338815 and KB4338818 in the "Known issues in this update" section of the mentioned articles. Microsoft states that the problem is resolved in KB4338831 (for Windows Server 2012 R2, Windows 8.1) and KB4338821 (for Windows Server 2008 R2, Windows 7)
In our case we installed hot fix KB4345424 (see https://support.microsoft.com/en-us/help/4345424/improvements-and-fixes-windows-8-1-and-server-2012-r2), also available from Microsoft, which addresses this bug and as far as we see, the problem does not exist anymore.

getting an exception in jBoss server as java.lang.RuntimeException: Error unmarshalling file:/opt/jboss-5.1.0.GA/server/port_1/conf/bootstrap.xml

I have 2 instance in one instance my application is running fine but in another instance its giving an exception .I am working on red-hat with jboss-5.1.0.GA version.
the Exception is as follow
19:59:05,178 INFO [ServerImpl] Server Temp Deploy Dir: /opt/jboss-5.1.0.GA/server/port_1/tmp/deploy
19:59:05,771 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/opt/jboss-5.1.0.GA/server/port_1/conf/bootstrap.xml
Failed to boot JBoss:
java.lang.RuntimeException: Error unmarshalling file:/opt/jboss-5.1.0.GA/server/port_1/conf/bootstrap.xml
at org.jboss.bootstrap.xml.BootstrapParser.parse(BootstrapParser.java:60)
at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:123)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:450)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/opt/jboss-5.1.0.GA/server/port_1/conf/bootstrap.xml
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:177)
at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:119)
at org.jboss.bootstrap.xml.BootstrapParser.parse(BootstrapParser.java:53)
... 5 more
Caused by: java.io.FileNotFoundException: /opt/jboss-5.1.0.GA/server/port_1/conf/bootstrap.xml
at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:105)
at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:112)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:173)
... 7 more
19:59:05,870 INFO [ServerImpl] Runtime shutdown hook called, forceHalt: true
19:59:05,896 INFO [ServerImpl] Shutdown complete
Shutdown complete
Halting VM
bash-3.2#
Pay attention to this:
Caused by: java.io.FileNotFoundException: /opt/jboss-5.1.0.GA/server/port_1/conf/bootstrap.xml
Also, be aware that you are using a version which is really old.

HBase Java API HTrace error

I want to create a Java API to access HBase DB, but I am always facing with this error in my project;
15/12/14 20:34:22 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.34.184:2181,192.168.34.173:2181 sessionTimeout=90000 watcher=hconnection-0xa80e050x0, quorum=192.168.34.184:2181,192.168.34.173:2181, baseZNode=/hbase
15/12/14 20:34:22 INFO zookeeper.ClientCnxn: Opening socket connection to server /192.168.34.184:2181
java.io.IOException: java.lang.reflect.InvocationTargetException
at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:240)
at org.apache.hadoop.hbase.client.ConnectionManager.createConnection(ConnectionManager.java:420)
at org.apache.hadoop.hbase.client.ConnectionManager.createConnection(ConnectionManager.java:413)
at org.apache.hadoop.hbase.client.ConnectionManager.getConnectionInternal(ConnectionManager.java:291)
at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:222)
at api.ClientOperations.creatTable(ClientOperations.java:69)
at api.ClientOperations.main(ClientOperations.java:125)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:238)
... 6 more
Caused by: java.lang.NoClassDefFoundError: org/apache/htrace/Trace
at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:217)
at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:541)
at org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:65)
at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:105)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.retrieveClusterId(ConnectionManager.java:879)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.<init>(ConnectionManager.java:635)
... 11 more
Caused by: java.lang.ClassNotFoundException: org.apache.htrace.Trace
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
But I added HTrace jar in my project
HBase version: 1.1.2
Hadoop version: 2.6.0
You need to add right jar file to your project, add htrace-core-3.1.0 jar file to project class path then run it.htrace-core
<dependency>
<groupId>org.apache.htrace</groupId>
<artifactId>htrace-core</artifactId>
<version>3.1.0-incubating</version>
</dependency>

Exception in thread "main" java.lang.reflect.InvocationTargetException

I was running hbase bulk load program in single node cluster on terminal. the hadoop command for ruuning this job
HADOOP_CLASSPATH='hbase classpath' hadoop jar /home/cloudera/Videos/hbaseBulk.jar /user/cloudera/Game1.csv /user/cloudera/hbase NBAFinal2010
input path: /user/cloudera/Game1.csv
output path: /user/cloudera/hbase
hbase table name: NBAFinal2010
13/06/06 15:18:39 INFO mapreduce.HFileOutputFormat: Writing partition information to hdfs://localhost:8600/user/cloudera/partitions_1370512119021
13/06/06 15:18:39 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
13/06/06 15:18:39 INFO compress.CodecPool: Got brand-new compressor [.deflate]
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: rsrc:zookeeper-3.4.3-cdh4.0.1.jar
at org.apache.hadoop.fs.Path.initialize(Path.java:157)
at org.apache.hadoop.fs.Path.<init>(Path.java:135)
at org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addDependencyJars(TableMapReduceUtil.java:478)
at org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil.addDependencyJars(TableMapReduceUtil.java:438)
at org.apache.hadoop.hbase.mapreduce.HFileOutputFormat.configureIncrementalLoad(HFileOutputFormat.java:341)
at Driver.main(Driver.java:50)
... 10 more
Caused by: java.net.URISyntaxException: Relative path in absolute URI: rsrc:zookeeper-3.4.3-cdh4.0.1.jar
at java.net.URI.checkPath(Unknown Source)
at java.net.URI.<init>(Unknown Source)
at org.apache.hadoop.fs.Path.initialize(Path.java:154)
... 15 more

Categories