sudo: ./svc.sh: command not found
See original GitHub issueHi, I’ve just executed the command given by the VSTS deployment group page to execute the agent on my Ubuntu 16.04.4 LTS server (via su root) and received the following error at the end. Is this a problem?
...
./run.sh
Must not run with sudo
sudo: ./svc.sh: command not found
sudo: ./svc.sh: command not found
The command given by VSTS on the https://tenant.visualstudio.com/project_name/_machinegroup?view=MachineGroupView&mgid=47&tab=Details URL was:
mkdir vstsagent;cd vstsagent;curl -fkSL -o vstsagent.tar.gz https://vstsagentpackage.azureedge.net/agent/2.129.1/vsts-agent-linux-x64-2.129.1.tar.gz;tar -zxvf vstsagent.tar.gz; if [ -x "$(command -v systemctl)" ]; then ./config.sh --deploymentgroup --deploymentgroupname "Staging" --acceptteeeula --agent $HOSTNAME --url https://<snipped_tenant>.visualstudio.com/ --work _work --projectname '<snipped_project>' --auth PAT --token <sniped_token>--runasservice; sudo ./svc.sh install; sudo ./svc.sh start; else ./config.sh --deploymentgroup --deploymentgroupname "Staging" --acceptteeeula --agent $HOSTNAME --url https://<snipped_tenant>.visualstudio.com/ --work _work --projectname '<snipped_project>' --auth PAT --token <snipped_token>; ./run.sh; fi
Looks like svc.sh script doesn’t exist in the agent.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
File svc.sh not found · Issue #3218 · microsoft/azure- ...
Linux Azure DevOps Type and Version dev.azure.com (formerly v... ... What's not working? ... svc.sh: command not found sudo: .
Read more >Install agent failed
Yes, i want to installed agent for my debian linux. But as you see . it show me error log: Must not run...
Read more >INSTALL AGENT LINUX FAILED AZURE DEVOPS ...
When I copy/paste the script given to me by Azure to the bash, ... svc.sh: command not found sudo: ./svc.sh: command not found....
Read more >Self-hosted Linux agents - Azure Pipelines
runsvc.sh . This script sets up the environment (more details below) and starts the agents host. If username parameter is not specified then ......
Read more >How to check running job on self-hosted Azure DevOps ...
I found a solution by reading the status of the agent service: Go to folder where you installed the agent and run -...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I commented out the following code in the config.sh file.This is helpful. `# we want to snapshot the environment of the config user
if [ $user_id -eq 0 -a -z “$AGENT_ALLOW_RUNASROOT” ] && [ “${ALLOW_RUNASROOT:-default_value}” == “default_value” ]; then
echo “Must not run with sudo”
exit 1
#fi `
Update: it didn’t like root. I added my normal user to sudo group and it’s happier, but still failing on
sudo: ./svc.sh: command not found