Question, Bug, or Feature?
_Type_: Bug
Enter Task Name: SSH
Server - Azure Pipelines
Agent - Hosted
Script commands is really simple like this:
cd path-to-docker-file && docker-compose up -d
But the log is pretty weird, my command is run successfully but the agent thinks that's failed.

2019-05-27T04:31:55.8268243Z Trying to establish an SSH connection to ***@34.92.176.132:22
2019-05-27T04:31:55.8897184Z Successfully connected.
2019-05-27T04:31:55.8898861Z ##[debug]Running command cd /home/***/ancorazor/build && docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v "$PWD:$PWD" -w="$PWD" docker/compose:1.24.0 up -d on remote machine.
2019-05-27T04:31:55.8899468Z cd /home/***/ancorazor/build && docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v "$PWD:$PWD" -w="$PWD" docker/compose:1.24.0 up -d
2019-05-27T04:31:55.8900232Z ##[debug]command = cd /home/***/ancorazor/build && docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v "$PWD:$PWD" -w="$PWD" docker/compose:1.24.0 up -d
2019-05-27T04:31:57.2626271Z ##[debug]stderr = elasticsearch is up-to-date
2019-05-27T04:31:57.2627091Z
2019-05-27T04:31:57.2691425Z ##[error]elasticsearch is up-to-date
2019-05-27T04:31:57.2702656Z ##[debug]Processed: ##vso[task.issue type=error;]elasticsearch is up-to-date
2019-05-27T04:31:57.2702870Z
2019-05-27T04:31:57.2703149Z ##[debug]stderr = oap is up-to-date
2019-05-27T04:31:57.2703264Z
2019-05-27T04:31:57.2703601Z ##[error]oap is up-to-date
2019-05-27T04:31:57.2703905Z ##[debug]Processed: ##vso[task.issue type=error;]oap is up-to-date
2019-05-27T04:31:57.2703979Z
2019-05-27T04:31:57.2704170Z ##[debug]stderr = ui is up-to-date
2019-05-27T04:31:57.2704234Z
2019-05-27T04:31:57.2704442Z ##[error]ui is up-to-date
2019-05-27T04:31:57.2704673Z ##[debug]Processed: ##vso[task.issue type=error;]ui is up-to-date
2019-05-27T04:31:57.2704768Z
2019-05-27T04:31:57.2705513Z ##[debug]stderr = ancorazor is up-to-date
2019-05-27T04:31:57.2705604Z
2019-05-27T04:31:57.2705875Z ##[error]ancorazor is up-to-date
2019-05-27T04:31:57.2706135Z ##[debug]Processed: ##vso[task.issue type=error;]ancorazor is up-to-date
2019-05-27T04:31:57.2706209Z
2019-05-27T04:31:57.5523184Z ##[debug]code = 0, signal = undefined
2019-05-27T04:31:57.5524525Z ##[debug]task result: Failed
2019-05-27T04:31:57.5525360Z ##[error]Command failed with errors on remote machine.
2019-05-27T04:31:57.5525794Z ##[debug]Processed: ##vso[task.issue type=error;]Command failed with errors on remote machine.
2019-05-27T04:31:57.5550683Z ##[debug]Processed: ##vso[task.complete result=Failed;]Command failed with errors on remote machine.
2019-05-27T04:31:57.5551081Z ##[debug]Closing the SSH client connection.
2019-05-27T04:31:57.5680835Z ##[section]Finishing: Run script
Sorry, I just learned that every command of mine output as stderr.
I have no idea why but it shouldn't be your problem.
@siegrainwong Did you fix your problem somehow? I got the same one. Can I tell docker to output to stdout instead of stderr?
@julianhandl
I redirect them like this:
docker-compose up -d 2> docker-compose.log
cat docker-compose.log
@siegrainwong Thank you! I came up with nearly the exact same solution in the meantime. 馃槃
Most helpful comment
@julianhandl
I redirect them like this: