apache/openwhisk-release

Allow user to change to use their chose JDK and document (multiple repos)

mrutkows opened this issue · 4 comments

We should provide a means for user to change the build to use a JDK of their choice; tat is, we need a means to configure the JDK location (dynamically or statically) and create user documentation telling them how to. These instructions and process should be the same for all repos. that use a JDK (e.g., main openwhisk, apigateway and runtime java).

This problem surfaced and is related to issue: #167

@mrutkows The oracle image is unable to replace with the open jdk. After I did it, the gradlew build works fine, but the controller image is unable to launch.

Error by downloaing the OPEN jdk:

Exception in thread "main" java/lang/UnsatisfiedLinkError: sun/management/FileSystemImpl.isAccessUserOnly0(Ljava/lang/String;)Z
	at sun/management/FileSystemImpl.isAccessUserOnly (FileSystemImpl.java:41)
	at sun/management/jmxremote/ConnectorBootstrap.checkPasswordFile (ConnectorBootstrap.java:575)
	at sun/management/jmxremote/ConnectorBootstrap.startRemoteConnectorServer (ConnectorBootstrap.java:429)
	at sun/management/Agent.startAgent (Agent.java:262)
	at sun/management/Agent.startAgent (Agent.java:452)
	at java/lang/System.startSNMPAgent (NativeMethod:4294967295)
	at java/lang/Thread.completeInitialization (Thread.java:167)
	at java/lang/J9VMInternals.completeInitialization (J9VMInternals.java:72)

Error with the docker image FROM anapsix/alpine-java:8u172b11_jdk:

[2018-05-31T22:24:56.782Z] [INFO] Initializing Kamon...
[INFO] [05/31/2018 22:24:57.120] [main] [StatsDExtension(akka://kamon)] Starting the Kamon(StatsD) extension
[2018-05-31T22:24:57.154Z] [INFO] Slf4jLogger started
[2018-05-31T22:24:57.171Z] [INFO] Starting remoting
[2018-05-31T22:24:57.264Z] [INFO] Remoting started; listening on addresses :[akka.tcp://controller-actor-system@172.17.0.1:8000]
[2018-05-31T22:24:57.266Z] [INFO] Remoting now listens on addresses: [akka.tcp://controller-actor-system@172.17.0.1:8000]
[2018-05-31T22:24:57.295Z] [INFO] Cluster Node [akka.tcp://controller-actor-system@172.17.0.1:8000] - Starting up...
[2018-05-31T22:24:57.325Z] [INFO] Cluster Node [akka.tcp://controller-actor-system@172.17.0.1:8000] - Registered cluster JMX MBean [akka:type=Cluster]
[2018-05-31T22:24:57.326Z] [INFO] Cluster Node [akka.tcp://controller-actor-system@172.17.0.1:8000] - Started up successfully
[2018-05-31T22:24:57.352Z] [INFO] Cluster Node [akka.tcp://controller-actor-system@172.17.0.1:8000] - No seed-nodes configured, manual cluster join required
[2018-05-31T22:24:57.496Z] [INFO] [#tid_sid_unknown] [Config] environment set value for limits.triggers.fires.perMinute
[2018-05-31T22:24:57.497Z] [INFO] [#tid_sid_unknown] [Config] environment set value for limits.actions.sequence.maxLength
[2018-05-31T22:24:57.497Z] [INFO] [#tid_sid_unknown] [Config] environment set value for limits.actions.invokes.concurrent
[2018-05-31T22:24:57.498Z] [INFO] [#tid_sid_unknown] [Config] environment set value for controller.instances
[2018-05-31T22:24:57.499Z] [INFO] [#tid_sid_unknown] [Config] environment set value for whisk.version.date
[2018-05-31T22:24:57.499Z] [INFO] [#tid_sid_unknown] [Config] environment set value for whisk.version.buildno
[2018-05-31T22:24:57.500Z] [INFO] [#tid_sid_unknown] [Config] environment set value for limits.actions.invokes.perMinute
[2018-05-31T22:24:57.501Z] [INFO] [#tid_sid_unknown] [Config] environment set value for limits.actions.invokes.concurrentInSystem
[2018-05-31T22:24:57.502Z] [INFO] [#tid_sid_unknown] [Config] environment set value for runtimes.manifest
[2018-05-31T22:24:57.503Z] [INFO] [#tid_sid_unknown] [Config] environment set value for kafka.hosts
[2018-05-31T22:24:57.504Z] [INFO] [#tid_sid_unknown] [Config] environment set value for port
[2018-05-31T22:24:57.819Z] [ERROR] [#tid_sid_unknown] [KafkaMessagingProvider] ensureTopic for completed0 failed due to java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.InvalidConfigurationException: Unknown topic config name: retention.LBytes
[2018-05-31T22:24:57.829Z] [ERROR] [#tid_sid_unknown] [Controller] failure during msgProvider.ensureTopic for topic completed0
[2018-05-31T22:24:57.835Z] [INFO] Shutting down remote daemon.
[2018-05-31T22:24:57.836Z] [INFO] Remote daemon shut down; proceeding with flushing remote transports.
[2018-05-31T22:24:57.853Z] [INFO] Remoting shut down
[2018-05-31T22:24:57.854Z] [INFO] Remoting shut down.

Error with the docker image adoptopenjdk/openjdk8-openj9:jdk8u162-b12_openj9-0.8.0-alpine:

/bin/sh: exec: line 1: /init.sh: not found

@markusthoemmes @rabbah Do you know what could be the reason?

@houshengbo can you post a PR to see how you switched to openjdk?