You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Christopher Tubbs (JIRA)" <ji...@apache.org> on 2019/04/23 00:12:00 UTC

[jira] [Resolved] (ACCUMULO-3313) Zookeeper does not start because of classpath.

     [ https://issues.apache.org/jira/browse/ACCUMULO-3313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Tubbs resolved ACCUMULO-3313.
-----------------------------------------
    Resolution: Cannot Reproduce

If this is still a problem, please open an issue (or better yet, a pull request) at https://github.com/apache/accumulo/issues

> Zookeeper does not start because of classpath.
> ----------------------------------------------
>
>                 Key: ACCUMULO-3313
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3313
>             Project: Accumulo
>          Issue Type: Bug
>          Components: mini
>         Environment: Windows
> Hadoop 2.5.0cdh5.2.0
> Accumulo 1.6.0cdh5.1.0
>            Reporter: Johannes Bauer
>            Priority: Major
>         Attachments: screenshot-1.png
>
>
> When I run the MiniAccumuloCluster 1.6.0 on Windows, it does not start up correctly, but ends up with the error
> {code}
> java.lang.RuntimeException: Zookeeper did not start within 20 seconds. Check the logs in C:\Users\jsbaue\AppData\Local\Temp\1415364318664-0\logs for errors.  Last exception: java.net.ConnectException: Connection refused: connect
> 	at org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl.start(MiniAccumuloClusterImpl.java:460)
> 	at org.apache.accumulo.minicluster.MiniAccumuloCluster.start(MiniAccumuloCluster.java:72)
> 	at com.gfk.st2.pace.datafactory.adaptor.accumulo.impl.MiniAccumuloClusterTest.testStart(MiniAccumuloClusterTest.java:50)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> {code}
> Reason is, that Zookeeper does not startup at all, as the classpath, returned by the function
> {code}
> private String getClasspath() throws IOException
> {code}
> in MiniAccumuloClusterImpl.java returns a classpath, containing just the config directory. The reason for this is the part 
> {code}
>         // assume 0 is the system classloader and skip it
>         for (int i = 1; i < classloaders.size(); i++) {
> {code}
> (Line 208f in 1.6.0, 224f in 1.6.1), my debug-situation can be seen in screenshot-1.png. There you also can see, that the list {{classloaders}} includes only one classloader, which is a {{java.net.URLClassLoader}}. This classloader does not have a parent. Subsequently, the list has only one element, and the {{for}}-loop is never entered. So the classpath does not even contain the {{class org.apache.zookeeper.server.ZooKeeperServerMain}}, so Zeekeeper cannot be started. 
> When I start the loop with 0, zookeeper starts up and I can use the MiniAccumuloCluster. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)