org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395) - java

While trying to start the servlet engine, getting the below error:
8080 port is free
This error is noticed during starting of the service.
IPv6 is enabled in the server.
Error:
Using CATALINA_BASE: /app/iw-home/servletd
Using CATALINA_HOME: /app/iw-home/servletd
Using CATALINA_TMPDIR: /app/iw-home/servletd/temp
Using JAVA_HOME: /app/iw-home/tools/java
Using CLASSPATH: :/app/iw-home/tools/java/lib/tools.jar:/app/iw-home/servletd/bin/bootstrap.jar:/app/iw-home/servletd/bin/commons-logging-api.jar
Dec 6, 2013 1:19:31 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:179)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

It looks like you are trying to stop or restart the server when it is not running. Instead you need to start it.

Check if there is not running another (defunct) tomcat by doing "ps xa | grep catalina".

Related

Jenkins connection refused

I have this weird problem. Jenkins on the machine suddenly stopped working. Though another jenkins server works file (Which is a slave). But for this jenkins instance (Standalone) it gives connection refused error.
It is a windows machine.
java -jar agent.jar -jnlpUrl http://<MachineName>:8080/computer/<MachineName>/slave-agent.jnlp -secret ce4
1f56fdf579e393a74cb5d0b539353628d6d524c4f0d518bd3cfc523f2292b -workDir "C:\Users
\<UserName>\Jenkins-slave"
Picked up _JAVA_OPTIONS: -Xmx1024M
Sep 26, 2018 11:52:40 AM org.jenkinsci.remoting.engine.WorkDirManager initialize
WorkDir
INFO: Using C:\Users\<UserName>\Jenkins-slave\remoting as a remoting work dir
ectory
Both error and output logs will be printed to C:\Users\<UserName>\Jenkins-sla
ve\remoting
Failing to obtain http://<MachineName>:8080/computer/<MachineName>/slave-agent.jnlp?
encrypt=true
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketI
mpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja
va:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocket
Impl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java
:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
at sun.net.www.http.HttpClient.New(HttpClient.java:308)
at sun.net.www.http.HttpClient.New(HttpClient.java:326)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
onnection.java:1168)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConn
ection.java:1104)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:998)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:932)
at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:490)
at hudson.remoting.Launcher.run(Launcher.java:322)
at hudson.remoting.Launcher.main(Launcher.java:283)

Cannot contact : java.nio.channels.ClosedByInterruptException while using GeckoDriver and Firefox

