Git Product home page Git Product logo

Comments (6)

zhaolonghan avatar zhaolonghan commented on July 25, 2024

[root@HW-north gores]# docker-compose restart
Restarting gores_server_1 ... done
Restarting gores_mysql_1 ... done
Restarting gores_master_1 ... error
Restarting gores_worker_1 ... done
Restarting gores_redis_1 ... done

ERROR: for gores_master_1 Cannot restart container 4b26459a39fe4e282a7e1f0f0a38b96d840e3626af82b40fda38aa579aace52a: oci runtime error: container_linux.go:235: starting container process caused "container init exited prematurely"

from gitrec.

zhenghaoz avatar zhenghaoz commented on July 25, 2024

如果是尝试这个demo,那么config.toml是不需要改的,在项目根目录运行docker-compose up试试。

from gitrec.

zhaolonghan avatar zhaolonghan commented on July 25, 2024

[root@a001-0002 gores]# docker-compose stop
Stopping gores_server_1 ... done
Stopping gores_mysql_1 ... done
Stopping gores_worker_1 ... done
Stopping gores_redis_1 ... done
[root@a001-0002 gores]# ls -l
total 29664
-rw-r--r-- 1 root root 4532 Sep 14 15:06 config.toml
-rw-r--r-- 1 root root 939 Sep 14 15:05 docker-compose.yml
-rw-r--r-- 1 root root 30362341 Sep 8 21:18 github.sql
[root@a001-0002 gores]# docker-compose up
Starting gores_worker_1 ...
Starting gores_master_1 ...
Starting gores_mysql_1 ...
Starting gores_server_1 ...
Starting gores_master_1 ... error

ERROR: for gores_master_1 Cannot start service master: oci runtime error: container_linux.go:235: starting container process caused "container init exited prematurely"
Starting gores_worker_1 ... done

ERROR: for master Cannot start service master: oci runtime error: container_linux.go:235: starting container process caused "container init exited prematurely"

ERROR: Encountered errors while bringing up the project.

老师您好,我有个地方不是很明白,如果没有config.toml,master就能启动成功 但是什么都访问不到,而且会自己生成一个config.toml的文件夹。但是如果我加上这个config.toml,docker-compose就报上面的错误了

from gitrec.

zhaolonghan avatar zhaolonghan commented on July 25, 2024

