繁体   English   中英

是否有人将Stellar的Docker Compose迁移到Kubernetes并解决了Stellar Horizo​​n DB的问题?

[英]Has anyone migrated Stellar's Docker Compose to Kubernetes and fixed the issue with Stellar Horizon DB?

我可能遇到了Horizo​​n中描述的相同问题:如果数据库连接失败#898( https://github.com/stellar/go/issues/898 ),但设置不同,它不会退出。

我正在将https://github.com/satoshipay/docker-stellar-horizo​​n Docker Compose定义迁移到Kubernetes。 我已经能够迁移大部分设置,但是遇到了Horizo​​n问题,即在启动过程中未创建数据库。 我相信我拥有出色的核心,并且依赖于Postgres的设计工作以及作为启动过程创建的数据库的依赖,但是Horizo​​n的设置有所不同。

我要解决的当前问题如下...

Horizo​​n Server Pod日志

todkapmcbookpro:kubernetes todd$ kubectl get pods
NAME                                READY     STATUS             RESTARTS   AGE
postgres-horizon-564d479db4-2xvqd   1/1       Running            0          20m
postgres-sc-9f5f7fb4-prlpr          1/1       Running            0          22m
stellar-core-7ff77b4db8-tx4mt       1/1       Running            0          18m
stellar-horizon-6cff98554b-d7djn    0/1       CrashLoopBackOff   8          18m
todkapmcbookpro:kubernetes todd$ kubectl logs stellar-horizon-6cff98554b-d7djn
Initializing Horizon database...
2019/05/02 12:58:09 connect failed: pq: database "stellar-horizon" does not exist
Horizon database initialization failed (possibly because it has been done before)
2019/05/02 12:58:09 pq: database "stellar-horizon" does not exist
todkapmcbookpro:kubernetes todd$ 

Horizo​​n Postgres DB荚日志

todkapmcbookpro:kubernetes todd$ kubectl logs postgres-horizon-564d479db4-2xvqd
2019-05-02 12:40:06.424 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2019-05-02 12:40:06.424 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2019-05-02 12:40:06.437 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-05-02 12:40:06.444 UTC [23] LOG:  database system was interrupted; last known up at 2019-05-02 12:38:19 UTC
2019-05-02 12:40:06.453 UTC [23] LOG:  database system was not properly shut down; automatic recovery in progress
2019-05-02 12:40:06.454 UTC [23] LOG:  redo starts at 0/1636FB8
2019-05-02 12:40:06.454 UTC [23] LOG:  invalid record length at 0/1636FF0: wanted 24, got 0
2019-05-02 12:40:06.454 UTC [23] LOG:  redo done at 0/1636FB8
2019-05-02 12:40:06.459 UTC [1] LOG:  database system is ready to accept connections
2019-05-02 12:42:35.675 UTC [30] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:42:35.690 UTC [31] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:42:37.123 UTC [32] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:42:37.136 UTC [33] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:42:50.131 UTC [34] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:42:50.153 UTC [35] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:43:16.094 UTC [36] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:43:16.115 UTC [37] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:43:57.097 UTC [38] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:43:57.111 UTC [39] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:45:21.050 UTC [40] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:45:21.069 UTC [41] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:48:05.122 UTC [42] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:48:05.145 UTC [43] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:53:07.077 UTC [44] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:53:07.099 UTC [45] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:58:09.084 UTC [46] FATAL:  database "stellar-horizon" does not exist
2019-05-02 12:58:09.098 UTC [47] FATAL:  database "stellar-horizon" does not exist
2019-05-02 13:03:18.055 UTC [48] FATAL:  database "stellar-horizon" does not exist
2019-05-02 13:03:18.071 UTC [49] FATAL:  database "stellar-horizon" does not exist
2019-05-02 13:08:28.057 UTC [50] FATAL:  database "stellar-horizon" does not exist
2019-05-02 13:08:28.078 UTC [51] FATAL:  database "stellar-horizon" does not exist
2019-05-02 13:13:42.071 UTC [52] FATAL:  database "stellar-horizon" does not exist
2019-05-02 13:13:42.097 UTC [53] FATAL:  database "stellar-horizon" does not exist
2019-05-02 13:18:55.128 UTC [54] FATAL:  database "stellar-horizon" does not exist
2019-05-02 13:18:55.152 UTC [55] FATAL:  database "stellar-horizon" does not exist

如果Horizo​​n和Core的设置相同(尤其是与DB配置env属性有关的设置),则将是理想的。 我认为我的设置正确,但是可能缺少一些细微之处。

我在此WIP的一个分支中发生了故障。 我在此分支中包含了一个快速设置脚本以及一个迷你库。 https://github.com/todkap/stellar-testnet/tree/k8-deploy/kubernetes

我们能够解决并发表了一篇文章,展示了端到端的流程。 https://itnext.io/how-to-deploy-a-stellar-validator-on-kubernetes-with-helm-a111e5dfe437

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM