dependency failed to start: container sentry-self-hosted-kafka-1 is unhealthy
Self-Hosted Version
23.11.0.dev0
CPU Architecture
x86_64
Docker Version
24.0.5, build ced0996
Docker Compose Version
2.23.0
Steps to Reproduce
- upgrade Sentry using install.sh
- start Sentry using docker-compose up -d
Expected Result
Sentry works
Actual Result
Event ID
No response
already upgraded to 16GB of RAM by the way in case it was a RAM problem. it's definitely not.
here is htop
Can you try to start everything up again, and when Kafka fails, please immediately do docker compose --env-file .env.custom logs kafka --since 10m. We need to see the logs to aid the troubleshooting process.
Also what Linux distro are you running on?
I'll have a go at the above next week. Need to restore the Sentry server for now as it is a live server.
Distro is Amazon Linux 2023
Does the self-hosted Sentry server need to accept inbound calls from external websites at any point? I ask because we have it locked-down by IP at the moment, perhaps that is causing a problem with Kafka??? (I'm clutching at straws here...)
Hey, this kind of error is happening with Clickhouse also.
see getsentry/snuba#5226
@hubertdeng123, do you have an idea of this issue? :)
I'll have a go at the above next week. Need to restore the Sentry server for now as it is a live server.
Distro is Amazon Linux 2023
Does the self-hosted Sentry server need to accept inbound calls from external websites at any point? I ask because we have it locked-down by IP at the moment, perhaps that is causing a problem with Kafka??? (I'm clutching at straws here...)
@darrelajonas Docker itself uses their own hostname resolver to resolve a container name being used as a host to its' private IP mapping. To address that, you can:
- Make sure you're allowing every private IP range. That is: (see more https://en.wikipedia.org/wiki/Reserved_IP_addresses)
10.0.0.0/8172.16.0.0/12192.168.0.0/16
- Edit your
/etc/docker/daemon.jsonfile, and add IP range that are safe to use for your network, for me it was10.147.0.0/16and10.146.0.0/16, as such: (see these for references: https://docs.docker.com/engine/reference/commandline/dockerd/, https://straz.to/2021-09-08-docker-address-pools/){ "default-address-pools": [ { "base": "10.147.0.0/16", "size": 24 }, { "base": "10.146.0.0/16", "size": 24 } ] }
Let me know if that resolve the problem. Otherwise, we need to debug some more.
Hey, this kind of error is happening with Clickhouse also.
▶ Downloading and installing wal2json ... ▶ Bootstrapping and migrating Snuba ... Network sentry-self-hosted_default Creating Network sentry-self-hosted_default Created Container sentry-self-hosted-clickhouse-1 Creating Container sentry-self-hosted-redis-1 Creating Container sentry-self-hosted-zookeeper-1 Creating Container sentry-self-hosted-clickhouse-1 Created Container sentry-self-hosted-redis-1 Created Container sentry-self-hosted-zookeeper-1 Created Container sentry-self-hosted-kafka-1 Creating Container sentry-self-hosted-kafka-1 Created Container sentry-self-hosted-clickhouse-1 Starting Container sentry-self-hosted-redis-1 Starting Container sentry-self-hosted-zookeeper-1 Starting Container sentry-self-hosted-zookeeper-1 Started Container sentry-self-hosted-zookeeper-1 Waiting Container sentry-self-hosted-clickhouse-1 Started Container sentry-self-hosted-redis-1 Started Container sentry-self-hosted-zookeeper-1 Healthy Container sentry-self-hosted-kafka-1 Starting Container sentry-self-hosted-kafka-1 Started dependency failed to start: container sentry-self-hosted-clickhouse-1 is unhealthy Error in install/bootstrap-snuba.sh:3. '$dcr snuba-api bootstrap --no-migrate --force' exited with status 1 -> ./install.sh:main:31 --> install/bootstrap-snuba.sh:source:3 Cleaning up...Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: buster
Hey @aamarques can you please create a separate issue for this? Or head over to Discord on #self-hosted channel to talk about the issue you're facing.
Hey, this kind of error is happening with Clickhouse also.
▶ Downloading and installing wal2json ... ▶ Bootstrapping and migrating Snuba ... Network sentry-self-hosted_default Creating Network sentry-self-hosted_default Created Container sentry-self-hosted-clickhouse-1 Creating Container sentry-self-hosted-redis-1 Creating Container sentry-self-hosted-zookeeper-1 Creating Container sentry-self-hosted-clickhouse-1 Created Container sentry-self-hosted-redis-1 Created Container sentry-self-hosted-zookeeper-1 Created Container sentry-self-hosted-kafka-1 Creating Container sentry-self-hosted-kafka-1 Created Container sentry-self-hosted-clickhouse-1 Starting Container sentry-self-hosted-redis-1 Starting Container sentry-self-hosted-zookeeper-1 Starting Container sentry-self-hosted-zookeeper-1 Started Container sentry-self-hosted-zookeeper-1 Waiting Container sentry-self-hosted-clickhouse-1 Started Container sentry-self-hosted-redis-1 Started Container sentry-self-hosted-zookeeper-1 Healthy Container sentry-self-hosted-kafka-1 Starting Container sentry-self-hosted-kafka-1 Started dependency failed to start: container sentry-self-hosted-clickhouse-1 is unhealthy Error in install/bootstrap-snuba.sh:3. '$dcr snuba-api bootstrap --no-migrate --force' exited with status 1 -> ./install.sh:main:31 --> install/bootstrap-snuba.sh:source:3 Cleaning up...Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: busterHey @aamarques can you please create a separate issue for this? Or head over to Discord on
#self-hostedchannel to talk about the issue you're facing.
Done getsentry/snuba#5226
I'll have a go at the above next week. Need to restore the Sentry server for now as it is a live server. Distro is Amazon Linux 2023 Does the self-hosted Sentry server need to accept inbound calls from external websites at any point? I ask because we have it locked-down by IP at the moment, perhaps that is causing a problem with Kafka??? (I'm clutching at straws here...)
@darrelajonas Docker itself uses their own hostname resolver to resolve a container name being used as a host to its' private IP mapping. To address that, you can:
Make sure you're allowing every private IP range. That is: (see more https://en.wikipedia.org/wiki/Reserved_IP_addresses)
10.0.0.0/8172.16.0.0/12192.168.0.0/16Edit your
/etc/docker/daemon.jsonfile, and add IP range that are safe to use for your network, for me it was10.147.0.0/16and10.146.0.0/16, as such: (see these for references: https://docs.docker.com/engine/reference/commandline/dockerd/, https://straz.to/2021-09-08-docker-address-pools/){ "default-address-pools": [ { "base": "10.147.0.0/16", "size": 24 }, { "base": "10.146.0.0/16", "size": 24 } ] }Let me know if that resolve the problem. Otherwise, we need to debug some more.
I went to /etc/docker but it is an empty folder...
I'll have a go at the above next week. Need to restore the Sentry server for now as it is a live server.
Distro is Amazon Linux 2023
Does the self-hosted Sentry server need to accept inbound calls from external websites at any point? I ask because we have it locked-down by IP at the moment, perhaps that is causing a problem with Kafka??? (I'm clutching at straws here...)
@darrelajonas Docker itself uses their own hostname resolver to resolve a container name being used as a host to its' private IP mapping. To address that, you can:
Make sure you're allowing every private IP range. That is: (see more https://en.wikipedia.org/wiki/Reserved_IP_addresses)
10.0.0.0/8172.16.0.0/12192.168.0.0/16Edit your
/etc/docker/daemon.jsonfile, and add IP range that are safe to use for your network, for me it was10.147.0.0/16and10.146.0.0/16, as such: (see these for references: https://docs.docker.com/engine/reference/commandline/dockerd/, https://straz.to/2021-09-08-docker-address-pools/){ "default-address-pools": [ { "base": "10.147.0.0/16", "size": 24 }, { "base": "10.146.0.0/16", "size": 24 } ] }Let me know if that resolve the problem. Otherwise, we need to debug some more.
I went to
/etc/dockerbut it is an empty folder...
@darrelajonas yes, you gotta create the file yourself.
I am also facing similar issue.
Error Logs (Kafka)
===> User uid=0(root) gid=0(root) groups=0(root) ===> Configuring ... ===> Running preflight checks ... ===> Check if /var/lib/kafka/data is writable ... ===> Check if Zookeeper is healthy ... ===> Launching ... ===> Launching kafka ... [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:zookeeper.version=3.5.8-f439ca583e70862c3068a1f2a7d4d068eec33315, built on 05/04/2020 15:53 GMT [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:host.name=2119b8985157 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.version=1.8.0_222 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.vendor=Azul Systems, Inc. [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.home=/usr/lib/jvm/zulu-8-amd64/jre [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.class.path=/etc/confluent/docker/docker-utils.jar [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.io.tmpdir=/tmp [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.compiler=[main] INFO org.apache.zookeeper.ZooKeeper - Client environment:os.name=Linux [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:os.arch=amd64 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:os.version=5.15.49-linuxkit-pr [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:user.name=root [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:user.home=/root [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:user.dir=/ [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:os.memory.free=87MB [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:os.memory.max=1321MB [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:os.memory.total=90MB [main] INFO org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=zookeeper:2181 sessionTimeout=40000 watcher=io.confluent.admin.utils.ZookeeperConnectionWatcher@65b3120a [main] INFO org.apache.zookeeper.common.X509Util - Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation [main] INFO org.apache.zookeeper.ClientCnxnSocket - jute.maxbuffer value is 4194304 Bytes [main] INFO org.apache.zookeeper.ClientCnxn - zookeeper.request.timeout value is 0. feature enabled= [main-SendThread(zookeeper:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server zookeeper/172.20.0.4:2181. Will not attempt to authenticate using SASL (unknown error) [main-SendThread(zookeeper:2181)] INFO org.apache.zookeeper.ClientCnxn - Socket connection established, initiating session, client: /172.20.0.5:45350, server: zookeeper/172.20.0.4:2181 [main-SendThread(zookeeper:2181)] INFO org.apache.zookeeper.ClientCnxn - Session establishment complete on server zookeeper/172.20.0.4:2181, sessionid = 0x10000015e9c0000, negotiated timeout = 40000 [main] INFO org.apache.zookeeper.ZooKeeper - Session: 0x10000015e9c0000 closed [main-EventThread] INFO org.apache.zookeeper.ClientCnxn - EventThread shut down for session: 0x10000015e9c0000 [2023-12-09 15:59:03,738] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$) [2023-12-09 15:59:07,237] WARN The package io.confluent.support.metrics.collectors.FullCollector for collecting the full set of support metrics could not be loaded, so we are reverting to anonymous, basic metric collection. If you are a Confluent customer, please refer to the Confluent Platform documentation, section Proactive Support, on how to activate full metrics collection. (io.confluent.support.metrics.KafkaSupportConfig) [2023-12-09 15:59:07,239] WARN The support metrics collection feature ("Metrics") of Proactive Support is disabled. (io.confluent.support.metrics.SupportedServerStartable) [2023-12-09 15:59:14,132] INFO Starting the log cleaner (kafka.log.LogCleaner) [2023-12-09 15:59:14,490] INFO [kafka-log-cleaner-thread-0]: Starting (kafka.log.LogCleaner) [2023-12-09 15:59:17,087] INFO Awaiting socket connections on 0.0.0.0:9092. (kafka.network.Acceptor) [2023-12-09 15:59:17,331] INFO [SocketServer brokerId=1001] Created data-plane acceptor and processors for endpoint : EndPoint(0.0.0.0,9092,ListenerName(PLAINTEXT),PLAINTEXT) (kafka.network.SocketServer) [2023-12-09 15:59:17,339] INFO [SocketServer brokerId=1001] Started 1 acceptor threads for data-plane (kafka.network.SocketServer) [2023-12-09 15:59:17,868] INFO Creating /brokers/ids/1001 (is it secure? false) (kafka.zk.KafkaZkClient) [2023-12-09 15:59:18,029] INFO Stat of the created znode at /brokers/ids/1001 is: 744,744,1702137557960,1702137557960,1,0,0,72057599920177153,180,0,744 (kafka.zk.KafkaZkClient) [2023-12-09 15:59:18,038] INFO Registered broker 1001 at path /brokers/ids/1001 with addresses: ArrayBuffer(EndPoint(kafka,9092,ListenerName(PLAINTEXT),PLAINTEXT)), czxid (broker epoch): 744 (kafka.zk.KafkaZkClient) [2023-12-09 15:59:20,757] INFO [/config/changes-event-process-thread]: Starting (kafka.common.ZkNodeChangeNotificationListener$ChangeEventProcessThread) [2023-12-09 15:59:22,204] INFO [SocketServer brokerId=1001] Started data-plane processors for 1 acceptors (kafka.network.SocketServer)
Are these logs generated using @aldy505's instructions above?
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