I haven't seen those errors before, so it's puzzling. Is there any chance there are conflicting _zookeeper_ jars somewhere in your classpath? This looks like a problem with ZK talking to itself.
You may find it easier just to use the bin/solr script, we tried to put useful ZK commands there. Whether that would get around your error I don't know. The command you used _should_ work. "bin/solr zk -help" Best, Erick On Wed, Apr 4, 2018 at 6:14 AM, Doug Turnbull <dturnb...@opensourceconnections.com> wrote: > I've been struggling to do a basic upconfig both with embedded and actual > Zookeeper in Solr 7.2.1 using the zkcli script on OSX. > > One variable, I recently upgraded to Java 9. I get slightly different > errors on Java 8 vs 9 > > This is probably me being dumb, but googling / searching Jira hasn't really > yielded anything fruitful. Perhaps my google fu is weak this morning. > > Thanks for any help > -Doug > > > > Java 9: > > doug@wiz$~/ws/foo(mas) $ > /Users/doug/bin/solr-7.2.1/server/scripts/cloud-scripts/zkcli.sh -zkhost > localhost:2181 -cmd upconfig -confdir solr_home/foo/ -confname foo_conf > WARN - 2018-04-04 09:05:28.194; > org.apache.zookeeper.ClientCnxn$SendThread; Session 0x100244e8ffb0004 for > server localhost/127.0.0.1:2181, unexpected error, closing socket > connection and attempting reconnect > java.io.IOException: Connection reset by peer > at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method) > at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) > at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) > at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:192) > at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:382) > at > org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:68) > at > org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366) > at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141) > WARN - 2018-04-04 09:05:28.310; > org.apache.solr.common.cloud.ConnectionManager; Watcher > org.apache.solr.common.cloud.ConnectionManager@3eed2369 name: > ZooKeeperConnection Watcher:localhost:2181 got event WatchedEvent > state:Disconnected type:None path:null path: null type: None > > Java 8 gives the error > > java.io.IOException: Protocol wrong type for socket > > WARN - 2018-04-04 09:10:11.879; > org.apache.zookeeper.ClientCnxn$SendThread; Session 0x10024db7e280002 for > server localhost/0:0:0:0:0:0:0:1:2181, unexpected error, closing socket > connection and attempting reconnect > java.io.IOException: Protocol wrong type for socket > at sun.nio.ch.FileDispatcherImpl.write0(Native Method) > at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) > at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) > at sun.nio.ch.IOUtil.write(IOUtil.java:65) > at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) > at > org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:117) > at > org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366) > at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141) > > -- > CTO, OpenSource Connections > Author, Relevant Search > http://o19s.com/doug