dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Bug] [worker] A NullPointerException occurs when the worker node is connected to zookeeper during capacity expansion startup

Open hanpi14 opened this issue 3 years ago • 5 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

I have implemented k8s deployment for dolphinscheduler 3.1.7, but now I want to build a work node outside the container and test it according to the contents of the official website, but there is a null pointer exception connecting to zookeeper, can you help me image

What you expected to happen

image

How to reproduce

我这边针对dolphinscheduler 3.1.7进行可k8s部署,但现在想在容器外构建一个work节点,按照官网内容进行测试,但是一直存在连接zookeeper的空指针异常,本身我们这边在k8s有三个zookeeper节点,通过负载均衡向外部暴露了一个ip与端口用于连接,但是在3.1.7版本的dolphinscheduler存在获取到了容器内部的域名出现了NullPointerException

Anything else

No response

Version

3.1.x

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

hanpi14 avatar Nov 13 '23 10:11 hanpi14

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

I have implemented k8s deployment for dolphinscheduler 3.1.7, but now I want to build a work node outside the container and test it according to the contents of the official website, but there is a null pointer exception connecting to zookeeper, can you help me image

What you expected to happen

image

How to reproduce

I have implemented k8s deployment for dolphinscheduler 3.1.7, but now I want to build a work node outside the container and test it according to the official website. However, there is always a null pointer exception connecting to zookeeper. We have three zookeeper nodes in k8s. , an IP and port are exposed to the outside through load balancing for connection, but the existence of dolphinscheduler in version 3.1.7 obtains the domain name inside the container and a NullPointerException occurs.

Anything else

No response

Version

3.1.x

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

github-actions[bot] avatar Nov 13 '23 10:11 github-actions[bot]

This seems caused by curator, could you please paste your log rather provide a picture?

ruanwenjun avatar Nov 15 '23 12:11 ruanwenjun

Below is the error log

[INFO] 2023-11-13 15:00:09.693 +0800 org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener:[48] - [WorkflowInstance-0][TaskIns tance-0] - Registry reconnected [INFO] 2023-11-13 15:00:09.693 +0800 org.apache.dolphinscheduler.server.worker.registry.WorkerConnectionStateListener:[46] - [WorkflowInstance-0][TaskInstance- 0] - Worker received a RECONNECTED event from registry, the current server state is RUNNING [INFO] 2023-11-13 15:00:09.693 +0800 org.apache.dolphinscheduler.server.worker.registry.WorkerWaitingStrategy:[96] - [WorkflowInstance-0][TaskInstance-0] - no need to reconnect, as the current server status is running [INFO] 2023-11-13 15:00:09.709 +0800 org.apache.curator.framework.imps.EnsembleTracker:[201] - [WorkflowInstance-0][TaskInstance-0] - New config event received : {server.1=dolphinscheduler-zookeeper-0.dolphinscheduler-zookeeper-headless.dolphinscheduler-system.svc.cluster.local:2888:3888:participant;0.0.0.0:2181, vers ion=0, server.3=dolphinscheduler-zookeeper-2.dolphinscheduler-zookeeper-headless.dolphinscheduler-system.svc.cluster.local:2888:3888:participant;0.0.0.0:2181, server.2=dolphinscheduler-zookeeper-1.dolphinscheduler-zookeeper-headless.dolphinscheduler-system.svc.cluster.local:2888:3888:participant;0.0.0.0:2181} [ERROR] 2023-11-13 15:00:09.749 +0800 org.apache.curator.framework.imps.CuratorFrameworkImpl:[733] - [WorkflowInstance-0][TaskInstance-0] - Background exceptio n was not retry-able or retry gave up java.lang.NullPointerException: null at org.apache.curator.utils.Compatibility.getHostAddress(Compatibility.java:116) at org.apache.curator.framework.imps.EnsembleTracker.configToConnectionString(EnsembleTracker.java:185) at org.apache.curator.framework.imps.EnsembleTracker.processConfigData(EnsembleTracker.java:206) at org.apache.curator.framework.imps.EnsembleTracker.access$300(EnsembleTracker.java:50) at org.apache.curator.framework.imps.EnsembleTracker$2.processResult(EnsembleTracker.java:150) at org.apache.curator.framework.imps.CuratorFrameworkImpl.sendToBackgroundCallback(CuratorFrameworkImpl.java:926) at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:683) at org.apache.curator.framework.imps.WatcherRemovalFacade.processBackgroundOperation(WatcherRemovalFacade.java:152) at org.apache.curator.framework.imps.GetConfigBuilderImpl$2.processResult(GetConfigBuilderImpl.java:222) at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:634) at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:553) [INFO] 2023-11-13 15:00:11.783 +0800 org.apache.dolphinscheduler.server.worker.task.WorkerHeartBeatTask:[89] - [WorkflowInstance-0][TaskInstance-0] - Success w rite worker group heartBeatInfo into registry, workerRegistryPath: /nodes/worker/10.11.52.195:1234 workerHeartBeatInfo: {"startupTime":1699857926881,"reportTim e":1699858811743,"cpuUsage":0.0,"memoryUsage":0.15,"loadAverage":0.0,"availablePhysicalMemorySize":13.3,"maxCpuloadAvg":16.0,"reservedMemory":0.3,"diskAvailabl e":28.69,"serverStatus":0,"processId":42234,"workerHostWeight":100,"workerWaitingTaskCount":0,"workerExecThreadCount":100} [WARN] 2023-11-13 15:00:17.760 +0800 org.apache.zookeeper.ClientCnxn:[1292] - [WorkflowInstance-0][TaskInstance-0] - Session 0x300445e43d00015 for server 10.20 .235.1/10.20.235.1:8116, Closing socket connection. Attempting reconnect except it is a SessionExpiredException. org.apache.zookeeper.ClientCnxn$EndOfStreamException: Unable to read additional data from server sessionid 0x300445e43d00015, likely server has closed socket at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:77) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1282) [INFO] 2023-11-13 15:00:17.861 +0800 org.apache.curator.framework.state.ConnectionStateManager:[252] - [WorkflowInstance-0][TaskInstance-0] - State change: SUS PENDED [WARN] 2023-11-13 15:00:17.862 +0800 org.apache.dolphinscheduler.plugin.registry.zookeeper.ZookeeperConnectionStateListener:[52] - [WorkflowInstance-0][TaskIns tance-0] - Registry suspended [INFO] 2023-11-13 15:00:17.862 +0800 org.apache.dolphinscheduler.server.worker.registry.WorkerConnectionStateListene

hanpi14 avatar Nov 16 '23 01:11 hanpi14

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] avatar Dec 17 '23 00:12 github-actions[bot]

This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.

github-actions[bot] avatar Dec 25 '23 00:12 github-actions[bot]