master_1 | {"level":"info","ts":1631699069.3234115,"caller":"gorse-master/main.go:43","msg":"load config","config":"/etc/config.toml"}
master_1 | {"level":"info","ts":1631699069.3250608,"caller":"master/local_cache.go:46","msg":"load cache","path":"/tmp/gorse-master"}
master_1 | {"level":"warn","ts":1631699069.3251913,"caller":"master/master.go:155","msg":"failed to load local cache","error":"stat /tmp/gorse-master: no such file or directory","errorVerbose":"stat /tmp/gorse-master: no such file or directory\n/go/gorse/master/local_cache.go:50: "}
master_1 | {"level":"fatal","ts":1631699069.3307683,"caller":"master/master.go:194","msg":"failed to init database","error":"Error 1045: Access denied for user 'root'@'172.18.0.2' (using password: NO)","errorVerbose":"Error 1045: Access denied for user 'root'@'172.18.0.2' (using password: NO)\n/go/gorse/storage/data/sql.go:71: ","stacktrace":"github.com/zhenghaoz/gorse/master.(*Master).Serve\n\t/go/gorse/master/master.go:194\nmain.glob..func1\n\t/go/gorse/cmd/gorse-master/main.go:49\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:842\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:943\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:883\nmain.main\n\t/go/gorse/cmd/gorse-master/main.go:60\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:255"}
master_1 | {"level":"info","ts":1631699071.7182999,"caller":"gorse-master/main.go:43","msg":"load config","config":"/etc/config.toml"}
master_1 | {"level":"info","ts":1631699071.719047,"caller":"master/local_cache.go:46","msg":"load cache","path":"/tmp/gorse-master"}
master_1 | {"level":"warn","ts":1631699071.7191122,"caller":"master/master.go:155","msg":"failed to load local cache","error":"stat /tmp/gorse-master: no such file or directory","errorVerbose":"stat /tmp/gorse-master: no such file or directory\n/go/gorse/master/local_cache.go:50: "}
master_1 | {"level":"fatal","ts":1631699071.721038,"caller":"master/master.go:194","msg":"failed to init database","error":"Error 1045: Access denied for user 'root'@'172.18.0.2' (using password: NO)","errorVerbose":"Error 1045: Access denied for user 'root'@'172.18.0.2' (using password: NO)\n/go/gorse/storage/data/sql.go:71: ","stacktrace":"github.com/zhenghaoz/gorse/master.(*Master).Serve\n\t/go/gorse/master/master.go:194\nmain.glob..func1\n\t/go/gorse/cmd/gorse-master/main.go:49\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:842\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:943\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:883\nmain.main\n\t/go/gorse/cmd/gorse-master/main.go:60\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:255"}
master_1 | {"level":"info","ts":1631699076.102329,"caller":"gorse-master/main.go:43","msg":"load config","config":"/etc/config.toml"}
master_1 | {"level":"info","ts":1631699076.1038494,"caller":"master/local_cache.go:46","msg":"load cache","path":"/tmp/gorse-master"}
master_1 | {"level":"warn","ts":1631699076.1039662,"caller":"master/master.go:155","msg":"failed to load local cache","error":"stat /tmp/gorse-master: no such file or directory","errorVerbose":"stat /tmp/gorse-master: no such file or directory\n/go/gorse/master/local_cache.go:50: "}
master_1 | {"level":"fatal","ts":1631699076.1080313,"caller":"master/master.go:194","msg":"failed to init database","error":"Error 1045: Access denied for user 'root'@'172.18.0.2' (using password: NO)","errorVerbose":"Error 1045: Access denied for user 'root'@'172.18.0.2' (using password: NO)\n/go/gorse/storage/data/sql.go:71: ","stacktrace":"github.com/zhenghaoz/gorse/master.(*Master).Serve\n\t/go/gorse/master/master.go:194\nmain.glob..func1\n\t/go/gorse/cmd/gorse-master/main.go:49\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:842\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:943\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:883\nmain.main\n\t/go/gorse/cmd/gorse-master/main.go:60\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:255"}
master_1 | {"level":"info","ts":1631699083.6043985,"caller":"gorse-master/main.go:43","msg":"load config","config":"/etc/config.toml"}
master_1 | {"level":"info","ts":1631699083.6051028,"caller":"master/local_cache.go:46","msg":"load cache","path":"/tmp/gorse-master"}
master_1 | {"level":"warn","ts":1631699083.605169,"caller":"master/master.go:155","msg":"failed to load local cache","error":"stat /tmp/gorse-master: no such file or directory","errorVerbose":"stat /tmp/gorse-master: no such file or directory\n/go/gorse/master/local_cache.go:50: "}
master_1 | {"level":"fatal","ts":1631699083.6071794,"caller":"master/master.go:194","msg":"failed to init database","error":"Error 1045: Access denied for user 'root'@'172.18.0.2' (using password: NO)","errorVerbose":"Error 1045: Access denied for user 'root'@'172.18.0.2' (using password: NO)\n/go/gorse/storage/data/sql.go:71: ","stacktrace":"github.com/zhenghaoz/gorse/master.(*Master).Serve\n\t/go/gorse/master/master.go:194\nmain.glob..func1\n\t/go/gorse/cmd/gorse-master/main.go:49\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:842\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:943\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:883\nmain.main\n\t/go/gorse/cmd/gorse-master/main.go:60\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:255"}
master_1 | {"level":"info","ts":1631699097.721807,"caller":"gorse-master/main.go:43","msg":"load config","config":"/etc/config.toml"}
master_1 | {"level":"info","ts":1631699097.7225494,"caller":"master/local_cache.go:46","msg":"load cache","path":"/tmp/gorse-master"}
master_1 | {"level":"warn","ts":1631699097.722614,"caller":"master/master.go:155","msg":"failed to load local cache","error":"stat /tmp/gorse-master: no such file or directory","errorVerbose":"stat /tmp/gorse-master: no such file or directory\n/go/gorse/master/local_cache.go:50: "}
master_1 | {"level":"fatal","ts":1631699097.7245858,"caller":"master/master.go:194","msg":"failed to init database","error":"Error 1045: Access denied for user 'root'@'172.18.0.2' (using password: NO)","errorVerbose":"Error 1045: Access denied for user 'root'@'172.18.0.2' (using password: NO)\n/go/gorse/storage/data/sql.go:71: ","stacktrace":"github.com/zhenghaoz/gorse/master.(*Master).Serve\n\t/go/gorse/master/master.go:194\nmain.glob..func1\n\t/go/gorse/cmd/gorse-master/main.go:49\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:842\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:943\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/[email protected]/command.go:883\nmain.main\n\t/go/gorse/cmd/gorse-master/main.go:60\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:255"}
worker_1 | {"level":"error","ts":1631699119.2519853,"caller":"worker/worker.go:126","msg":"failed to get meta","error":"rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup master on 127.0.0.11:53: no such host"","stacktrace":"github.com/zhenghaoz/gorse/worker.(*Worker).Sync\n\t/go/gorse/worker/worker.go:126"}
server_1 | {"level":"error","ts":1631699119.4062195,"caller":"server/server.go:113","msg":"failed to get meta","error":"rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: lookup master on 127.0.0.11:53: no such host"","stacktrace":"github.com/zhenghaoz/gorse/server.(*Server).Sync\n\t/go/gorse/server/server.go:113"}

可能是docker的网卡问题 导致数据库连接不成功。这个就很尴尬了

from gitrec.

zhaolonghan avatar zhaolonghan commented on July 25, 2024

gorse_mysql_1 exited with code 0
[root@cainixihuan gorse]# docker-compose ps
Name Command State Ports

gorse_master_1 /usr/bin/gorse-master -c / ... Up 0.0.0.0:8086->8086/tcp, 0.0.0.0:8088->8088/tcp
gorse_mysql_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp, 33060/tcp
gorse_redis_1 docker-entrypoint.sh redis ... Up 0.0.0.0:6379->6379/tcp
gorse_server_1 /usr/bin/gorse-server --ma ... Up 0.0.0.0:8087->8087/tcp
gorse_worker_1 /usr/bin/gorse-worker --ma ... Up 0.0.0.0:8089->8089/tcp
[root@cainixihuan gorse]# curl http://127.0.0.1:8088
curl: (56) Recv failure: Connection reset by peer
[root@cainixihuan gorse]# curl http://loaclhost:8088
curl: (6) Could not resolve host: loaclhost; Unknown error
[root@cainixihuan gorse]#

这样是不是就启动成功了呢?但是为什么我访问不到呢?

from gitrec.

zhenghaoz avatar zhenghaoz commented on July 25, 2024

很奇怪啊,看起来应该是成功了😂

from gitrec.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.