Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "go server 启动失败,服务器将不可用" after npm run dev-all #264

Closed
TommyLemon opened this issue Jul 28, 2022 · 10 comments
Labels
affects/none PR/issue: this bug affects none version. severity/none Severity of bug type/bug Type: something is unexpected wontfix Solution: this will not be worked on

Comments

@TommyLemon
Copy link

TommyLemon commented Jul 28, 2022

Describe the bug (must be provided)
"go server 启动失败,服务器将不可用"

image

image

image

And even I couldn't connect my centos 7 server after the command for several times. It recovered after I rebooted it.

image

image

Your Environments (must be provided)

image

How To Reproduce(must be provided)

Steps to reproduce the behavior:

  1. cd nebula-studio-3.4.0
  2. npm install
  3. npm run dev-all

Expected behavior

Run server successfully.

Additional context

> nebula-graph-studio@3.4.0 dev-all /www/wwwroot/nebula-studio-3.4.0
> node ./config/server.js

(node:3369) ExperimentalWarning: The fs.promises API is experimental
<i> [webpack-dev-server] [HPM] Proxy created: /api-nebula/**  -> http://127.0.0.1:9000
<i> [webpack-dev-server] [HPM] Proxy created: /api/**  -> http://127.0.0.1:9000
Listening at localhost: 7001
Opening your system browser...
server::go build -ldflags '' -o bin/studio studio.go

go server 启动失败,服务器将不可用,请切换到 server 目录调试异常

<e> [webpack-dev-middleware] HookWebpackError: Not supported
<e>     at makeWebpackError (/www/wwwroot/nebula-studio-3.4.0/node_modules/webpack/lib/HookWebpackError.js:48:9)
<e>     at hooks.processAssets.callAsync.err (/www/wwwroot/nebula-studio-3.4.0/node_modules/webpack/lib/Compilation.js:3060:12)
<e>     at eval (eval at create (/www/wwwroot/nebula-studio-3.4.0/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:52:1)
<e>     at err (/www/wwwroot/nebula-studio-3.4.0/node_modules/webpack/lib/Compilation.js:510:26)
<e>     at compilation.hooks.processAssets.tapAsync (/www/wwwroot/nebula-studio-3.4.0/node_modules/copy-webpack-plugin/dist/index.js:710:13)
<e>     at process._tickCallback (internal/process/next_tick.js:68:7)
<e> -- inner error --
<e> Error: Not supported
<e>     at compilation.hooks.processAssets.tapAsync (/www/wwwroot/nebula-studio-3.4.0/node_modules/copy-webpack-plugin/dist/index.js:706:13)
<e>     at fn (/www/wwwroot/nebula-studio-3.4.0/node_modules/webpack/lib/Compilation.js:509:9)
<e>     at Hook.eval [as callAsync] (eval at create (/www/wwwroot/nebula-studio-3.4.0/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:50:1)
<e>     at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/www/wwwroot/nebula-studio-3.4.0/node_modules/tapable/lib/Hook.js:18:14)
<e>     at cont (/www/wwwroot/nebula-studio-3.4.0/node_modules/webpack/lib/Compilation.js:3057:34)
<e>     at createChunkAssets.err (/www/wwwroot/nebula-studio-3.4.0/node_modules/webpack/lib/Compilation.js:3105:10)
<e>     at symbolIterator (/www/wwwroot/nebula-studio-3.4.0/node_modules/neo-async/async.js:3485:9)
<e>     at timesSync (/www/wwwroot/nebula-studio-3.4.0/node_modules/neo-async/async.js:2297:7)
<e>     at Object.eachLimit (/www/wwwroot/nebula-studio-3.4.0/node_modules/neo-async/async.js:3463:5)
<e>     at Compilation.createChunkAssets (/www/wwwroot/nebula-studio-3.4.0/node_modules/webpack/lib/Compilation.js:4522:12)
<e> caused by plugins in Compilation.hooks.processAssets
<e> Error: Not supported
<e>     at compilation.hooks.processAssets.tapAsync (/www/wwwroot/nebula-studio-3.4.0/node_modules/copy-webpack-plugin/dist/index.js:706:13)
<e>     at fn (/www/wwwroot/nebula-studio-3.4.0/node_modules/webpack/lib/Compilation.js:509:9)
<e>     at Hook.eval [as callAsync] (eval at create (/www/wwwroot/nebula-studio-3.4.0/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:50:1)
<e>     at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/www/wwwroot/nebula-studio-3.4.0/node_modules/tapable/lib/Hook.js:18:14)
<e>     at cont (/www/wwwroot/nebula-studio-3.4.0/node_modules/webpack/lib/Compilation.js:3057:34)
<e>     at createChunkAssets.err (/www/wwwroot/nebula-studio-3.4.0/node_modules/webpack/lib/Compilation.js:3105:10)
<e>     at symbolIterator (/www/wwwroot/nebula-studio-3.4.0/node_modules/neo-async/async.js:3485:9)
<e>     at timesSync (/www/wwwroot/nebula-studio-3.4.0/node_modules/neo-async/async.js:2297:7)
<e>     at Object.eachLimit (/www/wwwroot/nebula-studio-3.4.0/node_modules/neo-async/async.js:3463:5)
<e>     at Compilation.createChunkAssets (/www/wwwroot/nebula-studio-3.4.0/node_modules/webpack/lib/Compilation.js:4522:12)
@TommyLemon TommyLemon changed the title Error: "go server 启动失败,服务器将不可用" when npm run dev-all or npm run dev Error: "go server 启动失败,服务器将不可用" when npm run dev-all Jul 28, 2022
@TommyLemon TommyLemon changed the title Error: "go server 启动失败,服务器将不可用" when npm run dev-all Error: "go server 启动失败,服务器将不可用" after npm run dev-all Jul 28, 2022
@hetao92
Copy link
Contributor

hetao92 commented Aug 2, 2022

could you use go run server/api/studio/studio.go to specific server error information. it need golang environment.
Btw, i suggestion use rpm on CentOs directly. refer to doc

@TommyLemon
Copy link
Author

go run server/api/studio/studio.go

thx, I'll try

@TommyLemon
Copy link
Author

TommyLemon commented Aug 2, 2022

@hetao92 it still shows me the same error
image

go run server/api/studio/studio.go
image

[root@izbp110l2aupfn0cocrcmgz nebula-studio-3.4.0]# go run server/api/studio/studio.go
server/api/studio/studio.go:9:2: no required module provides package github.com/vesoft-inc/go-pkg/middleware: go.mod file not found in current directory or any parent directory; see 'go help modules'
server/api/studio/studio.go:10:2: no required module provides package github.com/vesoft-inc/nebula-http-gateway/ccore/nebula/gateway/pool: go.mod file not found in current directory or any parent directory; see 'go help modules'
server/api/studio/studio.go:11:2: no required module provides package github.com/vesoft-inc/nebula-studio/server-v2/api/studio/internal/config: go.mod file not found in current directory or any parent directory; see 'go help modules'
server/api/studio/studio.go:12:2: no required module provides package github.com/vesoft-inc/nebula-studio/server-v2/api/studio/internal/handler: go.mod file not found in current directory or any parent directory; see 'go help modules'
server/api/studio/studio.go:13:2: no required module provides package github.com/vesoft-inc/nebula-studio/server-v2/api/studio/internal/service/importer: go.mod file not found in current directory or any parent directory; see 'go help modules'
server/api/studio/studio.go:14:2: no required module provides package github.com/vesoft-inc/nebula-studio/server-v2/api/studio/internal/svc: go.mod file not found in current directory or any parent directory; see 'go help modules'
server/api/studio/studio.go:15:2: no required module provides package github.com/vesoft-inc/nebula-studio/server-v2/api/studio/pkg/auth: go.mod file not found in current directory or any parent directory; see 'go help modules'
server/api/studio/studio.go:16:2: no required module provides package github.com/vesoft-inc/nebula-studio/server-v2/api/studio/pkg/logging: go.mod file not found in current directory or any parent directory; see 'go help modules'
server/api/studio/studio.go:17:2: no required module provides package github.com/vesoft-inc/nebula-studio/server-v2/api/studio/pkg/utils: go.mod file not found in current directory or any parent directory; see 'go help modules'
server/api/studio/studio.go:18:2: no required module provides package github.com/zeromicro/go-zero/core/conf: go.mod file not found in current directory or any parent directory; see 'go help modules'
server/api/studio/studio.go:19:2: no required module provides package github.com/zeromicro/go-zero/core/proc: go.mod file not found in current directory or any parent directory; see 'go help modules'
server/api/studio/studio.go:20:2: no required module provides package github.com/zeromicro/go-zero/rest: go.mod file not found in current directory or any parent directory; see 'go help modules'
server/api/studio/studio.go:21:2: no required module provides package github.com/zeromicro/go-zero/rest/httpx: go.mod file not found in current directory or any parent directory; see 'go help modules'
server/api/studio/studio.go:22:2: no required module provides package go.uber.org/zap: go.mod file not found in current directory or any parent directory; see 'go help modules'
[root@izbp110l2aupfn0cocrcmgz nebula-studio-3.4.0]# 
[root@izbp110l2aupfn0cocrcmgz nebula-studio-3.4.0]# npm run dev-all

> nebula-graph-studio@3.4.0 dev-all /www/wwwroot/nebula-studio-3.4.0
> node ./config/server.js

(node:21246) ExperimentalWarning: The fs.promises API is experimental
<i> [webpack-dev-server] [HPM] Proxy created: /api-nebula/**  -> http://127.0.0.1:9000
<i> [webpack-dev-server] [HPM] Proxy created: /api/**  -> http://127.0.0.1:9000
process exits with code: 1
/www/wwwroot/nebula-studio-3.4.0/node_modules/webpack-dev-server/lib/Server.js:2432
        throw error;
        ^

Error: listen EADDRINUSE 127.0.0.1:7001
    at Server.setupListenHandle [as _listen2] (net.js:1334:14)
    at listenInCluster (net.js:1382:12)
    at GetAddrInfoReqWrap.doListen [as callback] (net.js:1508:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:62:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nebula-graph-studio@3.4.0 dev-all: `node ./config/server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the nebula-graph-studio@3.4.0 dev-all script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-08-02T09_48_11_499Z-debug.log
[root@izbp110l2aupfn0cocrcmgz nebula-studio-3.4.0]# 

@wey-gu
Copy link
Contributor

wey-gu commented Aug 2, 2022

Have you run backend build with:

cd server/api/studio
go build -o server

before "dev-all" ?

I guess go based backend should be built before starting everything up :-D.

update: dev-all will build the go server, too, you are doing right :-p
But still, it's worth trying for a go server build:

$ cd ./server/api/studio
$ make run
[root@izbp110l2aupfn0cocrcmgz nebula-studio-3.4.0]# go run server/api/studio/studio.go
...
server/api/studio/studio.go:22:2: no required module provides package go.uber.org/zap: go.mod file not found in current directory or any parent directory; see 'go help modules'

@veezhang
Copy link
Contributor

veezhang commented Aug 3, 2022

@TommyLemon Have you tried the following commands?

cd server/api/studio
make run

And please paste the output if failed, thx.

@hetao92
Copy link
Contributor

hetao92 commented Aug 3, 2022

You don't need to execute npm run dev-all now. This is used to quickly start the front and back services at the same time, but it seems that your server can't start. There is a problem with golang on your virtual machine and the server fails to start. Could you use our rpm package to deploy studio directly? If you want to deploy source code, you may need to modify the configuration of golang like go env -w GO111MODULE=auto

@TommyLemon
Copy link
Author

TommyLemon commented Aug 17, 2022

Thank you all.
I changed my server to a Ubuntu 20.04, while it still showed me the same error above.
Then I switched to a former version 3.2.3, it stepped forward a lot together with [nebula-graph 3.0.0](wget https://oss-cdn.nebula-graph.com.cn/package/3.0.0/nebula-graph-3.0.0.ubuntu2204.amd64.deb).
But there is another error:

Error from chokidar (/home/tommy/nebula-studio-3.2.3/node_modules/lodash-es): Error: ENOSPC: System limit for number of file watchers reached, watch '/home/tommy/nebula-studio-3.2.3/node_modules/lodash-es/util.default.js'

image

@TommyLemon
Copy link
Author

Have you run backend build with:

cd server/api/studio
go build -o server

before "dev-all" ?

I guess go based backend should be built before starting everything up :-D.

update: dev-all will build the go server, too, you are doing right :-p But still, it's worth trying for a go server build:

$ cd ./server/api/studio
$ make run
[root@izbp110l2aupfn0cocrcmgz nebula-studio-3.4.0]# go run server/api/studio/studio.go
...
server/api/studio/studio.go:22:2: no required module provides package go.uber.org/zap: go.mod file not found in current directory or any parent directory; see 'go help modules'

@wey-gu @veezhang No such file or directory in nebula-studio-3.2.3

^Croot@tommy:/home/tommy/nebula-studio-3.2.3# cd ./server/api/studio
bash: cd: ./server/api/studio: No such file or directory
root@tommy:/home/tommy/nebula-studio-3.2.3# cd server/api/studio
bash: cd: server/api/studio: No such file or directory
root@tommy:/home/tommy/nebula-studio-3.2.3# 

image

@wey-gu
Copy link
Contributor

wey-gu commented Aug 22, 2022

in 3.2.3, the go server side isn't embedded in NebulaStudio, instead, it relied on the http gateway, thus there is no such folder yet.

@Sophie-Xie Sophie-Xie added the type/bug Type: something is unexpected label Nov 30, 2022
@HarrisChu HarrisChu added affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Dec 1, 2022
@hetao92
Copy link
Contributor

hetao92 commented Dec 5, 2022

Due to no progress for a month, this issue is closed first, if you have a new update, you can open the issue again.

@hetao92 hetao92 closed this as completed Dec 5, 2022
@github-actions github-actions bot added the process/fixed Process of bug label Dec 5, 2022
@liangliangc liangliangc added wontfix Solution: this will not be worked on and removed process/fixed Process of bug labels Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/none PR/issue: this bug affects none version. severity/none Severity of bug type/bug Type: something is unexpected wontfix Solution: this will not be worked on
Projects
None yet
Development

No branches or pull requests

7 participants