栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

安装部署HugeGraphServer

安装部署HugeGraphServer

安装Zakeeper
root@test ~ cd /usr/local/
root@test ~ tar -xvf zookeeper-3.4.10.tar
root@test ~ mv zookeeper-3.4.8.tar.gz zookeeper

修改环境变量:

root@test ~ vim /etc/profile
export ZOOKEEPER_HOME=/usr/local/zookeeper
export PATH=$ZOOKEEPER_HOME/bin:$PATH

重新编译文件:

root@test ~ source /etc/profile

修改zookeeper的配置文件

root@test ~ cp zookeeper/conf/zoo_sample.cfg zoo.cfg
root@test ~ vim zookeeper/conf/zoo.cfg
dataDir=/usr/local/zookeeper/data
dataLogDir=/usr/local/zookeeper/logs
server.1=192.168.2.127:2888:38888

启动zookeeper:

root@test ~ cd zookeeper/bin
root@test bin ./zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
You have new mail.
root@test bin zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
安装Hbase
root@test ~ cd /data/webserver
root@test webserver tar -xvf hbase-1.7.1-bintar
root@test webserver mv hbase-1.7.1 hbase
root@test webserver cd hbase

修改环境变量:

root@test hbase vim /etc/profile
export Hbase_HOME=/data/webserver/hbase
export PATH=$PATH:$JAVA_HOME/bin:$Hbase_HOME/bin

修改配置文件

root@test hbase vim conf/hbase-site.xml


hbase.rootdir
file:///data/webserver/hbase/hbase



hbase.zookeeper.property.dataDir
/data/webserver/hbase/zookeeper


hbase.zookeeper.quorum
192.168.2.127:2181


hbase.cluster.distributed
true


hbase.tmp.dir
/data/webserver/hbase/tmp


hbase.unsafe.stream.capability.enforce
false


hbase.master.port
16000


hbase.master.info.port
16010

root@test hbase vim conf/hbase-env.sh
export JAVA_HOME=/data/webserver/jdk1.8.0_65
export Hbase_CLASSPATH=/data/webserver/hbase/conf
export Hbase_MANAGES_ZK=false

启动hbase

root@test hbase ./bin/start-hbase.sh

安装hugegraph
root@test hugegraph tar -xvf hugegraph-0.9.2.tar
root@test hugegraph mv hugegraph-0.9.2 hugegraph-server
root@test hugegraph cd hugegraph-server

修改配置文件:

root@test hugegraph-server vim conf/hugegraph.properties
backend=hbase
serializer=hbase
cassandra.host=192.168.2.127                                                                                                                                                                                                            
cassandra.port=9042
root@test hugegraph-server vim conf/rest-server.properties 
restserver.url=http://192.168.2.127:9090
server.id=server-1
server.role=master

初始化存储引擎:

root@test hugegraph-server ./bin/init-store.sh 
Initing HugeGraph Store...
2021-09-22 14:53:13 1405  [main] [INFO ] com.baidu.hugegraph.cmd.InitStore [] - Init graph with config file: conf/hugegraph.properties
2021-09-22 14:53:14 1618  [main] [INFO ] com.baidu.hugegraph.HugeGraph [] - Opening backend store 'hbase' for graph 'hugegraph'
2021-09-22 14:53:41 29077 [main] [WARN ] com.baidu.hugegraph.backend.store.BackendSessionPool [] - Current session has ever been closed
2021-09-22 14:53:41 29077 [main] [INFO ] com.baidu.hugegraph.HugeGraph [] - Graph 'hugegraph' has been initialized
2021-09-22 14:53:41 29089 [main] [WARN ] com.baidu.hugegraph.backend.store.BackendSessionPool [] - Current session has ever been closed
2021-09-22 14:53:41 29111 [main] [WARN ] com.baidu.hugegraph.backend.store.BackendSessionPool [] - Current session has ever been closed

启动HugeGraph:

