我在 linux 服务器上的 R
中使用 H2o
,当多个用户尝试使用 H2o
时,它会崩溃并出现与此类似的错误。我们可以使用多个 h2o 实例吗?如果没有,是否有一种解决方法H2o
实例已在运行时不会启动?
如果我们从R
启动一个实例,从python
启动另一个实例,还会发生这种崩溃吗?
ERROR: Unexpected HTTP Status code: 500 Server Error (url = http://localhost:54321/3/ModelBuilders/word2vec)
java.lang.NullPointerException
[1] "java.lang.NullPointerException"
[2] " hex.word2vec.Word2Vec.init(Word2Vec.java:38)"
[3] " water.api.ModelBuilderHandler.handle(ModelBuilderHandler.java:60)"
[4] " water.api.ModelBuilderHandler.handle(ModelBuilderHandler.java:17)"
[5] " water.api.RequestServer.serve(RequestServer.java:448)"
[6] " water.api.RequestServer.doGeneric(RequestServer.java:297)"
[7] " water.api.RequestServer.doPost(RequestServer.java:223)"
[8] " javax.servlet.http.HttpServlet.service(HttpServlet.java:755)"
[9] " javax.servlet.http.HttpServlet.service(HttpServlet.java:848)"
[10] " org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)"
[11] " org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)"
[12] " org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)"
[13] " org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)"
[14] " org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)"
[15] " org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)"
[16] " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)"
[17] " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)"
[18] " water.JettyHTTPD$LoginHandler.handle(JettyHTTPD.java:183)"
[19] " org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)"
[20] " org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)"
[21] " org.eclipse.jetty.server.Server.handle(Server.java:370)"
[22] " org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)"
[23] " org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)"
[24] " org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)"
[25] " org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)"
[26] " org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)"
[27] " org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)"
[28] " org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)"
[29] " org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)"
[30] " org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)"
[31] " org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)"
[32] " java.lang.Thread.run(Thread.java:748)"
Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = page, :
ERROR MESSAGE:
Caught exception: java.lang.NullPointerException
是的,建议做的是使用多个 H2O 实例(每个用户一个(。 您需要做的就是在为每个用户启动 H2O 时指定不同的端口。H2O 的默认端口是 54321,因此第二个用户应使用其他端口。
下面介绍如何在使用 h2o.init()
从 R 启动 H2O 群集时指定非默认端口:
h2o.init(port = 22222)