Linux下啓動tomcat報錯,WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected erro

  tomcat啓動完了以後,一直不停的打印這種錯誤信息,看表面上,應該是zk節點下的數據是空的,鏈接不上服務,因此一直在嘗試鏈接,而後一直又連不上;java

完整的錯誤信息:apache

407662 [usf-ZooKeeper:dsf_default-Registry-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
407662 [usf-ZooKeeper:dsf_default-Registry-SendThread(127.0.0.1:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: 

                                at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
408763 [usf-ZooKeeper:dsf_default-Registry-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
408763 [usf-ZooKeeper:dsf_default-Registry-SendThread(127.0.0.1:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: 

                                at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
409864 [usf-ZooKeeper:dsf_default-Registry-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
409864 [usf-ZooKeeper:dsf_default-Registry-SendThread(127.0.0.1:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: 

                                at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
410965 [usf-ZooKeeper:dsf_default-Registry-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
410965 [usf-ZooKeeper:dsf_default-Registry-SendThread(127.0.0.1:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: 

                                at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
412066 [usf-ZooKeeper:dsf_default-Registry-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
412066 [usf-ZooKeeper:dsf_default-Registry-SendThread(127.0.0.1:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: 

                                at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
413167 [usf-ZooKeeper:dsf_default-Registry-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
413167 [usf-ZooKeeper:dsf_default-Registry-SendThread(127.0.0.1:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: 

                                at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)

  緣由:又是爲了一己之私,省事兒,把服務上的WEB-INFO無情刪除,而後用jenkins打包後,就一直有這個問題了,很無奈,找了個大牛給瞅了瞅,說zk一直在嘗試連我本地的zk,說明服務上是否是少了一些zk的配置文件呢?大牛給了我提示,我就去classes下看配置文件,和本地的對比了下,果真,少了一個dsf.properties的配置文件,裏面就有zk的一些配置,而後手動把這個配置文件給添加到服務上,重啓了下,啓動成功了!原來這個配置文件是經過提交checklist手動添加的,jenkins不會自動的給打進去,致使了這個尷尬的問題,不過好歹解決了,內心仍是鬆了一口氣的!tomcat

  配置文件內容以下,應該都是一些dsf的配置項:session

############################################
# DSF Core Configuration
############################################
# dsf app name, keep unique in distributed system
dsf.appname=duiba
# dsf global service timeout in millis
dsf.service.timeout=10000
# core size for dsf handle service request thread pool 
dsf.worker.core.size=20
# max size for dsf handle service request thread pool 
dsf.worker.max.size=40
# queue size for dsf handler service request thread pool 
dsf.worker.queues=1000
logTraceSwitch=true
############################################
# DSF Default trace switch
############################################
dsf.trace.switch=true
dsf.sampleRate=1
############################################
# DSF Fail Policy Configuration
############################################
# dsf request fail policy
dsf.service.failpolicy=failover
############################################
# DSF Fail Over Policy Configuration
############################################
dsf.resend.times=3

# dsf timeout configuraion
dsf.client.request.resend.interval=5
dsf.client.request.resend.times=0

############################################
# DSF Registry Configuration
############################################
dsf.registry.name=zk
dsf.registry.default=zk
############################################
# DSF ZK Registry Configuration
############################################
dsf.registry.zk.type=zookeeper
dsf.registry.zk.connector=DsfZKClient

############################################
# DSF Protocol Configuration
############################################
dsf.protocol.name=dsf
dsf.protocol.default=dsf
############################################
#dsf statistics center switch #default: false
dsf.statistics.switch=false
############################################
# DSF TCP Protocol Configuration
############################################
# dsf tcp protocol type
dsf.protocol.tcp.type=dsf
# dsf tcp protocol listen address,this address must be server address
dsf.protocol.tcp.address=192.168.177.66:22206
#dsf.protocol.tcp.address=10.73.158.171:22106
# max size for dsf tcp protocol acceptor thread pool
dsf.protocol.tcp.threads=1
# queue size for dsf tcp protocol acceptor thread pool
dsf.protocol.tcp.accepts=100
# max size for dsf tcp protocol io thread pool
dsf.protocol.tcp.iothreads=20
# queue size for dsf tcp protocol io thread pool
dsf.protocol.tcp.queues=1000000
# async request waiting quque size for dsf tcp protocol
dsf.protocol.tcp.async.queues=800000
# determine whether dsf tcp protocol iplimit enabled
dsf.protocol.tcp.iplimit.enable=false
# dsf tcp protocol iplimit whiltelist 
#dsf.protocol.tcp.iplimit.whitelist=*
# dsf tcp protocol iplimit blacklist
#dsf.protocol.tcp.iplimit.blacklist=
# dsf tcp protocol heartbeat interval in seconds
dsf.protocol.tcp.heartbeat.interval=5
# dsf tcp protocol heartbeat lost count
dsf.protocol.tcp.heartbeat.lostcount=5
# max size for dsf tcp protocol client io thread pool
dsf.protocol.tcp.client.iothreads=1
# queue size for dsf tcp protocol client io thread pool
dsf.protocol.tcp.client.queues=100000
# dsf tcp protocol client reconnect interval in seconds
dsf.protocol.tcp.client.reconnect.interval=3
# dsf tcp protocol client first connect wait time  in millis
dsf.protocol.tcp.client.connect.firstwait=2000

############################################
# DSF Statistic Configuration
############################################
dsf.statistic.delay.enable=false

############################################
# DSF Monitor Configuration
############################################
# dsf time delay monitor time interval in seconds
dsf.monitor.time.interval=30

############################################
# DSF Default Route Policy
############################################
# dsf global route policy, available: poll, random, serviceDelayTimeRouter
dsf.router.default=poll
dsf.router.poll.localpriority=false

##USF config
zk.server.url=10.211.95.114:6830
zk.session.timeout=50000
rpc.address=192.168.177.66:28914
shutdown.graceful.wait.timeout=60000
slow.service.open=true
slow.service.client.time=500
slow.service.server.time=400

##updata to dsf3.0 add begin
# DSF threadpool monitor config
threadpool.monitor.switch=true
# unit(s)
threadpool.monitor.interval=30
dsf.application=duiba
#is need auth when zk client connect zk server,on|off
zk.auth.switch=off
zk.auth.dir=
#is need auth when dsf client connect dsf server,true|false
dsf.authentication.enable=false
dsf.rpc.login.identity=
##updata to dsf3.0 add end
相關文章
相關標籤/搜索