Skip to content

Travis build fails in s390x architecture #635

@Rohanjos97

Description

@Rohanjos97

Currently, our Dockerfile looks like this

FROM icr.io/appcafe/websphere-liberty:24.0.0.6-kernel-java11-openj9-ubi

...

COPY --chown=1001:0 server.xml /opt/ibm/wlp/usr/servers/defaultServer/server.xml
RUN configure.sh

...

And the build passes for amd64 archtecture. But when the same code executes for s390x architecture builds, we are seeing some error that is originating from populate_scc.sh file, specifically travis build fails after server stop command with this output:

310.5 Stopping server defaultServer.
314.2 The command stop failed because of a communication error with the server.
314.2 Server defaultServer stop failed. Check server logs for details.

Tried to debug it using sed command by printing the console.log file after the server start and server stop command:

RUN sed -i "s|\/opt\/ibm\/wlp\/bin\/server start|\/opt\/ibm\/wlp\/bin\/server start \&\& ls \/logs \&\& \-al \&\& cat \/logs\/console.log|g" /opt/ibm/helpers/build/populate_scc.sh
RUN sed -i "s|\/opt\/ibm\/wlp\/bin\/server stop|\/opt\/ibm\/wlp\/bin\/server stop \&\& ls \-al \/logs \&\& cat \/logs\/console.log|g" /opt/ibm/helpers/build/populate_scc.sh

This was the console.log output after server start command:

#9 304.7 Launching defaultServer (WebSphere Application Server 24.0.0.6/wlp-1.0.90.cl240620240603-2001) on Eclipse OpenJ9 VM, version 11.0.24+8 (en_US)
#9 304.7 [AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
#9 304.7 [AUDIT   ] CWWKE0100I: This product is licensed for development, and limited production use. The full license terms can be viewed here: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/24.0.0.6/lafiles/en.html
#9 304.7 [AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ibm/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml
#9 304.7 [AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
#9 304.7 [ERROR   ] CWSJY0035E: Unable to load classes from the WebSphere MQ resource adapter, because the wmqJmsClient.rar.location variable has not been set. Set this variable to point to the location of the MQ resource adapter
#9 304.7 [ERROR   ] CWWKE0701E: bundle com.ibm.ws.jca:1.0.90.cl240620240603-2001 (98)[com.ibm.ws.jca.internal.ResourceAdapterService(219)] : The activate method has thrown an exception java.lang.IllegalArgumentException: CWSJY0035E: Unable to load classes from the WebSphere MQ resource adapter, because the wmqJmsClient.rar.location variable has not been set. Set this variable to point to the location of the MQ resource adapter
#9 304.7 	at com.ibm.ws.wmq.WMQService.setClassLoaderID(WMQService.java:205)
#9 304.7 	at [internal classes]
#9 304.7   
#9 304.7 [AUDIT   ] CWWKS4104A: LTPA keys created in 7.658 seconds. LTPA key file: /opt/ibm/wlp/output/defaultServer/resources/security/ltpa.keys
#9 304.7 [AUDIT   ] CWPKI0803A: SSL certificate created in 23.795 seconds. SSL key file: /opt/ibm/wlp/output/defaultServer/resources/security/key.p12
#9 304.7 [AUDIT   ] CWWKI0001I: The CORBA name server is now available at corbaloc:iiop:localhost:2809/NameService.
#9 304.7 [ERROR   ] CWSJY0035E: Unable to load classes from the WebSphere MQ resource adapter, because the wmqJmsClient.rar.location variable has not been set. Set this variable to point to the location of the MQ resource adapter
#9 304.7 [ERROR   ] CWWKE0701E: bundle com.ibm.ws.jca:1.0.90.cl240620240603-2001 (98)[com.ibm.ws.jca.internal.ResourceAdapterService(219)] : The activate method has thrown an exception java.lang.IllegalArgumentException: CWSJY0035E: Unable to load classes from the WebSphere MQ resource adapter, because the wmqJmsClient.rar.location variable has not been set. Set this variable to point to the location of the MQ resource adapter
#9 304.7 	at com.ibm.ws.wmq.WMQService.setClassLoaderID(WMQService.java:205)
#9 304.7 	at [internal classes]
#9 304.7   
#9 304.7 [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/jwt/
#9 304.7 [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/oidcclient/
#9 304.7 [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/oauth2/
#9 304.7 [AUDIT   ] CWWKF0012I: The server installed the following features: [appSecurity-2.0, appSecurity-3.0, beanValidation-2.0, cdi-2.0, distributedMap-1.0, ejbHome-3.2, ejbLite-3.2, ejbRemote-3.2, el-3.0, federatedRegistry-1.0, jaspic-1.1, javaMail-1.6, jaxb-2.2, jaxrs-2.1, jaxrsClient-2.1, jaxws-2.2, jca-1.7, jdbc-4.2, jmsMdb-3.2, jndi-1.0, jpa-2.2, jpaContainer-2.2, jsf-2.3, json-1.0, jsonb-1.0, jsonp-1.1, jsp-2.3, jwt-1.0, jwtSso-1.0, ldapRegistry-3.0, managedBeans-1.0, mdb-3.2, monitor-1.0, oauth-2.0, openidConnectClient-1.0, servlet-4.0, ssl-1.0, transportSecurity-1.0, wasJmsClient-2.0, wasJmsServer-1.0, webProfile-8.0, websocket-1.1, wmqJmsClient-2.0].
#9 304.7 [AUDIT   ] CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in 95.428 seconds.

I noticed that the [ERROR] message was being printed on the amd64 side as well (not the probable cause of failure for our build)...

The output of console.log after server stop command:

