ps -auxjava
lsof -i:2181 結果: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 778 ubuntu 100u IPv4 6162328 0t0 TCP localhost:52957->localhost:2181 (ESTABLISHED) java 7655 ubuntu 100u IPv4 5329958 0t0 TCP localhost:52651->localhost:2181 (ESTABLISHED) java 8040 ubuntu 110u IPv6 1482106 0t0 TCP localhost:50071->localhost:2181 (CLOSE_WAIT) java 12997 ubuntu 19u IPv6 360248 0t0 TCP *:2181 (LISTEN)ubuntu
(以下結果結果可能得出2181端口被zookeeper所佔用) ps 12997 結果: PID TTY STAT TIME COMMAND 12997 ? Sl 36:37 java -Dzookeeper.log.dir=. -Dzookeeper.root.logger=INFO,CONSOLE -cp /home/ubuntu/soft/zookeeper-3.4.5/bin/../build/classes:/home/ubuntu/soft/zookeeper-3.4.5/bin/../build/lib/*.jar:/home/ubuntu/soft ubuntu@ip-172-31-8-33:~/soft/event-service/say-service-event-provider-0.0.1-SNAPSHOT/bin$ide
dateui
原理,替換/etc/localtime文件,不須要重啓 sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime進程