Star

Nebula Graph Studio(nebula-web-docker)部署启动出错

前提

在一台新机器环境下,部署nebula-web-docker启动失败

操作

部署按照文档
https://github.com/vesoft-inc/nebula-web-docker/blob/master/docs/nebula-graph-studio-user-guide-cn.md

部署日志输出

[root@nebula31 nebula-web-docker]# docker-compose pull && docker-compose up
Pulling client   ... done
Pulling web      ... done
Pulling importer ... done
Pulling nginx    ... done
nebula-web-docker_importer_1 is up-to-date
nebula-web-docker_client_1 is up-to-date
Recreating nebula-web-docker_web_1 ... done
Recreating nebula-web-docker_nginx_1 ... done
Attaching to nebula-web-docker_importer_1, nebula-web-docker_client_1, nebula-web-docker_web_1, nebula-web-docker_nginx_1
nginx_1     | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx_1     | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx_1     | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx_1     | 10-listen-on-ipv6-by-default.sh: Getting the checksum of /etc/nginx/conf.d/default.conf
importer_1  | 2020/09/04 10:26:49 --- START OF NEBULA IMPORTER ---
importer_1  | 2020/09/04 10:26:49 [INFO] httpserver.go:80: Starting http server on 5699
importer_1  | 2020/09/04 10:28:48 --- START OF NEBULA IMPORTER ---
importer_1  | 2020/09/04 10:28:48 [INFO] httpserver.go:80: Starting http server on 5699
client_1    | 2020/09/04 10:26:49.954 [I] [asm_amd64.s:1357]  http server Running on http://0.0.0.0:8080
client_1    | 2020/09/04 10:28:48.751 [I] [asm_amd64.s:1357]  http server Running on http://0.0.0.0:8080
nginx_1     | 10-listen-on-ipv6-by-default.sh: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
nginx_1     | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx_1     | /docker-entrypoint.sh: Configuration complete; ready for start up
web_1       |
web_1       | > nebula-graph-studio@1.1.1-beta docker-start /nebula-graph-studio
web_1       | > egg-scripts start --title=egg-server-nebula-graph-studio
web_1       |
web_1       | [egg-scripts] Starting egg application at /nebula-graph-studio
web_1       | [egg-scripts] Run node --require /nebula-graph-studio/node_modules/source-map-support/register.js /nebula-graph-studio/node_modules/egg-scripts/lib/start-cluster {"title":"egg-server-nebula-graph-studio","baseDir":"/nebula-graph-studio","framework":"/nebula-graph-studio/node_modules/egg"} --title=egg-server-nebula-graph-studio
web_1       | 2020-09-21 04:03:20,274 INFO 41 [master] =================== egg start =====================
web_1       | 2020-09-21 04:03:20,276 INFO 41 [master] node version v10.18.0
web_1       | 2020-09-21 04:03:20,276 INFO 41 [master] egg version 2.28.0
web_1       | 2020-09-21 04:03:20,276 INFO 41 [master] start with options:
web_1       | {
web_1       |   "framework": "/nebula-graph-studio/node_modules/egg",
web_1       |   "baseDir": "/nebula-graph-studio",
web_1       |   "workers": 12,
web_1       |   "plugins": null,
web_1       |   "https": false,
web_1       |   "title": "egg-server-nebula-graph-studio"
web_1       | }
web_1       | 2020-09-21 04:03:20,276 INFO 41 [master] start with env: isProduction: true, EGG_SERVER_ENV: undefined, NODE_ENV: production
web_1       | 2020-09-21 04:03:20,286 INFO 41 [master] agent_worker#1:48 start with clusterPort:40771
web_1       | 2020-09-21 04:03:20,692 INFO 48 Plugin development is disabled by env unmatched, require env(local) but got env is prod
web_1       | Error: ENOENT: no such file or directory, mkdir '/upload-dir/tmp'
web_1       |     at Object.mkdirSync (fs.js:757:3)
web_1       |     at exports.default (/nebula-graph-studio/config/config.default.ts:19:8)
web_1       |     at AgentWorkerLoader.loadFile (/nebula-graph-studio/node_modules/egg-core/lib/loader/egg_loader.js:304:13)
web_1       |     at AgentWorkerLoader._loadConfig (/nebula-graph-studio/node_modules/egg-core/lib/loader/mixin/config.js:85:25)
web_1       |     at AgentWorkerLoader._preloadAppConfig (/nebula-graph-studio/node_modules/egg-core/lib/loader/mixin/config.js:70:27)
web_1       |     at AgentWorkerLoader.loadConfig (/nebula-graph-studio/node_modules/egg-core/lib/loader/mixin/config.js:28:28)
web_1       |     at AgentWorkerLoader.loadConfig (/nebula-graph-studio/node_modules/egg/lib/loader/agent_worker_loader.js:16:11)
web_1       |     at new EggApplication (/nebula-graph-studio/node_modules/egg/lib/egg.js:54:17)
web_1       |     at new Agent (/nebula-graph-studio/node_modules/egg/lib/agent.js:22:5)
web_1       |     at Object.<anonymous> (/nebula-graph-studio/node_modules/egg-cluster/lib/agent_worker.js:28:15)
web_1       | 2020-09-21 04:03:20,717 ERROR 41 nodejs.AgentWorkerDiedError: [master] agent_worker#1:48 died (code: 1, signal: null)
web_1       |     at Master.onAgentExit (/nebula-graph-studio/node_modules/egg-cluster/lib/master.js:425:17)
web_1       |     at Master.emit (events.js:198:13)
web_1       |     at Messenger.sendToMaster (/nebula-graph-studio/node_modules/egg-cluster/lib/utils/messenger.js:137:17)
web_1       |     at Messenger.send (/nebula-graph-studio/node_modules/egg-cluster/lib/utils/messenger.js:102:12)
web_1       |     at ChildProcess.agentWorker.once (/nebula-graph-studio/node_modules/egg-cluster/lib/master.js:289:22)
web_1       |     at Object.onceWrapper (events.js:286:20)
web_1       |     at ChildProcess.emit (events.js:198:13)
web_1       |     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
web_1       | name: "AgentWorkerDiedError"
web_1       | pid: 41
web_1       | hostname: 7d4d74321876
web_1       |
web_1       | 2020-09-21 04:03:20,717 ERROR 41 [master] agent_worker#1:48 start fail, exiting with code:1
web_1       | 2020-09-21 04:03:20,717 ERROR 41 [master] exit with code:1
web_1       | npm ERR! code ELIFECYCLE
web_1       | npm ERR! errno 1
web_1       | npm ERR! nebula-graph-studio@1.1.1-beta docker-start: `egg-scripts start --title=egg-server-nebula-graph-studio`
web_1       | npm ERR! Exit status 1
web_1       | npm ERR!
web_1       | npm ERR! Failed at the nebula-graph-studio@1.1.1-beta docker-start script.
web_1       | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
web_1       |
web_1       | npm ERR! A complete log of this run can be found in:
web_1       | npm ERR!     /root/.npm/_logs/2020-09-21T04_03_20_737Z-debug.log
nebula-web-docker_web_1 exited with code 1

期望

nebula-studio启动正常

检查下相关端口是否被占用:7001

lsof -i :7001

[root@nebula31 ~]# lsof -i :7001
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
docker-pr 121455 root 4u IPv6 447113 0t0 TCP *:afs3-callback (LISTEN)

看起来这个端口已经有一个服务了的样子,如果当前服务不需要,可以kill掉:

kill -9 121466

如果当前服务还需要,看下能否指定其他端口来启动,因为7001是studio默认启动的端口

我执行了kill -9 后,重新执行docker-compose pull && docker-compose up。控制台输出相同的启动出错日志。

哦,我知道了,你在nebula-web-docker目录下执行:

mkdir -p uploads/tmp

然后启动再试试

1赞

目前看,启动正常了,studio页面也可以登陆进去了。谢谢

客气,可能跟不同环境的权限有关,正常这个文件夹是会在启动的时候自动创建的,这个地方我改一下,默认把它初始化到我们的仓库里去吧。:handshake:

是的,之前其他环境上,启动没有问题。 :+1:

1赞

浙ICP备20010487号