root@test hugegraph-server ./bin/start-hugegraph.sh 
Starting HugeGraphServer...
Connecting to HugeGraphServer (http://192.168.2.127:9090/graphs)........OK

curl请求RESTfulAPI 返回结果200,代表server启动正常:

root@test hugegraph echo `curl -o /dev/null -s -w %{http_code} "http://192.168.2.127:9090/graphs/hugegraph/graph/vertices"`
200

基于Web的可视化图形界面

root@test hugegraph tar -xvf hugegraph-hubble-1.5.0.tar
root@test hugegraph mv hugegraph-hubble-1.5.0 hugegraph-hubble
root@test hugegraph cd hugegraph-hubble

修改配置文件:

root@test hugegraph-hubble vim conf/hugegraph-hubble.properties
server.host=0.0.0.0                                                                                                                                                                                                        
server.port=9090

启动web页面

root@test hugegraph-hubble ./bin/start-hubble.sh   
starting HugeGraphHubble................timed out

 _                                            _           _           _     _     _
| |__  _   _  __ _  ___  __ _ _ __ __ _ _ __ | |__       | |__  _   _| |__ | |__ | | ___
| '_ | | | |/ _` |/ _ / _` | '__/ _` | '_ | '_  _____| '_ | | | | '_ | '_ | |/ _ 
| | | | |_| | (_| |  __/ (_| | | | (_| | |_) | | | |_____| | | | |_| | |_) | |_) | |  __/
|_| |_|__,_|__, |___|__, |_|  __,_| .__/|_| |_|     |_| |_|__,_|_.__/|_.__/|_|___|
             |___/      |___/          |_|

2021-09-22 15:44:08.529  INFO 24890 --- [           main] com.baidu.hugegraph.HugeGraphHubble      : Starting HugeGraphHubble v1.5.0 on test with PID 24890 (/data/webserver/hugegraph/hugegraph-hubble/lib/hubble-be-1.5.0.jar started by root in /data/webserver/hugegraph/hugegraph-hubble)
2021-09-22 15:44:08.538  INFO 24890 --- [           main] com.baidu.hugegraph.HugeGraphHubble      : No active profile set, falling back to default profiles: default
2021-09-22 15:44:17.625  INFO 24890 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-09-22 15:44:17.626  INFO 24890 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.24]
2021-09-22 15:44:18.121  INFO 24890 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-09-22 15:44:19.402  INFO 24890 --- [           main] com.zaxxer.hikari.HikariDataSource       : hugegraph-hubble-HikariCP - Starting...
2021-09-22 15:44:19.951  INFO 24890 --- [           main] com.zaxxer.hikari.HikariDataSource       : hugegraph-hubble-HikariCP - Start completed.
2021-09-22 15:44:27.971 ERROR 24890 --- [           main] org.apache.catalina.util.Lifecyclebase   : Failed to start component [Connector[HTTP/1.1-9090]]

org.apache.catalina.LifecycleException: Protocol handler start failed
        at org.apache.catalina.connector.Connector.startInternal(Connector.java:1008) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        at org.apache.catalina.util.Lifecyclebase.start(Lifecyclebase.java:183) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        at org.apache.catalina.core.StandardService.addConnector(StandardService.java:227) [tomcat-embed-core-9.0.24.jar:9.0.24]
        at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:263) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
        at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:195) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:297) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) [spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
        at com.baidu.hugegraph.HugeGraphHubble.main(HugeGraphHubble.java:39) [hubble-be-1.5.0.jar:1.5.0]
Caused by: java.net.BindException: 地址已在使用
        at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_262]
        at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_262]
        at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_262]
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:220) ~[na:1.8.0_262]
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85) ~[na:1.8.0_262]
        at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:230) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:213) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1124) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1210) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:585) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        at org.apache.catalina.connector.Connector.startInternal(Connector.java:1005) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        ... 14 common frames omitted

2021-09-22 15:44:28.010  INFO 24890 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2021-09-22 15:44:28.027  WARN 24890 --- [           main] o.a.c.loader.WebappClassLoaderbase       : The web application [ROOT] appears to have started a thread named [MVStore background writer nio:/data/webserver/hugegraph/hugegraph-hubble/db.mv.db] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 org.h2.mvstore.MVStore$BackgroundWriterThread.run(MVStore.java:3116)
2021-09-22 15:44:28.034  WARN 24890 --- [           main] o.a.c.loader.WebappClassLoaderbase       : The web application [ROOT] appears to have started a thread named [hugegraph-hubble-HikariCP housekeeper] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 java.lang.Thread.run(Thread.java:748)
2021-09-22 15:44:28.071 ERROR 24890 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

The Tomcat connector configured to listen on port 9090 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector's configuration, identify and stop any process that's listening on port 9090, or configure this application to listen on another port.

2021-09-22 15:44:28.095  INFO 24890 --- [           main] c.b.h.handler.HubbleDisposableBean       : Hubble server will shutdown, will pause all load tasks
2021-09-22 15:44:28.183  INFO 24890 --- [           main] c.b.h.service.HugeClientPoolService      : Destroy HugeClient pool
2021-09-22 15:44:28.187  INFO 24890 --- [           main] com.zaxxer.hikari.HikariDataSource       : hugegraph-hubble-HikariCP - Shutdown initiated...
2021-09-22 15:44:28.527  INFO 24890 --- [           main] com.zaxxer.hikari.HikariDataSource       : hugegraph-hubble-HikariCP - Shutdown completed.
daptor.java:85) ~[na:1.8.0_262]
        at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:230) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:213) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1124) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1210) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:585) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        at org.apache.catalina.connector.Connector.startInternal(Connector.java:1005) ~[tomcat-embed-core-9.0.24.jar:9.0.24]
        ... 14 common frames omitted

2021-09-22 15:44:28.010  INFO 24890 --- [main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2021-09-22 15:44:28.027  WARN 24890 --- [main] o.a.c.loader.WebappClassLoaderbase       : The web application [ROOT] appears to have started a thread named [MVStore background writer nio:/data/webserver/hugegraph/hugegraph-hubble/db.mv.db] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 org.h2.mvstore.MVStore$BackgroundWriterThread.run(MVStore.java:3116)
2021-09-22 15:44:28.034  WARN 24890 --- [main] o.a.c.loader.WebappClassLoaderbase       : The web application [ROOT] appears to have started a thread named [hugegraph-hubble-HikariCP housekeeper] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 java.lang.Thread.run(Thread.java:748)
2021-09-22 15:44:28.071 ERROR 24890 --- [main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

The Tomcat connector configured to listen on port 9090 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector's configuration, identify and stop any process that's listening on port 9090, or configure this application to listen on another port.

2021-09-22 15:44:28.095  INFO 24890 --- [main] c.b.h.handler.HubbleDisposableBean       : Hubble server will shutdown, will pause all load tasks
2021-09-22 15:44:28.183  INFO 24890 --- [main] c.b.h.service.HugeClientPoolService      : Destroy HugeClient pool
2021-09-22 15:44:28.187  INFO 24890 --- [main] com.zaxxer.hikari.HikariDataSource       : hugegraph-hubble-HikariCP - Shutdown initiated...
2021-09-22 15:44:28.527  INFO 24890 --- [main] com.zaxxer.hikari.HikariDataSource       : hugegraph-hubble-HikariCP - Shutdown completed.

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/311294.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号