Disclaimer: I'm a bit new to the community, please be gentle :)
I'm having an SSH issue that I just can't seem to explain. As a bit of background, here's the problem that I'm solving:
There are several disparate Java services that existing within the environment that need to be deployed via a common interface. Logging of these services must be directed to a syslog facility. The common interface must be accessible via the command line and via the Jenkins GUI.
Where I started seeing problems was when I added redirection to the syslog. If I remove the syslog redirection, everything works fine. Here's a snippet of code that is called to execute the Java processes (scrubbed for readability):
/bin/java myJavaProgram -DvariousFlags=true &> >(logger -p local3.info -t "my prefix") 2>&1 &
Here's where my mind gets a bit boggled - if I run the command that calls these scripts from the server that Jenkins is on as the Jenkins user, the command works. If I run it through the Jenkins GUI, the job just hangs. I'm running the following command in Jenkins:
ssh -t email@example.com 'appctl restart all' 2>/dev/null
I've confirmed with the
#!/bin/bash -x flag that the script is reaching its end. When I run with the
ssh -vvv, the following is the last line of output:
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Any thoughts on where to go from here? Is there a better way of accomplishing the syslog feature? Is something wrong with my piping?