I'm running tests using:
Selenium 3.11
Geckodriver v0.20.1
TestNG 6.9.8
Firefox 57 on Linux OS
I have 10 suites with 10-30 classes in each. Total duration time is about 16 hours. Webdriver gets created in beforeClass and get's quit in afterClass (using driver.quit()).
When I run tests using Chrome Driver, everything is okay and all the suites are executed completely.
But if I switch the driver to Firefox driver, only 3-4, or 5 suites are executed, and then I receive the following error:
Cannot contact : java.nio.channels.ClosedByInterruptException
Can't take a screenshot: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:14191
It appears in different steps and actions, the test just goes regularly and then
this error appear:
2018-05-30 18:52:12.545 - NavigationTree.executeNavigationCommand:87 [[treePasteItem]]
2018-05-30 18:52:15.018 - Toastr.waitToastIsNotShown:51
2018-05-30 18:52:17.130 - NavigationTree.getRootNode:131
Cannot contact : java.nio.channels.ClosedByInterruptException
Can't take a screenshot: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:14191
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z'
System info: host: 'ip-172-31-34-46.ec2.internal', ip: '172.31.34.46', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-514.el7.x86_64', java.version: '1.8.0_45'
Driver info: driver.version: RemoteWebDriver
2018-05-30 18:53:16.441 - FAILED: RenameDeleteJobs_14
2018-05-30 18:53:16.441 - [LAST MESSAGE RECEIVED FROM THE TEST]
org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:14191
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z'
System info: host: 'ip-172-31-34-46.ec2.internal', ip: '172.31.34.46', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-514.el7.x86_64', java.version: '1.8.0_45'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:92)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545)
at org.openqa.selenium.remote.RemoteWebDriver.perform(RemoteWebDriver.java:611)
at org.openqa.selenium.interactions.Actions$BuiltAction.perform(Actions.java:638)
at org.openqa.selenium.interactions.Actions.perform(Actions.java:594)
at org.openqa.selenium.interactions.Actions$perform$0.call(Unknown Source)
at exa.tags.framework.utils.Helper.moveFocusToElement(Helper.groovy:290)
at exa.tags.framework.utils.Helper$moveFocusToElement$13.callStatic(Unknown Source)
at exa.tags.framework.utils.Helper.moveFocusToElement(Helper.groovy:298)
at exa.tags.framework.utils.Helper$moveFocusToElement$12.call(Unknown Source)
at exa.tags.framework.pages.navigation.NavigationTree.getNodeByName(NavigationTree.groovy:185)
at exa.tags.framework.pages.navigation.NavigationTree$getNodeByName$4.callStatic(Unknown Source)
at exa.tags.framework.pages.navigation.NavigationTree.getNodeByPath(NavigationTree.groovy:204)
at exa.tags.framework.pages.navigation.NavigationTree$getNodeByPath$9.callStatic(Unknown Source)
at exa.tags.framework.pages.navigation.NavigationTree.getNodeByPath(NavigationTree.groovy:223)
at exa.tags.framework.pages.navigation.NavigationTree.selectNodeByPath(NavigationTree.groovy:232)
at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrap.invoke(PogoMetaMethodSite.java:190)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:71)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at exa.tags.suites.jobs.RenameDeleteJobsTest.RenameDeleteJobs_14(RenameDeleteJobsTest.groovy:756)
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:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1191)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1116)
at org.testng.TestNG.run(TestNG.java:1024)
at org.testng.TestNG$run$1.call(Unknown Source)
at exa.tags.runner.TestManager$_runTests_closure1$_closure4.doCall(TestManager.groovy:110)
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:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
at groovy.lang.Closure.call(Closure.java:426)
at groovy.lang.Closure.call(Closure.java:442)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at exa.tags.runner.TestManager$_runTests_closure1.doCall(TestManager.groovy:72)
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:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
at groovy.lang.Closure.call(Closure.java:426)
at groovy.lang.Closure.call(Closure.java:442)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at exa.tags.runner.TestManager.runTests(TestManager.groovy:54)
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:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:151)
at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:56)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:194)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:206)
at exa.tags.runner.TestManager.main(TestManager.groovy:38)
Caused by: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:14191
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:240)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:158)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:256)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:134)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:113)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
at okhttp3.RealCall.execute(RealCall.java:77)
at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:101)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:155)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
... 96 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at okhttp3.internal.platform.Platform.connectSocket(Platform.java:125)
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:238)
... 116 more
I added memory info output but seems like there are still enough resources for JVM:
OS: Linux
Version: 3.10.0-514.el7.x86_64 amd64
Available processors (cores): 8
Current directory: /var/lib/jenkins/jobs/ExaCLOUD_UI_tests_pipeline/branches/feature-E.6pdikdaolhhr.IE-Chrome/workspace/ExaTAGS/TagsRunner
Currently allocated to the JVM: 2,249.5 Mb
Free memory in JVM: 1,257.568 Mb
Used memory in JVM: 991.932 Mb
Max memory the JVM could reach: 3,250 Mb
Total free memory: 2,258.068 Mb
File system root: /
Total space: 102387.98046875 Mb
Free space:30855.1953125 Mb
Usable space: 30855.1953125 Mb
My question is: where to look for and what to add to debug info to investigate the reason of this happening?
This error message...
Cannot contact : java.nio.channels.ClosedByInterruptException
Can't take a screenshot: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:14191
...implies that a checked exception was received by a thread when another thread interrupted it while it was blocked in an I/O operation upon a channel.
ClosedByInterruptException Class
ClosedByInterruptException is a checked exception which is raised when a thread interrupts another thread while it is busy/blocked in an I/O operation upon a channel. Before this exception is thrown the channel must have been closed.
It is worth to mention that, channel operations are pretty much bound to the thread doing the I/O operations. If this thread is interrupted the stream or the channel is closed due to IO safety issues.
Your code trials would have given us some more hints about what's going wrong but from the error stack trace it is evident one of the major issue is the incompatibility between the version of the binaries you are using as follows:
Though you are using Selenium v3.11.0 but your JDK seems to be v1.8.0_45 which is pretty older.
Solution
Upgrade JDK to recent levels JDK 8u171.
Upgrade Selenium to current levels Version 3.12.0.
Upgrade GeckoDriver to GeckoDriver v0.20.1 level.
Ensure GeckoDriver is present in the specified location.
GeckoDriver is having executable permission for non-root users.
Upgrade Firefox version to Firefox v60.0.1 levels.
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
Use CCleaner tool to wipe off all the OS chores before and after the execution of your Test Suite.
If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
Take a System Reboot.
Execute your Test as a non-root user.
Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.
trivia
If the AUT (Application Under Test) is a multi-threaded application, you should look for interrupt() calls that might interrupt the thread doing the IO operations on the channel. If it is a web-application or some other kind of managed environment, where thread management isn't up to your application (like a Servlet / EJB Container), you should look for thread-safety violations. Another place to look is when the application is shutting down or when thread pooling is used (Servlet/EJB Container!). Then be aware of dynamic management of the pool size!
References
You will find a detailed discussion in Why are we getting ClosedByInterruptException from FileChannel.map in Java 1.6?

