Getting "javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake" on Glassfish, not using java -


i getting javax.net.ssl.sslhandshakeexception: remote host closed connection during handshake error when lauch code in glassfish, runs java ...

full stack trace:

2016-01-27t17:26:47.078+0100|avertissement: caught exception executing step: com.ibm.jbatch.container.exception.batchcontainerruntimeexception: javax.net.ssl.sslhandshakeexception: remote host closed connection during handshake  @ com.ibm.jbatch.container.artifact.proxy.batchletproxy.process(batchletproxy.java:36) @ com.ibm.jbatch.container.impl.batchletstepcontrollerimpl.invokebatchlet(batchletstepcontrollerimpl.java:79) @ com.ibm.jbatch.container.impl.batchletstepcontrollerimpl.invokecorestep(batchletstepcontrollerimpl.java:107) @ com.ibm.jbatch.container.impl.basestepcontrollerimpl.execute(basestepcontrollerimpl.java:144) @ com.ibm.jbatch.container.impl.executiontransitioner.doexecutionloop(executiontransitioner.java:112) @ com.ibm.jbatch.container.impl.jobthreadrootcontrollerimpl.originateexecutiononthread(jobthreadrootcontrollerimpl.java:110) @ com.ibm.jbatch.container.util.batchworkunit.run(batchworkunit.java:80) @ java.util.concurrent.executors$runnableadapter.call(executors.java:471) @ java.util.concurrent.futuretask.run(futuretask.java:262) @ org.glassfish.enterprise.concurrent.internal.managedfuturetask.run(managedfuturetask.java:141) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:724) @ org.glassfish.enterprise.concurrent.managedthreadfactoryimpl$managedthread.run(managedthreadfactoryimpl.java:250)  caused by: javax.net.ssl.sslhandshakeexception: remote host closed connection during handshake @ sun.security.ssl.sslsocketimpl.readrecord(sslsocketimpl.java:946) @ sun.security.ssl.sslsocketimpl.performinitialhandshake(sslsocketimpl.java:1312) @ sun.security.ssl.sslsocketimpl.writerecord(sslsocketimpl.java:702) @ sun.security.ssl.appoutputstream.write(appoutputstream.java:122) @ sun.nio.cs.streamencoder.writebytes(streamencoder.java:221) @ sun.nio.cs.streamencoder.implflushbuffer(streamencoder.java:291) @ sun.nio.cs.streamencoder.implflush(streamencoder.java:295) @ sun.nio.cs.streamencoder.flush(streamencoder.java:141) @ java.io.outputstreamwriter.flush(outputstreamwriter.java:229) @ javaeetutorial.batch.webserverlog.--- @ com.ibm.jbatch.container.artifact.proxy.batchletproxy.process(batchletproxy.java:33) ... 13 more  caused by: java.io.eofexception: ssl peer shut down incorrectly @ sun.security.ssl.inputrecord.read(inputrecord.java:482) @ sun.security.ssl.sslsocketimpl.readrecord(sslsocketimpl.java:927) ... 23 more 

i spent 3 days reading posts. there that: https://java.net/jira/browse/glassfish-21416 ?

edit that's code: (it crashes in glassfish @ writer.flush)

import java.io.bufferedreader; import java.io.ioexception; import java.io.inputstreamreader; import java.io.outputstreamwriter; import javax.net.ssl.*;  public class test {      // substitute own username , password     private static final string initiation_command = "live username ***** password *******" + "\n";      public static void main(string[] args) {         string machinename = "firehose.flightaware.com";         int port = 1501;         runclient(machinename, port);         system.out.println(" thank using flightaware ... bye now");     }      public static void runclient(string machinename, int port) {         system.out.println(" running client");         try {             sslsocket ssl_socket;             ssl_socket = (sslsocket) sslsocketfactory.getdefault().createsocket(machinename, port);             // enable certifcate validation:             sslparameters sslparams = new sslparameters();             sslparams.setendpointidentificationalgorithm("https");             ssl_socket.setsslparameters(sslparams);              //send initiantion command             outputstreamwriter writer = new outputstreamwriter(ssl_socket.getoutputstream(), "utf8");             writer.write(initiation_command);             writer.flush();              // read messages flightaware             bufferedreader reader = new bufferedreader(new inputstreamreader(ssl_socket.getinputstream()));              string message = null;             int limit = 10; //limit number messages testing             while (limit > 0 && (message = reader.readline()) != null) {                 system.out.println("msg: " + message);             }              //done, close             writer.close();             reader.close();             ssl_socket.close();          } catch (ioexception e) {             e.printstacktrace();         }     } } 


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -