cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Issue when deploying the "Weather Applications with Raspberry Pi tutorial" using mvn deploy

debanjan_bose
2-Guest

Issue when deploying the "Weather Applications with Raspberry Pi tutorial" using mvn deploy

I am unable to deploy the jar on my raspberrypi using the "mvn deploy" command. I am getting error:

[ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-5:upload-single (upload-to-pi) on project temperature-thing: Unable to cr

eate a Wagon instance for scp://pi@raspberrypi/home/pi: Cannot connect. Reason: Algorithm negotiation fail -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-5:upload-single (upload-t

o-pi) on project temperature-thing: Unable to create a Wagon instance for scp://pi@raspberrypi/home/pi

Can someone please suggest what might be wrong?

Thx/Debanjan

1 ACCEPTED SOLUTION

Accepted Solutions

As discussed with you on Web Ex call , We are temporarily able to get rid of errors arising due to mvn deploy command (which is used to move  wars/jars from one machine to target machine ) by manually moving the jar to RPI.

Furthermore , we also noticed after moving the jar to RPI manually , there were errors while executing that jars which can be overcome by providing the IP of the machine rather than hostname. For example :


java -jar ./temperature-thing-jar-with-dependencies.jar ws://192.168.100.100:8080/Thingworx/WS c37370f8-2d92-40c3-bb69-f9f220215739  commands works and


java -jar ./temperature-thing-jar-with-dependencies.jar ws://dbose2l:8080/Thingworx/WS c37370f8-2d92-40c3-bb69-f9f220215739

commands does not works .



Furthermore, I also believe , that mvn deploy command is not able to push the jars on RPI , may be due to similar conflicts .

View solution in original post

3 REPLIES 3

Debanjan Bose​, This issue "Unable to create a Wagon instance for scp://pi@raspberrypi/home/pi " is occurring because you might be running the maven command to deploy to raspberry which is not accessible from that machine.

So you need to Disable  Firewall which might be stopping it (in case you are able to access the raspberry pi through putty from the machine you are deploying )

As discussed with you on Web Ex call , We are temporarily able to get rid of errors arising due to mvn deploy command (which is used to move  wars/jars from one machine to target machine ) by manually moving the jar to RPI.

Furthermore , we also noticed after moving the jar to RPI manually , there were errors while executing that jars which can be overcome by providing the IP of the machine rather than hostname. For example :


java -jar ./temperature-thing-jar-with-dependencies.jar ws://192.168.100.100:8080/Thingworx/WS c37370f8-2d92-40c3-bb69-f9f220215739  commands works and


java -jar ./temperature-thing-jar-with-dependencies.jar ws://dbose2l:8080/Thingworx/WS c37370f8-2d92-40c3-bb69-f9f220215739

commands does not works .



Furthermore, I also believe , that mvn deploy command is not able to push the jars on RPI , may be due to similar conflicts .

Right Ravi. I got it to work by explicitly using my machine IP instead of machine name in the TWX url.

Top Tags