Couldn't start gremlin server from JanusGraps (GraphFactory warning)

I try to start JanusGraph and I have a problem with TinkerPop gremlin server. I try both "release (0.1.1)" and "from source (0.2.0)" versions.
When I run /bin/janusgraph.sh start there is no error but I can't connect to gremlin with my application.
When I start TinkerPop version downloaded from Apache site I have no problem with connection. I think that the problem is with a config file. The Apache version uses tinkergraph-empty.properties, the JanusGraph version: janusgraph-cassandra-es-server.properties (Of course, I want to use Cassandra).
A result of executing gremlin-server.sh with Cassandra config don't return any errors but returns warnings:
718 [main] WARN org.apache.tinkerpop.gremlin.server.GremlinServer - Graph [graph] configured at [conf/gremlin-server/janusgraph-cassandra-es-server.properties] could not be instantiated and will not be available in Gremlin Server. GraphFactory message: GraphFactory could not instantiate this Graph implementation [class org.janusgraph.core.JanusGraphFactory]
java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [class org.janusgraph.core.JanusGraphFactory]
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:82)
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:70)
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:104)
at org.apache.tinkerpop.gremlin.server.GraphManager.lambda$new$0(GraphManager.java:55)
at java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:671)
at org.apache.tinkerpop.gremlin.server.GraphManager.<init>(GraphManager.java:53)
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.<init>(ServerGremlinExecutor.java:83)
at org.apache.tinkerpop.gremlin.server.GremlinServer.<init>(GremlinServer.java:110)
at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:344)
Caused by: java.lang.reflect.InvocationTargetException
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.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:78)
... 8 more
Caused by: java.lang.IllegalArgumentException: Could not instantiate implementation: org.janusgraph.diskstorage.cassandra.thrift.CassandraThriftStoreManager
at org.janusgraph.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:69)
at org.janusgraph.diskstorage.Backend.getImplementationClass(Backend.java:477)
at org.janusgraph.diskstorage.Backend.getStorageManager(Backend.java:409)
at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1353)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:107)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:87)
... 13 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.janusgraph.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:58)
... 18 more
Caused by: org.janusgraph.diskstorage.TemporaryBackendException: Temporary failure in storage backend
at org.janusgraph.diskstorage.cassandra.thrift.CassandraThriftStoreManager.getCassandraPartitioner(CassandraThriftStoreManager.java:219)
at org.janusgraph.diskstorage.cassandra.thrift.CassandraThriftStoreManager.<init>(CassandraThriftStoreManager.java:198)
... 23 more
Caused by: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)
at org.apache.thrift.transport.TSocket.open(TSocket.java:185)
at org.apache.thrift.transport.TFramedTransport.open(TFramedTransport.java:81)
at org.janusgraph.diskstorage.cassandra.thrift.thriftpool.CTConnectionFactory.makeRawConnection(CTConnectionFactory.java:102)
at org.janusgraph.diskstorage.cassandra.thrift.thriftpool.CTConnectionFactory.makeObject(CTConnectionFactory.java:66)
at org.janusgraph.diskstorage.cassandra.thrift.thriftpool.CTConnectionFactory.makeObject(CTConnectionFactory.java:35)
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
at org.janusgraph.diskstorage.cassandra.thrift.CassandraThriftStoreManager.getCassandraPartitioner(CassandraThriftStoreManager.java:216)
... 24 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.thrift.transport.TSocket.open(TSocket.java:180)
... 30 more
How can I start JanusGraph with Cassanda without warnings?
There is a problem with starting Cassandra which you one observe by running:
bin/nodetool enablethrift
as #Ashraful Islam suggested.
One need to uncomment following line(I set address to localhost) in conf/cassandra/cassandra-env.sh :
JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=127.0.0.1"
Enable Thrift server of Cassandra
Use the below command to enable thrift in cassandra
nodetool enablethrift

IllegalArgument Exception TomEE

