Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

airhacks/glassfish:v5 and airhacks/glassfish:5.1.0 are broken for https external calls #30

Open
estigma88 opened this issue Dec 24, 2019 · 0 comments

Comments

@estigma88
Copy link

The containers published on docker hub airhacks/glassfish:v5 and airhacks/glassfish:5.1.0 use openjdk version "1.8.0_121" generating the following error when you try to call an external RESTFull service through HTTPs:

Caused by: java.lang.NoClassDefFoundError: sun/security/ssl/HandshakeStateManager
at sun.security.ssl.Handshaker.init(Handshaker.java:282)
at sun.security.ssl.Handshaker.(Handshaker.java:242)
at sun.security.ssl.ClientHandshaker.(ClientHandshaker.java:160)
at sun.security.ssl.SSLSocketImpl.initHandshaker(SSLSocketImpl.java:1329)
at sun.security.ssl.SSLSocketImpl.doneConnect(SSLSocketImpl.java:690)
at sun.security.ssl.SSLSocketImpl.(SSLSocketImpl.java:569)
at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:110)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:365)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)

An easy fix is publishing the Glassfish image with a new jdk version, for instance:

FROM airhacks/java-s2i
ENV GLASSFISH_ARCHIVE glassfish5
ENV DOMAIN_NAME domain1
ENV INSTALL_DIR /opt
RUN useradd -b /opt -m -s /bin/sh -d ${INSTALL_DIR} serveradmin && echo serveradmin:serveradmin | chpasswd
RUN curl -o ${INSTALL_DIR}/${GLASSFISH_ARCHIVE}.zip -L http://mirrors.xmission.com/eclipse/glassfish/glassfish-5.1.0.zip \
&& unzip ${INSTALL_DIR}/${GLASSFISH_ARCHIVE}.zip -d ${INSTALL_DIR} \
&& rm ${INSTALL_DIR}/${GLASSFISH_ARCHIVE}.zip
&& chown -R serveradmin:serveradmin /opt
&& chmod -R a+rw /opt
ENV GLASSFISH_HOME ${INSTALL_DIR}/${GLASSFISH_ARCHIVE}/glassfish
ENV DEPLOYMENT_DIR ${GLASSFISH_HOME}/domains/domain1/autodeploy
WORKDIR ${GLASSFISH_HOME}/bin
USER serveradmin
EXPOSE 4848 8009 8080 8181

airhacks/java-s2i uses openjdk version "1.8.0_191" where HTTPs works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant