Can't start the CITA ## cita无法启动
dis-happy opened this issue · 8 comments
dis-happy commented
Description
cita无法启动
Steps to Reproduce
- cita is running, then the machine is reboot
- ./bin/cita setup test-chain/0
- ./bin/cita start test-chain/0
2019-06-24 - 15:01:39 | amqp::session - 293 | ERROR - Error in reading loop: Protocol("Connection reset by peer (os error 104)")
2019-06-24 - 15:01:39 | panic_hook - 62 | ERROR -
============================
stack backtrace:
0: 0x560d6182ae3d - backtrace::backtrace::trace::h2fa4a4b03a68fa58
1: 0x560d6182aa22 - <backtrace::capture::Backtrace as core::default::Default>::default::hd76880f98258d727
2: 0x560d61829d34 - panic_hook::panic_hook::h6acfb65a9809653e
3: 0x560d61829a68 - core::ops::function::Fn::call::h46e818f151f5101c
4: 0x560d61a98ff8 - rust_panic_with_hook
at src/libstd/panicking.rs:482
5: 0x560d61a98a91 - continue_panic_fmt
at src/libstd/panicking.rs:385
6: 0x560d61a989de - begin_panic_fmt
at src/libstd/panicking.rs:340
7: 0x560d6153ee6c - pubsub_rabbitmq::start_rabbitmq::h1bd7dddab7a94898
8: 0x560d614a0321 - cita_chain::main::hbf8df8d6c63b4954
9: 0x560d6149c972 - std::rt::lang_start::{{closure}}::h8b6ac89ca4d31523
10: 0x560d61a98912 - {{closure}}
at src/libstd/rt.rs:49
- do_call<closure,i32>
at src/libstd/panicking.rs:297
11: 0x560d61a9e1b9 - __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:87
12: 0x560d61a9941c - try<i32,closure>
at src/libstd/panicking.rs:276
- catch_unwind<closure,i32>
at src/libstd/panic.rs:388
- lang_start_internal
at src/libstd/rt.rs:48
13: 0x560d614a0bf1 - main
14: 0x7fa65f274b96 - __libc_start_main
15: 0x560d614940a9 - _start
16: 0x0 - <unknown>
position:
Thread main panicked at failed to open url amqp://guest:guest@localhost/test-chain/0 : Protocol("Connection reset by peer (os error 104)"), /opt/.cargo/git/checkouts/cita-common-1aad419f3e80ba17/73402b5/pubsub_rabbitmq/src/lib.rs:60
This is a bug. Please report it at:
https://github.com/cryptape/cita/issues/new?labels=bug&template=bug_report.md
Versions
v0.24.1
Additional Information
此时,需要将服务器上的mq进程停掉,然后重新setup后,才可正常启动。
kaikai1024 commented
Thank you. We'll check that.
leeyr338 commented
CITA 使用 RabbitMQ 作为服务间通信的消息总线,这个组件会占用一个默认的端口。
CITA 在启动时会将其 docker 内的端口映射到宿主机上。
所以,当服务器上已经启动了 MQ 进程的话,会导致 CITA 内的 MQ 由于端口冲突而启动不成功,从而导致你所提到的问题。
关于这点,CITA FAQ 有描述。
dis-happy commented
服务器没有单独安装过RabbitMQ服务,难道是安装过cita的历史版本的问题?
leeyr338 commented
你使用 docker ps 看一下,是不是以前启动过 CITA,而没有关闭?
如果是,只需要 docker stop 对应该的容器就可以了。
dis-happy commented
stop容器不管用,现在是服务器reboot后,就会有一个mq的进程,有可能是之前安装旧版本cita残留的吧
leeyr338 commented
不会!cita (包括 MQ ) 是在容器中启动的,不会影响主机的初始化程序。
应该是之前有人单独把 RabbitMQ 安装到主机上了,如果不需要是否可以在操作系统初始化中去掉,或者卸载掉?
kaikai1024 commented
Check systemctl status rabbitmq-server.service
, maybe rabbitmq is automatic started when you reboot the system.
kaikai1024 commented
@dis-happy Is it ok now?