尝试在linux服务器上运行多个实例时,H2o崩溃

时间:2018-01-26 20:53:26

标签: r h2o

我在linux服务器上的H2o中使用R,当多个用户尝试使用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

1 个答案:

答案 0 :(得分:2)

是的,建议做的是使用多个H2O实例(每个用户一个)。您需要做的就是为每个用户启动H2O时指定一个不同的端口。 H2O的默认端口是54321,因此第二个用户应该使用不同的东西。

以下是使用h2o.init()从R启动H2O群集时如何指定非默认端口:

 h2o.init(port = 22222)