Azure / azure-service-bus-java

☁️ Java client library for Azure Service Bus
https://azure.microsoft.com/services/service-bus
MIT License
60 stars 59 forks source link

Connection Errors with OpenJ9 JVM #303

Closed alechartung closed 6 years ago

alechartung commented 6 years ago

Describe the bug

When using this library with OpenJ9 JVM instead of Hotspot, it's not connecting and throwing these errors:

com.microsoft.azure.servicebus.primitives.ServiceBusException: Error{condition=amqp:connection:framing-error, description='org.apache.qpid.proton.engine.TransportException: connection aborted', info=null}

To Reproduce

I wrote a script to reproduce. This will:

#!/usr/bin/env bash

DIR=`mktemp -d`
trap "rm -rf $DIR" EXIT
pushd $DIR
  wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u192-b12_openj9-0.11.0r0/OpenJDK8U-jdk_x64_linux_openj9_8u192b12_openj9-0.11.0.tar.gz
  tar xf OpenJDK8U-jdk_x64_linux_openj9_8u192b12_openj9-0.11.0.tar.gz
  wget http://ftp.naz.com/apache/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz
  tar xf apache-maven-3.6.0-bin.tar.gz
  git clone https://github.com/Azure/azure-service-bus-java
  pushd azure-service-bus-java
    JAVA_HOME=../jdk8u192-b12_openj9-0.11.0/ ../apache-maven-3.6.0/bin/mvn -U -B -e test
  popd
popd

To use:

Expected behavior

Tests should pass. I wrote another script that uses the Hotspot JVM and shows the tests passing. This will:

#!/usr/bin/env bash

DIR=`mktemp -d`
trap "rm -rf $DIR" EXIT
pushd $DIR
  wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u192-b12/OpenJDK8U-jdk_x64_linux_hotspot_8u192b12.tar.gz
  tar xf OpenJDK8U-jdk_x64_linux_hotspot_8u192b12.tar.gz
  wget http://ftp.naz.com/apache/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.tar.gz
  tar xf apache-maven-3.6.0-bin.tar.gz
  git clone https://github.com/Azure/azure-service-bus-java
  pushd azure-service-bus-java
    JAVA_HOME=../jdk8u192-b12/ ../apache-maven-3.6.0/bin/mvn -U -B -e test
  popd
popd

To use:

Observed behavior

Output of the two scripts attached:

Environment:

Additional context

If OpenJ9 isn't supported, feel free to ignore. This issue might be with the JVM, instead of the library. It was the first time I've noticed code that doesn't work on both, though.

yvgopal commented 6 years ago

we have never tested with OpenJ9 JVM. We haven't claimed support for other JVM's either. Looks ProtonJ is not working with OpenJ9,