{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/701","repository_url":"https://api.github.com/repos/Microsoft/vsts-agent","labels_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/701/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/701/comments","events_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/701/events","html_url":"https://github.com/Microsoft/vsts-agent/issues/701","id":192741779,"number":701,"title":"./config.sh remove","user":{"login":"ozitraveller","id":8541342,"avatar_url":"https://avatars.githubusercontent.com/u/8541342?v=3","gravatar_id":"","url":"https://api.github.com/users/ozitraveller","html_url":"https://github.com/ozitraveller","followers_url":"https://api.github.com/users/ozitraveller/followers","following_url":"https://api.github.com/users/ozitraveller/following{/other_user}","gists_url":"https://api.github.com/users/ozitraveller/gists{/gist_id}","starred_url":"https://api.github.com/users/ozitraveller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozitraveller/subscriptions","organizations_url":"https://api.github.com/users/ozitraveller/orgs","repos_url":"https://api.github.com/users/ozitraveller/repos","events_url":"https://api.github.com/users/ozitraveller/events{/privacy}","received_events_url":"https://api.github.com/users/ozitraveller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-12-01T02:53:22Z","updated_at":"2016-12-02T02:02:31Z","closed_at":null,"body":"## **Agent version and platform**\r\nVersion of your agent? 2.102.0/2.100.1...\r\n<br>\r\nOS of the machine running the agent? Linux...\r\n<br>\r\n## **VSTS type and version**\r\nOn-Prem TFS?\r\n<br>\r\nVersion 15.105.25910.0\r\n<br>\r\n\r\n<br>\r\n## **What's not working?** \r\n\r\nI'm trying remove and re-configure. Remove is failing.\r\n\r\n./config.sh remove --unattended --auth Negotiate --username aaa\\bbb --password ppp\r\nRemoving service\r\nFailed: Removing service\r\nUnconfigure service first according to https://www.visualstudio.com/en-us/docs/build/admin/agents/v2-linux\r\n\r\n<br>\r\n## **Agent and Worker's diag log**\r\nLogs are located at the `_diag` under agent root folder, agent log prefix with `Agent_`, worker log prefix with `Worker_`. all sensitive information should already be masked out, please double check before paste here. \r\n\r\n+++++++++++++++++++++++++++++++++++++++++++++++++++\r\ncat Agent_20161130-024010-utc.log\r\n[2016-11-30 02:40:10Z INFO AgentProcess] Agent is built for Linux - rhel.7.2-x64.\r\n[2016-11-30 02:40:10Z INFO AgentProcess] RuntimeInformation: Linux 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016.\r\n[2016-11-30 02:40:11Z INFO AgentProcess] Version: 2.105.7\r\n[2016-11-30 02:40:11Z INFO AgentProcess] Commit: 5f286b1f01c51b7cace8c1649edd6b00893a3649\r\n[2016-11-30 02:40:11Z INFO AgentProcess] Culture: en-AU\r\n[2016-11-30 02:40:11Z INFO AgentProcess] UI Culture: en-AU\r\n[2016-11-30 02:40:11Z INFO HostContext] Well known directory 'Bin': '/home/xxx/myagent/bin'\r\n[2016-11-30 02:40:11Z INFO HostContext] Well known directory 'Root': '/home/xxx/myagent'\r\n[2016-11-30 02:40:11Z INFO AgentProcess] Validating directory permissions for: '/home/xxx/myagent'\r\n[2016-11-30 02:40:11Z INFO CommandLineParser] Parse\r\n[2016-11-30 02:40:11Z INFO CommandLineParser] Parsing 1 args\r\n[2016-11-30 02:40:11Z INFO CommandLineParser] parsing argument\r\n[2016-11-30 02:40:11Z INFO CommandLineParser] HasArgs: False\r\n[2016-11-30 02:40:11Z INFO CommandLineParser] Adding Command: remove\r\n[2016-11-30 02:40:11Z INFO AgentProcess] Arguments parsed\r\n[2016-11-30 02:40:11Z INFO ProxyConfiguration] No proxy setting found.\r\n[2016-11-30 02:40:11Z INFO Agent] ExecuteCommand\r\n[2016-11-30 02:40:11Z INFO ConfigurationStore] currentAssemblyLocation: /home/xxx/myagent/bin/Agent.Listener.dll\r\n[2016-11-30 02:40:11Z INFO ConfigurationStore] binPath: /home/xxx/myagent/bin\r\n[2016-11-30 02:40:11Z INFO ConfigurationStore] RootFolder: /home/xxx/myagent\r\n[2016-11-30 02:40:11Z INFO ConfigurationStore] ConfigFilePath: /home/xxx/myagent/.agent\r\n[2016-11-30 02:40:11Z INFO ConfigurationStore] CredFilePath: /home/xxx/myagent/.credentials\r\n[2016-11-30 02:40:11Z INFO ConfigurationStore] ServiceConfigFilePath: /home/xxx/myagent/.service\r\n[2016-11-30 02:40:11Z INFO CommandSettings] Flag 'help': 'False'\r\n[2016-11-30 02:40:11Z INFO CommandSettings] Flag 'version': 'False'\r\n[2016-11-30 02:40:11Z INFO CommandSettings] Flag 'commit': 'False'\r\n[2016-11-30 02:40:11Z INFO CommandSettings] Command 'configure': 'False'\r\n[2016-11-30 02:40:11Z INFO CommandSettings] Command 'remove': 'True'\r\n[2016-11-30 02:40:11Z INFO Terminal] WRITE LINE: Removing service\r\n[2016-11-30 02:40:11Z INFO ConfigurationStore] IsServiceConfigured()\r\n[2016-11-30 02:40:11Z INFO ConfigurationStore] IsServiceConfigured: False\r\n[2016-11-30 02:40:11Z INFO Terminal] WRITE LINE: Removing agent from the server\r\n[2016-11-30 02:40:11Z INFO ConfigurationStore] IsConfigured()\r\n[2016-11-30 02:40:11Z INFO ConfigurationStore] IsConfigured: True\r\n[2016-11-30 02:40:11Z INFO ConfigurationStore] HasCredentials()\r\n[2016-11-30 02:40:11Z INFO ConfigurationStore] stored True\r\n[2016-11-30 02:40:12Z INFO ConfigurationManager] GetCredentialProvider\r\n[2016-11-30 02:40:12Z INFO CommandSettings] Arg 'auth': ''\r\n[2016-11-30 02:40:12Z INFO CommandSettings] Flag 'unattended': 'False'\r\n[2016-11-30 02:40:12Z INFO PromptManager] ReadValue\r\n[2016-11-30 02:40:12Z INFO Terminal] WRITE: Enter authentication type (press enter for Negotiate) >\r\n[2016-11-30 02:40:12Z INFO Terminal] READ LINE\r\n[2016-11-30 02:40:19Z INFO Terminal] Read value: ''\r\n[2016-11-30 02:40:19Z INFO PromptManager] Falling back to the default: 'Negotiate'\r\n[2016-11-30 02:40:19Z INFO ConfigurationManager] Creating credential for auth: Negotiate\r\n[2016-11-30 02:40:19Z INFO CredentialManager] GetCredentialProvider\r\n[2016-11-30 02:40:19Z INFO CredentialManager] Creating type Negotiate\r\n[2016-11-30 02:40:19Z INFO CredentialManager] Creating credential type: Negotiate\r\n[2016-11-30 02:40:19Z INFO PersonalAccessToken] EnsureCredential\r\n[2016-11-30 02:40:19Z INFO CommandSettings] Arg 'username': ''\r\n[2016-11-30 02:40:19Z INFO CommandSettings] Flag 'unattended': 'False'\r\n[2016-11-30 02:40:19Z INFO PromptManager] ReadValue\r\n[2016-11-30 02:40:19Z INFO Terminal] WRITE: Enter user name >\r\n[2016-11-30 02:40:19Z INFO Terminal] READ LINE\r\n[2016-11-30 02:40:37Z INFO Terminal] Read value: 'a\\b'\r\n[2016-11-30 02:40:37Z INFO CommandSettings] Arg 'password': ''\r\n[2016-11-30 02:40:37Z INFO CommandSettings] Flag 'unattended': 'False'\r\n[2016-11-30 02:40:37Z INFO PromptManager] ReadValue\r\n[2016-11-30 02:40:37Z INFO Terminal] WRITE: Enter password >\r\n[2016-11-30 02:40:37Z INFO Terminal] READ SECRET\r\n[2016-11-30 02:40:49Z INFO Terminal] Read value: '********'\r\n[2016-11-30 02:40:49Z INFO NegotiateCredential] GetVssCredentials\r\n[2016-11-30 02:40:49Z INFO NegotiateCredential] User name retrieved.\r\n[2016-11-30 02:40:49Z INFO NegotiateCredential] Password retrieved.\r\n[2016-11-30 02:40:49Z INFO NegotiateCredential] URL retrieved: http://melbnsqltfs:8080/tfs/\r\n[2016-11-30 02:40:49Z INFO ConfigurationManager] cred retrieved\r\n[2016-11-30 02:40:53Z INFO Terminal] WRITE LINE: Failed: Removing agent from the server\r\n[2016-11-30 02:40:53Z ERR  Agent] Microsoft.VisualStudio.Services.Common.VssUnauthorizedException: VS30063: You are not authorized to access http://melbnsqltfs.epenau.local:8080.\r\n   at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.<SendAsync>d__17.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.<SendAsync>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Net.Http.HttpClient.<FinishSendAsync>d__58.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__42`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<ConnectAsync>d__41.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.VisualStudio.Services.Agent.AgentServer.<ConnectAsync>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.<UnconfigureAsync>d__8.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.VisualStudio.Services.Agent.Listener.Agent.<ExecuteCommand>d__9.MoveNext()\r\n[2016-11-30 02:40:53Z ERR  Terminal] WRITE ERROR: VS30063: You are not authorized to access http://melbnsqltfs.epenau.local:8080.\r\n\r\n\r\n\r\n\r\n\r\n\r\n+++++++++++++++++++++++++++++++++++++++++++++++++++\r\ncat Agent_20161201-023407-utc.log\r\n[2016-12-01 02:34:07Z INFO AgentProcess] Agent is built for Linux - rhel.7.2-x64.\r\n[2016-12-01 02:34:07Z INFO AgentProcess] RuntimeInformation: Linux 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016.\r\n[2016-12-01 02:34:08Z INFO AgentProcess] Version: 2.105.7\r\n[2016-12-01 02:34:08Z INFO AgentProcess] Commit: 5f286b1f01c51b7cace8c1649edd6b00893a3649\r\n[2016-12-01 02:34:08Z INFO AgentProcess] Culture: en-AU\r\n[2016-12-01 02:34:08Z INFO AgentProcess] UI Culture: en-AU\r\n[2016-12-01 02:34:08Z INFO HostContext] Well known directory 'Bin': '/home/gillsi/myagent/bin'\r\n[2016-12-01 02:34:08Z INFO HostContext] Well known directory 'Root': '/home/gillsi/myagent'\r\n[2016-12-01 02:34:08Z INFO AgentProcess] Validating directory permissions for: '/home/gillsi/myagent'\r\n[2016-12-01 02:34:08Z INFO CommandLineParser] Parse\r\n[2016-12-01 02:34:08Z INFO CommandLineParser] Parsing 1 args\r\n[2016-12-01 02:34:08Z INFO CommandLineParser] parsing argument\r\n[2016-12-01 02:34:08Z INFO CommandLineParser] HasArgs: False\r\n[2016-12-01 02:34:08Z INFO CommandLineParser] Adding Command: configure\r\n[2016-12-01 02:34:08Z INFO AgentProcess] Arguments parsed\r\n[2016-12-01 02:34:08Z INFO ProxyConfiguration] No proxy setting found.\r\n[2016-12-01 02:34:08Z INFO Agent] ExecuteCommand\r\n[2016-12-01 02:34:08Z INFO ConfigurationStore] currentAssemblyLocation: /home/gillsi/myagent/bin/Agent.Listener.dll\r\n[2016-12-01 02:34:08Z INFO ConfigurationStore] binPath: /home/gillsi/myagent/bin\r\n[2016-12-01 02:34:08Z INFO ConfigurationStore] RootFolder: /home/gillsi/myagent\r\n[2016-12-01 02:34:08Z INFO ConfigurationStore] ConfigFilePath: /home/gillsi/myagent/.agent\r\n[2016-12-01 02:34:08Z INFO ConfigurationStore] CredFilePath: /home/gillsi/myagent/.credentials\r\n[2016-12-01 02:34:08Z INFO ConfigurationStore] ServiceConfigFilePath: /home/gillsi/myagent/.service\r\n[2016-12-01 02:34:08Z INFO CommandSettings] Flag 'help': 'False'\r\n[2016-12-01 02:34:08Z INFO CommandSettings] Flag 'version': 'False'\r\n[2016-12-01 02:34:08Z INFO CommandSettings] Flag 'commit': 'False'\r\n[2016-12-01 02:34:08Z INFO CommandSettings] Command 'configure': 'True'\r\n[2016-12-01 02:34:08Z INFO ConfigurationManager] ConfigureAsync\r\n[2016-12-01 02:34:08Z INFO ConfigurationStore] IsConfigured()\r\n[2016-12-01 02:34:08Z INFO ConfigurationStore] IsConfigured: True\r\n[2016-12-01 02:34:08Z INFO ConfigurationManager] Is configured: True\r\n[2016-12-01 02:34:09Z ERR  Agent] System.InvalidOperationException: Cannot configure the agent because it is already configured. To reconfigure the agent, run 'config.cmd remove' or './config.sh remove' first.\r\n   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.<ConfigureAsync>d__7.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.VisualStudio.Services.Agent.Listener.Agent.<ExecuteCommand>d__9.MoveNext()\r\n[2016-12-01 02:34:09Z ERR  Terminal] WRITE ERROR: Cannot configure the agent because it is already configured. To reconfigure the agent, run 'config.cmd remove' or './config.sh remove' first.\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/comments/264353382","html_url":"https://github.com/Microsoft/vsts-agent/issues/701#issuecomment-264353382","issue_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/701","id":264353382,"user":{"login":"TingluoHuang","id":1750815,"avatar_url":"https://avatars.githubusercontent.com/u/1750815?v=3","gravatar_id":"","url":"https://api.github.com/users/TingluoHuang","html_url":"https://github.com/TingluoHuang","followers_url":"https://api.github.com/users/TingluoHuang/followers","following_url":"https://api.github.com/users/TingluoHuang/following{/other_user}","gists_url":"https://api.github.com/users/TingluoHuang/gists{/gist_id}","starred_url":"https://api.github.com/users/TingluoHuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TingluoHuang/subscriptions","organizations_url":"https://api.github.com/users/TingluoHuang/orgs","repos_url":"https://api.github.com/users/TingluoHuang/repos","events_url":"https://api.github.com/users/TingluoHuang/events{/privacy}","received_events_url":"https://api.github.com/users/TingluoHuang/received_events","type":"User","site_admin":false},"created_at":"2016-12-02T02:02:31Z","updated_at":"2016-12-02T02:02:31Z","body":"@ozitraveller Can you share your agent and worker's _diag log with us?"}}
{"actor":{"display_login":"TingluoHuang"}}