1
votes

I followed the instructions in the ms docs guide, and the agent started without any issues. However it never showed up in my agent pool. I tried a different version of the start.sh script found on github and it connected immediately. Is there anything else I can do to try and troubleshoot this? Logs from the non-working agent below

❯ kubectl logs azpagent-55864668dc-zgdrn
1. Determining matching Azure Pipelines agent...
2. Downloading and installing Azure Pipelines agent...
3. Configuring Azure Pipelines agent...

>> End User License Agreements:

Building sources from a TFVC repository requires accepting the Team Explorer Everywhere End User License Agreement. This step is not required for building sources from Git repositories.

A copy of the Team Explorer Everywhere license agreement can be found at:
  /azp/agent/externals/tee/license.html


>> Connect:

Connecting to server ...

>> Register Agent:

Scanning for tool capabilities.
Connecting to the server.
Successfully replaced the agent
Testing agent connection.
2019-08-03 04:22:56Z: Settings Saved.
4. Running Azure Pipelines agent...
Starting Agent listener interactively
Started listener process
Started running service
Scanning for tool capabilities.
Connecting to the server.
2019-08-03 04:23:08Z: Agent connect error: The signature is not valid.. Retrying until reconnected.

Not really sure what else to try -- has anyone else seen this issue, or had success with the linux agent guide?

3

3 Answers

0
votes

Looking at the error message:

The signature is not valid.

There might be a problem with the provided PAT. I'd suggest generating a new PAT, as described by this guide, and trying again.

Let me know if this has helped.

0
votes

Update

According to the error info The signature is not valid..

Are you using and building sources from a TFVC repository which requires accepting the Team Explorer Everywhere End User License Agreement. This step is not required for building sources from Git repositories.

If so have a try with building from Git repo.


The doc you referred a different version of the start.sh script which is deprecated. It's for an old build agent.

According to this and related error The signature is not valid.. Retrying until reconnected. Few things I would suggest:

  • You may on a pretty old agent version , try the latest version agent https://github.com/microsoft/azure-pipelines-agent/releases
  • You need to restart the agent process in order to make those environment take affect.
  • Check with your IT department, make sure the network between your build machine and tfs server/Azure DevOps Service is reliable, see whether there is any change in your network.

Also make sure your build machine/VM not run out of resource.

0
votes

In case this or a similar issue occurs for anyone else, the suggestion from @juliobbv was very helpful. If you comment out the last line of the script, and replace it with

./bin/Agent.Listener run & wait $!

you can get a clearer view of any error messages.

In my case, I didn't realize that AGENT_NAME and POOL were no longer the same variable, and the original error message didn't indicate that the issue was my lack of permissions to the default pool.

My final changes to the script are below -- I defaulted to the agent name using the hostname, and maintained the previous behavior of using a custom pool

./config.sh --unattended \
  --agent "$(hostname)" \
  --url "$AZP_URL" \
  --auth PAT \
  --token $(cat "$AZP_TOKEN_FILE") \
  --pool "${AZP_POOL:-Default}" \
  --work "${AZP_WORK:-_work}" \
  --replace \
  --acceptTeeEula & wait $!