Hi,
my pipeline is this:
image: redwolfgang20/grails:latest
pipelines:
default:
- step:
name: Build war Tunneling and Pushing
script:
- grails prod war
- ssh -t -L 18081:localhost:8080 root@IP -fN
- cd build/libs/
- INPUT=$(ls -t *".war" | head -n 1)
- name=$(echo "$INPUT" | cut -f 1 -d '.')
- curl -v -u $TOMCAT_USER:$TOMCAT_PASSWORD -T build/libs/$name.war http://localhost:18081/manager/text/deploy?path=/'$name'&update=true
the first time I run it it worked, even if the curl line was a bit different. After everytime I run it I got this:
+ ssh -t -L 18081:localhost:8080 root@IP -fN
bind: Cannot assign requested address
I have no idea how to fix it, please advice
thanks
cesare
UPDATE
I change ssh tunnel command with this and it seems to work:
ssh -fN root@IP -L *:18080:localhost:8080
but now my curl command does not return nothing it seems it does anything at all even wtih --trace parameter
@Cesare Vairetti I did some research and tried to reproduce that bind error locally, and it seems it is due to ssh trying to bind to an IPv6 address. Even with this warning however, I could still tunnel successfully.
I was able to stop this warning by passing the '-4' arg to ssh, and added the '-v' flag to enable additional debugging information.
ssh -v -4 -t -L 18081:localhost:8080 <user>@<my-host> -
I was able to tunnel through to a remote instance running nginx multiple times without any issue from pipelines.
It might be worth checking after deploying your .war file that port 8080 is still listening on the remote server?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.