#9 304.6 + cat /logs/console.log
#9 304.7 Launching defaultServer (WebSphere Application Server 24.0.0.6/wlp-1.0.90.cl240620240603-2001) on Eclipse OpenJ9 VM, version 11.0.24+8 (en_US)
#9 304.7 [AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
#9 304.7 [AUDIT   ] CWWKE0100I: This product is licensed for development, and limited production use. The full license terms can be viewed here: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/24.0.0.6/lafiles/en.html
#9 304.7 [AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ibm/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml
#9 304.7 [AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
#9 304.7 [ERROR   ] CWSJY0035E: Unable to load classes from the WebSphere MQ resource adapter, because the wmqJmsClient.rar.location variable has not been set. Set this variable to point to the location of the MQ resource adapter
#9 304.7 [ERROR   ] CWWKE0701E: bundle com.ibm.ws.jca:1.0.90.cl240620240603-2001 (98)[com.ibm.ws.jca.internal.ResourceAdapterService(219)] : The activate method has thrown an exception java.lang.IllegalArgumentException: CWSJY0035E: Unable to load classes from the WebSphere MQ resource adapter, because the wmqJmsClient.rar.location variable has not been set. Set this variable to point to the location of the MQ resource adapter
#9 304.7 	at com.ibm.ws.wmq.WMQService.setClassLoaderID(WMQService.java:205)
#9 304.7 	at [internal classes]
#9 304.7   
#9 304.7 [AUDIT   ] CWWKS4104A: LTPA keys created in 7.658 seconds. LTPA key file: /opt/ibm/wlp/output/defaultServer/resources/security/ltpa.keys
#9 304.7 [AUDIT   ] CWPKI0803A: SSL certificate created in 23.795 seconds. SSL key file: /opt/ibm/wlp/output/defaultServer/resources/security/key.p12
#9 304.7 [AUDIT   ] CWWKI0001I: The CORBA name server is now available at corbaloc:iiop:localhost:2809/NameService.
#9 304.7 [ERROR   ] CWSJY0035E: Unable to load classes from the WebSphere MQ resource adapter, because the wmqJmsClient.rar.location variable has not been set. Set this variable to point to the location of the MQ resource adapter
#9 304.7 [ERROR   ] CWWKE0701E: bundle com.ibm.ws.jca:1.0.90.cl240620240603-2001 (98)[com.ibm.ws.jca.internal.ResourceAdapterService(219)] : The activate method has thrown an exception java.lang.IllegalArgumentException: CWSJY0035E: Unable to load classes from the WebSphere MQ resource adapter, because the wmqJmsClient.rar.location variable has not been set. Set this variable to point to the location of the MQ resource adapter
#9 304.7 	at com.ibm.ws.wmq.WMQService.setClassLoaderID(WMQService.java:205)
#9 304.7 	at [internal classes]
#9 304.7   
#9 304.7 [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/jwt/
#9 304.7 [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/oidcclient/
#9 304.7 [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/oauth2/
#9 304.7 [AUDIT   ] CWWKF0012I: The server installed the following features: [appSecurity-2.0, appSecurity-3.0, beanValidation-2.0, cdi-2.0, distributedMap-1.0, ejbHome-3.2, ejbLite-3.2, ejbRemote-3.2, el-3.0, federatedRegistry-1.0, jaspic-1.1, javaMail-1.6, jaxb-2.2, jaxrs-2.1, jaxrsClient-2.1, jaxws-2.2, jca-1.7, jdbc-4.2, jmsMdb-3.2, jndi-1.0, jpa-2.2, jpaContainer-2.2, jsf-2.3, json-1.0, jsonb-1.0, jsonp-1.1, jsp-2.3, jwt-1.0, jwtSso-1.0, ldapRegistry-3.0, managedBeans-1.0, mdb-3.2, monitor-1.0, oauth-2.0, openidConnectClient-1.0, servlet-4.0, ssl-1.0, transportSecurity-1.0, wasJmsClient-2.0, wasJmsServer-1.0, webProfile-8.0, websocket-1.1, wmqJmsClient-2.0].
#9 304.7 [AUDIT   ] CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in 95.428 seconds.
#9 304.7 + '[' true == true ']'
#9 304.7 + curl --silent --output /dev/null --show-error --fail --max-time 5 localhost:9080/
#9 307.0 + '[' true == true ']'
#9 307.0 + curl --silent --output /dev/null --show-error --fail --max-time 5 localhost:9080/openapi
#9 307.2 curl: (22) The requested URL returned error: 404 Not Found
#9 307.2 + echo 'localhost:9080/openapi call failed, continuing'
#9 307.2 + /opt/ibm/wlp/bin/server stop
#9 307.2 localhost:9080/openapi call failed, continuing
#9 307.7 
#9 310.5 Stopping server defaultServer.
#9 314.2 The command stop failed because of a communication error with the server.
#9 314.2 Server defaultServer stop failed. Check server logs for details.

We then checked if the server is stopping successfully or is there's an issue during stop, so we printed server stop || sever status
and the output was:

#9 340.8 + /opt/ibm/wlp/bin/server status
1057#9 341.3 
1058#9 344.5 Server defaultServer is not running.

Even though server stop command returned non zero code, the server stopped anyway according to the console log above. So, for a workaround for now, we are skipping the error for s390x build by adding || true after server stop command, which looks something like this:

RUN if [ "$ARCHITECTURE" != "amd64" ] ; then \
        sed -i "s|\/opt\/ibm\/wlp\/bin\/server stop|\/opt\/ibm\/wlp\/bin\/server stop \|\| true|g" /opt/ibm/helpers/build/populate_scc.sh; \
    fi

I was hoping to get some more insights on why the build is failing and if we can add similar logic to the code for s390x builds, or better, if we can figure out what is causing the issue to fix at the root source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions