Open Mandhata121 opened 6 years ago
were you able to fix this issue? i am also stuck at samee point
~Matthias
No.I am still at that point only.
According to you what can be the possible issue for that?
Regards
Debi
From: engineerPapa notifications@github.com Sent: Sunday, February 18, 2018 4:47:48 PM To: bmwcarit/joynr Cc: Debi Prasad Mandhata; Author Subject: Re: [bmwcarit/joynr] Building joynr Java failed (#18)
were you able to fix this issue? i am also stuck at same epoint
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/bmwcarit/joynr/issues/18#issuecomment-366508796, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ai17W3UkuFAaqwYcg2veWXBocz5qhmGmks5tWAbcgaJpZM4SIMZB.
L&T Technology Services Ltd
www.LntTechservices.comhttp://www.lnttechservices.com/
This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
I got the same error: [ERROR] io.joynr.messaging.mqtt.paho.client.MqttPahoClient: MQTT Connect failed. Error code 32103
I "solved" this by skipping the tests:
docker run --rm --sig-proxy -e DEV_UID="$(id -u)"
-v <FULL_PATH_TO_JOYNR_SOURCES>:/data/src
-v <FULL_PATH_TO_MAVEN_DIRECTORY>:/home/joynr/.m2 \
joynr-java
/data/src/docker/joynr-java/scripts/build/java-clean-build skipTests
@Mandhata121 is this issue still valid?
After updating to the latest source, the problem persists. The problem is located in the integration-tests
module. If I exclude this module, the build succeeds.
I took a deeper look into the problem.
The reason for my problems, e.g. Error 32103
which results in an endless loop, was that there is no mosquitto (MQTT server) or joynr backend-service running during the tests. I found the following description (javascript_testing) which explicit states that there are some prerequisites to get the tests work. If these dependencies to mosquitto and the joynr backend-services are really required, the documented example in Building joynr Java and common components can't work.
This is maybe not the right way to solve this problem but it works for me. I find it a litle bit strange to prebuild the "joynr backend-services" to make the whole build work.
java-clean-build-fixed
inside the docker/joynr-java/scripts/build
directory
#!/bin/bash
source /data/scripts/global.sh
set -e
function usage { echo "usage: java-clean-build-fixed [skipTests]" }
SKIPTESTS="false"
while [ "$1" != "" ]; do case $1 in skipTests ) SKIPTESTS="true" ;;
if [ "$SKIPTESTS" == "false" ] then
(
# prebuild required dependencies
log "prebuild joynr tools"
mvn clean install \
-f /data/src/tools/pom.xml \
-P no-tests,no-license-and-notice,no-java-formatter,no-checkstyle
log "prebuild joynr basemodel"
mvn clean install \
-f /data/src/basemodel/pom.xml \
-P no-tests,no-license-and-notice,no-java-formatter,no-checkstyle
log "prebuild joynr backend-services"
mvn clean install \
-f /data/src/java/backend-services/pom.xml \
-P no-tests,no-license-and-notice,no-java-formatter,no-checkstyle
)
log "start services"
mosquitto -c /etc/mosquitto/mosquitto.conf -v &
MOSQUITTO_PID=$!
DISCOVERY_DIRECTORY_WAR_FILE=$(find /data/src/java/backend-services/discovery-directory-jee/target -iregex ".*discovery-directory-jee-.*war")
ACCESS_CTRL_WAR_FILE=$(find /data/src/java/backend-services/domain-access-controller-jee/target -iregex ".*domain-access-controller-jee-.*war")
/data/scripts/start-payara.sh -w $DISCOVERY_DIRECTORY_WAR_FILE,$ACCESS_CTRL_WAR_FILE
fi
( log "build joynr Java" (copied from 'java-clean-build') mvn clean install \ -f /data/src/pom.xml \ -P no-license-and-notice,no-java-formatter,no-checkstyle \ -Denforcer.skip=true \ -Dmaven.compile.fork=true \ -DskipTests=$SKIPTESTS \ -Dmaven.junit.fork=true \ -Dmaven.test.failure.ignore=true )
if [ "$SKIPTESTS" == "false" ] then log "stop services" /data/scripts/stop-payara.sh
kill -TERM $MOSQUITTO_PID
wait $MOSQUITTO_PID
fi
* make the file executable (`chmod +x java-clean-build-fixed`)
* use the following code to build the joynr java api:
docker run --rm --sig-proxy -e DEV_UID="$(id -u)" \
-v
These changes fix the problem with the infinite loop during the tests. Building joynr Java is now possible again, at least for me.
Today the container to be used is joynr-base as described on https://github.com/bmwcarit/joynr/blob/master/wiki/java_building_joynr.md. For just building use the skipTests option as now documented. For full tests use https://github.com/bmwcarit/joynr/blob/master/docker/joynr-base/scripts/ci/java-android-clean-build which also creates certs and invokes mosquitto and the required backend service.
For me # ./joynr-docker build working fine and when i trying to run the following command docker run --rm --sig-proxy -e DEV_UID="$(id -u)" \ -v:/data/src \
-v :/home/joynr/.m2 \
joynr-java \
/data/src/docker/joynr-java/scripts/build/java-clean-build ,that time i am getting the error this type of error
ERROR:-
useradd: UID 0 is not unique
chown: invalid user: 'joynr:joynr'
error: failed switching to "joynr": get supplementary groups Unable to find user joynr
2.After removing the [ -e DEV_UID="$(id -u)" ] from the above command it is building, but after some time it is showing below error and same things repeated . ERROR:- [ERROR] io.joynr.messaging.mqtt.paho.client.MqttPahoClient: MQTT Connect failed. Error code 32103
Please give some suggestions on the above issue. You can follow to this (link:-https://github.com/bmwcarit/joynr/blob/master/wiki/java_building_joynr.md)