I downloaded TomEE 1.7.1 and installed. While bringing the server up an IllegalArgumentException is thrown. What could be the issue as I have not deployed any app yet.
INFO: Using 'openejb.jdbc.datasource- creator=org.apache.tomee.jdbc.TomEEDataSourceCreator'
java.lang.IllegalArgumentException
at java.util.EventObject.<init>(EventObject.java:52)
at java.beans.PropertyChangeEvent.<init>(PropertyChangeEvent.java:41)
at org.apache.tomee.catalina.GlobalListenerSupport$MoniterableHashMap.put(GlobalListenerSupport.java:412)
at java.util.HashMap.putAllImpl(HashMap.java:746)
at java.util.HashMap.putAll(HashMap.java:736)
at java.util.LinkedHashMap.<init>(LinkedHashMap.java:112)
at org.apache.tomee.catalina.GlobalListenerSupport$MoniterableHashMap.<init>(GlobalListenerSupport.java:403)
at org.apache.tomee.catalina.GlobalListenerSupport.addContextListener(GlobalListenerSupport.java:380)
at org.apache.tomee.catalina.GlobalListenerSupport.engineAdded(GlobalListenerSupport.java:224)
at org.apache.tomee.catalina.GlobalListenerSupport.serviceAdded(GlobalListenerSupport.java:201)
at org.apache.tomee.catalina.GlobalListenerSupport.start(GlobalListenerSupport.java:181)
at org.apache.tomee.catalina.TomcatWebAppBuilder.start(TomcatWebAppBuilder.java:409)
at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:223)
at org.apache.tomee.catalina.ServerListener.install(ServerListener.java:168)
at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:55)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280)
This is all the stacktrace that is thrown out.
Check el JRE_HOME variable environment. JRE_HOME most be reater a 5.
Tomcat EE display for example:
E:\Users\yo\Documents\apache-tomee-webprofile-1.7.4\bin>startup.bat
Using CATALINA_BASE: "E:\Users\yo\Documents\apache-tomee-webprofile-1.7.4"
Using CATALINA_HOME: "E:\Users\yo\Documents\apache-tomee-webprofile-1.7.4"
Using CATALINA_TMPDIR: "E:\Users\yo\Documents\apache-tomee-webprofile-1.7.4\temp"
Using JRE_HOME: "C:\Program Files\Java\jre7"
Using CLASSPATH: "E:\Users\yo\Documents\apache-tomee-webprofile-1.7.4\bin\bootstrap.jar;E:\Users\yo\Documents\ejecutables\apac
he-tomee-webprofile-1.7.4\bin\tomcat-juli.jar"
Check the version of JRE
-- Revisa la versiĆ³n del JRE

Sonar runner (ubuntu) execution failed: com.mysql.jdbc.Driver

I've recently installed SONAR on a Vagrant box running UBUNTU.
Sonar service run fine, but when I try to run the sonar-runner I get an error related to jdbc connector.
I configured sonar to run with mysql database by changing the file "sonar-runner.properties":
sonar.jdbc.url=jdbc:mysql://127.0.0.1:3306/sonar?seUnicode=true&characterEncoding=utf8
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
When trying to start sonar-runner i get the following output:
$ sudo sonar-runner start -e
SonarQube Runner 2.3
Java 1.6.0_27 Sun Microsystems Inc. (64-bit)
Linux 3.2.0-23-generic amd64
INFO: Error stacktraces are turned on.
INFO: Runner configuration file: /home/vagrant/bin/sonar-runner/conf/sonar-runner.properties
INFO: Project configuration file: NONE
INFO: SonarQube Server 4.1.1
13:01:58.363 INFO - Load batch settings
13:01:59.524 INFO - User cache: /root/.sonar/cache
13:01:59.560 INFO - Install plugins
13:02:03.309 INFO - Install JDBC driver
13:02:03.618 INFO - Create JDBC datasource for jdbc:mysql://127.0.0.1:3306/sonar?useUnicode=true&characterEncoding=utf8
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 43.846s
Final Memory: 2M/14M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Caused by: java.lang.IllegalStateException: Fail to connect to database
at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 9 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
at org.apache.commons.dbcp.BasicDataSource.getLogWriter(BasicDataSource.java:1098)
at org.apache.commons.dbcp.BasicDataSourceFactory.createDataSource(BasicDataSourceFactory.java:350)
at org.sonar.core.persistence.DefaultDatabase.initDatasource(DefaultDatabase.java:142)
at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:75)
... 32 more
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)
... 37 more
ERROR:
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
From my undertanding the jdbc driver is not found. I thought that during initalisation sonar-runner will get the required jar (like it does for other libraries).
I tried to "sudo apt-get install libmysql-java" but still get the same error message.
If that's the right thing to do (which I doubt) I should maybe add the jar to my classpath, but I'm don't know where that jar is actually downloaded and how to add it to the classpath.
Any idea on how to get that solved?
Thanks!!
I was looking at the wrong place!
Issue was not comming from the runner but from SONAR itself. I had to change de sonar config file '/opt/sonar' and restart it. In the setting page I now can see that sonar is running on mysql.
I'm facing a other issue with the runner, but it is not related to the issue above.
So basicaly make sure both SONAR and SONAR-RUNNER are configured to work with mysql.
I had the same issue. Issue was that mysql JDBC connector was not in my bash_profile.
So i add on .bash_profile :
export jdbc mysql connector to classpath
export CLASSPATH=${HOME}/sonar/mysql-connector-java-5.1.23/mysql-connector-java-5.1.23-bin.jar:$CLASSPATH
Hope it could help

Categories