high-hospital-85984
04/03/2023, 1:32 PM2023-04-03 13:21:27,918 [R2 Nio Event Loop-1-1] WARN c.l.r.t.h.c.c.ChannelPoolLifecycle - Failed to create channel, remote=localhost/127.0.0.1:8080
io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:8080
Caused by: java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:777)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.base/java.lang.Thread.run(Thread.java:829)
2023-04-03 13:21:27,919 [ThreadPoolTaskExecutor-1] ERROR c.l.m.k.MetadataChangeEventsProcessor - MCE Processor Error
com.linkedin.r2.RemoteInvocationException: com.linkedin.r2.RemoteInvocationException: Failed to get response from server for URI <http://localhost:8080/entities>
----
2023-04-03 13:21:27,919 [ThreadPoolTaskExecutor-1] INFO c.l.m.k.MetadataChangeEventsProcessor - Error while processing MCE: FailedMetadataChangeEvent - {error=com.linkedin.r2.RemoteInvocationException: com.linkedin.r2.RemoteInvocationException: Failed to get response from server for URI <http://localhost:8080/entities>
Why would the MCE trying to call <http://localhost:8080/entities> ? I checked, and GMS_HOST is correct.lively-cat-88289
04/03/2023, 1:32 PMhigh-hospital-85984
04/03/2023, 1:33 PMhigh-hospital-85984
04/03/2023, 1:36 PMEnvironment:
KAFKA_BOOTSTRAP_SERVER: <removed>
KAFKA_SCHEMAREGISTRY_URL: <removed>
SPRING_KAFKA_PROPERTIES_BASIC_AUTH_USER_INFO: <set to the key 'SPRING_KAFKA_PROPERTIES_BASIC_AUTH_USER_INFO' in secret 'datahub-mce-static-secrets-40e2f3c14cc7940864930b25efabd577'> Optional: false
MCE_CONSUMER_ENABLED: true
GMS_HOST: wolt-datahub-gms
GMS_PORT: 8080
SPRING_KAFKA_PROPERTIES_SSL_KEYSTORE_PASSWORD: <set to the key 'SSL_KEYSTORE_PASSWORD' in secret 'datahub-mce-static-secrets-40e2f3c14cc7940864930b25efabd577'> Optional: false
SPRING_KAFKA_PROPERTIES_SSL_TRUSTSTORE_PASSWORD: <set to the key 'KAFKA_SSL_TRUSTSTORE_PASSWORD' in secret 'datahub-mce-static-secrets-40e2f3c14cc7940864930b25efabd577'> Optional: false
SPRING_KAFKA_PROPERTIES_SSL_KEYSTORE_LOCATION: /vault/secrets/client.keystore.p12
SPRING_KAFKA_PROPERTIES_SSL_TRUSTSTORE_LOCATION: /vault/secrets/client.truststore.jks
SPRING_KAFKA_PROPERTIES_SECURITY_PROTOCOL: SSL
SPRING_KAFKA_PROPERTIES_KAFKA_SECURITY_PROTOCOL: SSL
SPRING_KAFKA_PROPERTIES_SSL_KEYSTORE_TYPE: PKCS12
SPRING_KAFKA_PROPERTIES_SSL_TRUSTSTORE_TYPE: JKS
SPRING_KAFKA_PROPERTIES_SSL_PROTOCOL: TLS
SPRING_KAFKA_PROPERTIES_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM:
SPRING_KAFKA_PROPERTIES_BASIC_AUTH_CREDENTIALS_SOURCE: USER_INFO
ENABLE_PROMETHEUS: truehigh-hospital-85984
04/03/2023, 1:41 PMhttp://<GMS_HOST>:8080/entities (but get a 401) so itโs reachableorange-night-91387
04/03/2023, 4:32 PMhigh-hospital-85984
04/03/2023, 4:39 PMhigh-hospital-85984
04/03/2023, 4:40 PMNote this is only relevant when running async mode or emitting events directly to the MCP topic, otherwise this shouldnโt have any impact on your event processing.Is there any documentation on this or a PR I can investigate?
orange-night-91387
04/03/2023, 6:06 PMfierce-guitar-16421
04/06/2023, 8:47 AMv0.10.1. It also happened with some randomness across our deployments, and our solution is to rerun the Helm deployment.
@high-hospital-85984 Maybe you could search the logs of datahub-gms and see if there is a root cause which stopped the GMS service from starting? In our case there was an exception, namely
java.lang.UnsupportedOperationException: Failed to find Typeref schema associated with Config-based Entity. If that is the case, then maybe redeploying will fix it, like we did.
My rough guess is that there is some timing issue between the loading of typeref schema and the starting of the service. Iโm pasting the stacktrace in case anyone would like to investigate further.able-evening-90828
04/19/2023, 5:40 PMorange-night-91387
04/19/2023, 5:48 PMorange-night-91387
04/19/2023, 5:49 PMable-evening-90828
04/19/2023, 5:57 PMWARN c.l.r.t.h.c.c.ChannelPoolLifecycle:139 - Failed to create channel, remote=localhost/127.0.0.1:8080 three times.
And then ERROR c.d.m.ingestion.IngestionScheduler:244 - Failed to retrieve ingestion sources! Skipping updating schedule cache until next refresh. start: 0, count: 30
Would failure to retrieve ingestion sources cause GMS to crash?
I also checked the gms.debug.log in the pod and there doesn't seem to be any new information.orange-night-91387
04/19/2023, 6:11 PM"Latest system update version: VERSION"
Or:
System version is not up to date: VERSION. Waiting for datahub-upgrade to complete..orange-night-91387
04/19/2023, 6:11 PMable-evening-90828
04/19/2023, 6:23 PMkafka restarted when all these started happening.
[2023-04-18 11:09:35,078] INFO [KafkaServer id=0] shut down completed (kafka.server.KafkaServer)able-evening-90828
04/19/2023, 6:25 PMkafka has the following log. Does this ring a bell?
[2023-04-18 11:09:31,814] INFO Terminating process due to signal SIGTERM (org.apache.kafka.common.utils.LoggingSignalHandler)orange-night-91387
04/19/2023, 6:27 PMable-evening-90828
04/19/2023, 6:28 PMkafka restarted itself immediately after this. Is GMS supposed to be able to handle this gracefully when kafka restarts?orange-night-91387
04/19/2023, 6:57 PMable-evening-90828
04/19/2023, 7:06 PMkafka when it detected that it was shutdown.able-evening-90828
04/19/2023, 7:48 PMkafka and all the prerequisites pods restarted successfully and has been healthy.
kafka
[2023-04-18 11:14:51,698] INFO Session establishment complete on server prerequisites-zookeeper/10.116.5.208:2181, session id = 0x100000779830001, negotiated timeout = 18000 (org.apache.zookeeper.ClientCnxn)able-evening-90828
04/19/2023, 7:50 PMkafka was restarted before zookeeper. So there was a period when kafka wasn't able to connect to zk, but eventually it did.able-evening-90828
04/20/2023, 10:45 PMable-evening-90828
04/20/2023, 10:47 PMExecuting bootstrap step 1/13 with name WaitForSystemUpdateStep...orange-night-91387
04/20/2023, 10:59 PMable-evening-90828
04/20/2023, 11:05 PMorange-night-91387
04/20/2023, 11:14 PMable-evening-90828
04/20/2023, 11:17 PMsending DataHubUpgradeHistory_v1 --partitions 1 --config <http://retention.ms|retention.ms>=-1 --topic DataHubUpgradeHistory_v1orange-night-91387
04/20/2023, 11:18 PMable-evening-90828
04/20/2023, 11:22 PM[2023-04-18 11:12:41,725] INFO Completed load of Log(dir=/bitnami/kafka/data/DataHubUpgradeHistory_v1-0, topicId=OPUSuZLGR4i6YAW5cxeK8Q, topic=DataHubUpgradeHistory_v1, partition=0, highWatermark=3, lastStableOffset=3, logStartOffset=3, logEndOffset=3) with 1 segments in 14ms (59/61 loaded in /bitnami/kafka/data) (kafka.log.LogManager)orange-night-91387
04/20/2023, 11:51 PMorange-night-91387
04/20/2023, 11:51 PMable-evening-90828
04/21/2023, 12:05 AMDataHubUpgradeHistory_v1. Do you see anything wrong?
2023-04-18 11:13:37,858 [main] INFO o.a.k.clients.consumer.KafkaConsumer:974 - [Consumer clientId=consumer-datahub-duhe-consumer-job-client-gms-2, groupId=datahub-duhe-consumer-job-client-gms] Subscribed to topic(s): DataHubUpgradeHistory_v1
2023-04-18 11:13:40,071 [ThreadPoolTaskExecutor-1] INFO o.a.k.c.c.i.ConsumerCoordinator:604 - [Consumer clientId=consumer-datahub-duhe-consumer-job-client-gms-2, groupId=datahub-duhe-consumer-job-client-gms] Finished assignment for group at generation 3: {consumer-datahub-duhe-consumer-job-client-gms-2-8db409fc-86f7-49a7-8932-8291759d0385=Assignment(partitions=[DataHubUpgradeHistory_v1-0])}
2023-04-18 11:13:40,129 [ThreadPoolTaskExecutor-1] INFO o.a.k.c.c.i.ConsumerCoordinator:273 - [Consumer clientId=consumer-datahub-duhe-consumer-job-client-gms-2, groupId=datahub-duhe-consumer-job-client-gms] Adding newly assigned partitions: DataHubUpgradeHistory_v1-0
2023-04-18 11:13:40,187 [ThreadPoolTaskExecutor-1] INFO o.a.k.c.c.i.ConsumerCoordinator:1299 - [Consumer clientId=consumer-datahub-duhe-consumer-job-client-gms-2, groupId=datahub-duhe-consumer-job-client-gms] Found no committed offset for partition DataHubUpgradeHistory_v1-0
2023-04-18 11:13:40,331 [ThreadPoolTaskExecutor-1] INFO o.a.k.c.c.i.SubscriptionState:397 - [Consumer clientId=consumer-datahub-duhe-consumer-job-client-gms-2, groupId=datahub-duhe-consumer-job-client-gms] Resetting offset for partition DataHubUpgradeHistory_v1-0 to offset 3.
2023-04-18 11:13:40,412 [ThreadPoolTaskExecutor-1] INFO o.a.k.clients.consumer.KafkaConsumer:1603 - [Consumer clientId=consumer-datahub-duhe-consumer-job-client-gms-2, groupId=datahub-duhe-consumer-job-client-gms] Seeking to offset 2 for partition DataHubUpgradeHistory_v1-0
2023-04-18 11:13:40,418 [ThreadPoolTaskExecutor-1] INFO o.s.k.l.KafkaMessageListenerContainer:292 - datahub-duhe-consumer-job-client-gms: partitions assigned: [DataHubUpgradeHistory_v1-0]
2023-04-18 11:13:40,472 [ThreadPoolTaskExecutor-1] INFO o.a.k.c.consumer.internals.Fetcher:1274 - [Consumer clientId=consumer-datahub-duhe-consumer-job-client-gms-2, groupId=datahub-duhe-consumer-job-client-gms] Fetch offset 2 is out of range for partition DataHubUpgradeHistory_v1-0, resetting offset
2023-04-18 11:13:40,486 [ThreadPoolTaskExecutor-1] INFO o.a.k.c.c.i.SubscriptionState:397 - [Consumer clientId=consumer-datahub-duhe-consumer-job-client-gms-2, groupId=datahub-duhe-consumer-job-client-gms] Resetting offset for partition DataHubUpgradeHistory_v1-0 to offset 3.able-evening-90828
04/21/2023, 12:07 AM2023-04-19 17:30:19,254 [ThreadPoolTaskExecutor-1] INFO c.l.m.k.b.DataHubUpgradeKafkaListener:82 - Latest system update version: null-4able-evening-90828
04/21/2023, 12:52 AM$ /opt/bitnami/kafka/bin/kafka-console-consumer.sh --topic DataHubUpgradeHistory_v1 --bootstrap-server localhost:9092 --from-beginning
null-4
null-5
Below was the log when the last time GMS was updated and successfully started, which was before the GKE maintenance update.
2023-04-07 20:36:38,884 [ThreadPoolTaskExecutor-1] INFO c.l.m.k.b.DataHubUpgradeKafkaListener:82 - Latest system update version: null-3
So it looks like the message before and including null-3 were all lost. Do you have any suggestions on what to look next and how this might have happened?able-evening-90828
04/21/2023, 4:56 AM-1) retention.ms policy for DataHubUpgradeHistory_v1 was somehow not honored. When I printed out all the configs for the topic, the retention.ms turned out to be the default 7 days.
$ /opt/bitnami/kafka/bin/kafka-configs.sh --entity-type topics --entity-name DataHubUpgradeHistory_v1 --bootstrap-server localhost:9092 --describe --all | grep "<http://retention.ms|retention.ms>"
<http://retention.ms|retention.ms>=604800000 sensitive=false synonyms={}
<http://delete.retention.ms|delete.retention.ms>=86400000 sensitive=false synonyms={DEFAULT_CONFIG:<http://log.cleaner.delete.retention.ms|log.cleaner.delete.retention.ms>=86400000}
In comparison, the retention period (30 days) for MetadataChangeLog_Timeseries_v1 was honored.
$ /opt/bitnami/kafka/bin/kafka-configs.sh --entity-type topics --entity-name MetadataChangeLog_Timeseries_v1 --bootstrap-server localhost:9092 --describe --all | grep "<http://retention.ms|retention.ms>"
<http://retention.ms|retention.ms>=7776000000 sensitive=false synonyms={DYNAMIC_TOPIC_CONFIG:<http://retention.ms|retention.ms>=7776000000}
<http://delete.retention.ms|delete.retention.ms>=86400000 sensitive=false synonyms={DEFAULT_CONFIG:<http://log.cleaner.delete.retention.ms|log.cleaner.delete.retention.ms>=86400000}able-evening-90828
04/21/2023, 5:50 AMkafka-setup.sh that David fixed two month ago and was released as part of v0.10.1.
https://github.com/datahub-project/datahub/commit/b4b3a398291ee6aa2a1bbd7ca04a11eec3eb86f0#diff-49b80548c7d96c9546170e[โฆ]dd67c4cd9f0655736156526R119
As a result, all DH deployed prior to v0.10.1 doesn't have the retention set correctly for DataHubUpgradeHistory_v1.
And deploying a version >= v0.10.1 also doesn't fix the problem because the kafka setup script doesn't create the topic if it already exists. So kafka stuck with the wrong retention setting for that topic.
In my opinion this is a pretty serious issue because any such cluster would suddenly stop working if their GMS restarts more than 7 days after their last system update job is run.able-evening-90828
04/21/2023, 4:09 PMable-evening-90828
04/21/2023, 4:43 PMbrainy-tent-14503
04/21/2023, 11:32 PM