Following these instructions (Deploy an agent on Windows), I have configured an VSTS build agent to run as a Windows service. The host server is configured to access the Internet through a corporate proxy server. I am able to browse to the target VSTS site through Internet Explorer from the server.
When I view "Agents for pool Default" I see my newly configured agent, but its status is "offline" and it has a red block rather than green. If I restart the agent service then I get the following error in the event log:
The vsoAgent process failed to start successfully. It exited with code
3. Check the latest Agent log files in C:\VSTSBuild\agent_diag for more information. Waiting for 5 seconds before retrying.
However, on checking the _diag log files, there are no errors:
14:17:25.160120 Sending trace output to log files:
C:\VSTSBuild\agent_diag 14:17:25.203125 VsoAgent.exe was run with the
following command line: "C:\VSTSBuild\agent\agent\vsoagent.exe"
/runningAsService 14:17:25.345132 SettingsFileHelper.Load -
settings[AutoUpdate]=True 14:17:25.345132 SettingsFileHelper.Load -
settings[RootFolder]=C:\VSTSBuild\agent 14:17:25.345132
SettingsFileHelper.Load -
settings[WorkFolder]=C:\VSTSBuild\agent_work 14:17:25.346130
SettingsFileHelper.Load -
settings[ServerUrl]=https://XXXXappdevteam.visualstudio.com
14:17:25.346130 SettingsFileHelper.Load -
settings[AgentName]=Agent-XXXX-NCC-BT001U 14:17:25.346130
SettingsFileHelper.Load - settings[PoolId]=1 14:17:25.346130
SettingsFileHelper.Load - settings[PoolName]=default 14:17:25.346130
SettingsFileHelper.Load - settings[AgentId]=5 14:17:25.346130
SettingsFileHelper.Load - settings[RunAsWindowsService]=True
14:17:25.346130 SettingsFileHelper.Load -
settings[WindowsServiceName]=vsoagent.XXXXappdevteam.Agent-XXXX-NCC-BT001U
14:17:25.346130 SettingsFileHelper.Load -
settings[WindowsServiceDisplayName]=VSO Agent
(XXXXappdevteam.Agent-XXXX-NCC-BT001U) 14:17:25.381133
BaseLogger.LogStatus(scope.JobId =
00000000-0000-0000-0000-000000000000, scope.TimelineRecordId =
00000000-0000-0000-0000-000000000000, record.Name = Agent)
14:17:25.424136 BaseLogger.LogConsoleMessage(scope.JobId =
00000000-0000-0000-0000-000000000000, message = Authenticating to the
server https://XXXXappdevteam.visualstudio.com) 14:17:25.449133 Exe
location hash = ce01163e1787840dbffc06817bd93470
After a few minutes, the request times out and the following is added to the log:
System.Net.Http.HttpRequestException: An error occurred while sending
the request. ---> System.Net.WebException: Unable to connect to the
remote server ---> System.Net.Sockets.SocketException: A connection
attempt failed because the connected party did not properly respond
after a period of time, or established connection failed because
connected host has failed to respond 65.52.8.37:443
A colleague from the network team has run a trace against the proxy and confirmed that he can see requests coming from the agent's host server, but no response from visualstudio.com.
I have tried adding the following to the <Configuration> element of VsoAgentService.exe.config
<system.net>
<defaultProxy>
<proxy
usesystemdefault="true"
proxyaddress="proxy address here"
bypassonlocal="true"
/>
</defaultProxy>
What should I check next or where have I gone wrong?
I'm not running as a service, but from the cmd window - behind a proxy configured in Git globally. I had connection issues with the VSTS recommended build agent (the one you download from within VSTS), but using the latest agent on GitHub, which authenticates with PAT, these problems go away:
https://github.com/Microsoft/vsts-agent
I ran into a similar connection error as well despite being able to open the URL in the browser. My problem ended up being related to the proxy. If your proxy requires authentication, you will have to provide the credentials through environment variables if your service is not running as a network account with privileges to the proxy.
Try these steps:
Open CMD prompt
Set VSTS_HTTP_PROXY=http://yourproxy:80
Set VSTS_HTTP_PROXY_USERNAME=proxyuser
Set VSTS_HTTP_PROXY_PASSWORD=proxypassword
Restart the service.
Related
When trying to build kudu in my ec2, I got an error "HTTP/1.1 403 Forbidden". My connection was opened through a proxy. The domain that we are trying to connect to here is "service .gradle.org". This can be accessed through HTTPS. Here the build is run using the gradle wrapper jar (v6.8.3). Here, a 403 Forbidden error of the above type kept appearing. It lookes like the connection is trying to use HTTP instead of HTTPS.
This problem is not occurring when the build is run in an environment without a proxy
Build fail image
I tried to connect gcloud with gcloud init. I got Network connection error.
I tried to fix with Network connection problems in Google Cloud SDK while I have access to google or website like google app engine in my browser
gcloud config set proxy/type socks5
gcloud config set proxy/address 127.0.0.1
gcloud config set proxy/port 1086
But it still does not work for me.
My log is:
Welcome! This command will take you through the configuration of gcloud.
Settings from your current configuration [default] are:
core:
disable_usage_reporting: 'False'
proxy:
address: 127.0.0.1
port: '1080'
type: socks5
Pick configuration to use:
[1] Re-initialize this configuration [default] with new settings
[2] Create a new configuration
[3] Switch to and re-initialize existing configuration: [cindy]
Please enter your numeric choice: 1
Your current configuration has been set to: [default]
You can skip diagnostics next time by using the following flag:
gcloud init --skip-diagnostics
Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.
ERROR: Reachability Check failed.
Cannot reach https://www.google.com (error)
Cannot reach https://accounts.google.com (error)
Cannot reach https://cloudresourcemanager.googleapis.com/v1beta1/projects (error)
Cannot reach https://www.googleapis.com/auth/cloud-platform (error)
Cannot reach https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json (error)
Network connection problems may be due to proxy or firewall settings.
Current effective Cloud SDK network proxy settings:
type = socks5
host = 127.0.0.1
port = 1080
username = None
password = None
What would you like to do?
[1] Change Cloud SDK network proxy properties
[2] Clear all gcloud proxy properties
[3] Exit
It is due to redirection from goolge account to localhost for acquiring token Try to login using firefox
Considering the error and mainly the following part of the error, it seems that you are facing issues with your proxy and firewall settings and configuration.
Network connection problems may be due to proxy or firewall settings.
Due to this error, you need to configure your SDK to be used with proxy and firewall. I would recommend you to take a look at the documentation Configuring Cloud SDK for use behind a proxy/firewall, to get more information and steps on how to achieve it and avoid the error that you are facing.
Besides that, I could find the below two posts from the Community, of users that are facing similar cases that you are facing.
ERROR: Reachability Check failed. #51
gcloud utility not working #25
Let me know if the information helped you!
For the people who still have this problem.
Try to use IPV4 first as IPV6 is still buggy for many systems.
For Linux, you can just uncomment or add the following line in /etc/gai.conf file:
precedence ::ffff:0:0/96 100
For other systems, you can google the set-up
WAS 8.5 full profile isn't officially supported on OSX by IBM so the only option to perform development from OSX is to install stub runtime and connect to WAS installed remotely. I'm trying to install such scenario but something done wrong and can't connect to my WAS.
There's my installation:
On OSX El Capitan Installed:
RAD 9.5 with WAS 8.5 stub runtime (WebSphere Application Server traditional V8.5 stub)
Installed Virtual Box with Ubuntu Desktop edition 14.04
Ubuntu's hostname: anatoly-ubuntu-vm and it's accessible from host, i.e. ping anatoly-ubuntu-vm works fine
On Ubuntu installed:
WAS 8.5 full profile at /opt/IBM/WebSphere
Created AppSrv01 profile at /opt/IBM/WebSphere/AppServer/profiles
WAS installed with root user, IBM Installation Manager required root permission when was started
My connection settings in RAD:
server name: WebSphere Application Server traditional V8.5 stub at anatoly-ubuntu-vm
hostname: anatoly-ubuntu-vm
Runtime environment: WebSphere Application Server traditional V8.5 stub
Connection type:
I've tried RMI 2809 and SOAP 8880 both options didn't work
Enable the server to start remotely is checked and Select the operating system running the remote server: checked Linux option with my username and password. I've tried my regular Ubuntu account and root, both option didn't work.
Server profile path defined as /opt/IBM/WebSphere/AppServer/profiles/AppSrv01
When I try to start server I get the following exception:
The following problems has occurred when starting the server.
CTGRI0001E The application could not establish a connection to
anatoly-ubuntu-vm .
What am I doing wrong?
UPDATE 1:
After I've written this post I've figured out that SSH server isn't installed and configured at all as described here: Requirements for using Remote Execution and Access (RXA) Now, I've installed and it seems like connecting but stuck at 23% at stage Preparing launch delegate, after a while it throw the following error:
The following problems has occurred when starting the server. The
server may not be started in the correct mode. You can restart the
server to desired mode if it is started. CTGRI0075E A file transfer to
or from the system named [anatoly-ubuntu-vm] timed out before the
transfer could complete. The current timeout interval is set to 240000
milliseconds, and might need to be increased.
UPDATE 2:
As I can see despite error message server is started and I even can connect to web console anatoly-ubuntu-vm:9060/console/ibm but it looks that not SOAP connection, neither RMI connection don't work. When I run Test Connection from Settings overview page in RAD, I get the following error:
The connection failed after trying to use all the available connection
types.
Verify the port values are correct and the server has been started. If
the security of the server is enabled, verify the "Security is enabled
on this server" check box is selected, and the user ID and password
are provided. You can specify this in the server editor or when
creating a new server.
For a Technote with details on the most common server connection
problem, see http://www.ibm.com/support/docview.wss?uid=swg21266028.
The last connection attempt failed with the following exception:
ADMC0016E: The system cannot create a SOAP connector to connect to
host anatoly-ubuntu-vm at port 8880.
UPDATE 3
As #DanielBarbarian guessed I tried to run ./wsadmin.sh -port 8880 and it worked and returned
Connected to process "server1" on node anatoly-ubuntu-vmNode01 using SOAP connector; The type of process is: UnManagedProcess`
This is settings of my ports:
UPDATE 4
When I trying to run telnet anatoly-ubuntu-vm 8880 from OSX host I get the following response (ip address changed to non real due to privacy issue):
anatoly-mac:~ anatoly$ telnet anatoly-ubuntu-vm 8880
Trying 192.168.10.10...
Connected to anatoly-ubuntu-vm
Escape character is '^]'.
HTTP/1.1 408 Request Timeout
Content-Type: text/html
Content-Length: 117
Connection: close
<HTML><TITLE>408 - Request Timeout</TITLE><BODY>
<h1>408 Connection timed out while reading request</h1></BODY>
</HTML>Connection closed by foreign host
I am using Bamboo as build server and Octopus deploy for Deployment. I am using their command line tool, Octo.exe to create and push nuget packages to the server.
It was working fine. But we started getting errors which were intermittent at first and then became very common. Now it fails almost everytime but succeeds once in a while. I have installed the Server and tentacle in the same machine.
This is the error I am getting
Handshaking with Octopus server: http://Server/
17-May-2016 19:51:11 Handshake successful. Octopus version: 3.3.12; API version: 3.0.0
17-May-2016 19:51:11 Authenticated as: ajaybhasy <>
17-May-2016 19:51:11 Pushing package: C:\build\WOR-WA-JOB1\client\dist\WorldSmartAngular.1.0.337.nupkg...
17-May-2016 19:53:39 System.IO.IOException: Unable to write data to the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
17-May-2016 19:53:39 at System.Net.Sockets.Socket.MultipleSend(BufferOffsetSize[] buffers, SocketFlags socketFlags)
17-May-2016 19:53:39 at System.Net.Sockets.NetworkStream.MultipleWrite(BufferOffsetSize[] buffers)
17-May-2016 19:53:39 --- End of inner exception stack trace ---
According to the posts in their support I tried changing the Tentacle to polling mode, but that too didnt work for me.
I am trying web-deploy.
Because I wanted to be able to reproduce this, i used a test system
Windows 2008 RC, IIs 7.5 + Deployment package
I configured deployment using
http://learn.iis.net/page.aspx/516/configure-the-web-deployment-handler/
Enabled tracing
http://technet.microsoft.com/en-us/library/ff729439(v=ws.10).aspx
I created a new WCF Service Application, (changed nothing) compiled it and tried to deploy
I get the following response(after a few min)
------ Build started: Project: WcfService1, Configuration: Debug Any CPU ------
WcfService1 -> C:\Development\BrandShield\Services\WcfService1\bin\WcfService1.dll
------ Publish started: Project: WcfService1, Configuration: Debug Any CPU ------
Transformed Web.config using Web.Debug.config into obj\Debug\TransformWebConfig\transformed\Web.config.
Auto ConnectionString Transformed obj\Debug\TransformWebConfig\transformed\Web.config into obj\Debug\CSAutoParameterize\transformed\Web.config.
Copying all files to temporary location below for package/publish:
obj\Debug\Package\PackageTmp.
Start Web Deploy Publish the Application/package to http://dev1:8172/msdeploy.axd/MSDEPLOYAGENTSERVICE ...
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847,5): Error : Web deployment task failed.(Could not complete the request to remote agent URL 'http://dev1:8172/msdeploy.axd/MSDEPLOYAGENTSERVICE'.)
This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server.
Error details:
Could not complete the request to remote agent URL 'http://dev1:8172/msdeploy.axd/MSDEPLOYAGENTSERVICE'.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Publish failed to deploy.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
and no logs (at all) on the dev1 server side.
I have tried many variations, but this is the simplest, easiest thing to reproduce. and it is failing.
any ideas?
I found the issue.
instead of "http://" dev1:8172/msdeploy.axd I used dev1:8172/msdeploy.axd
this is actaully the same as "https://" dev1:8172/msdeploy.axd, which for some reason is where the deployment agent listens.
From here, you will get a new error:
Could not complete the request to remote agent URL 'https://dev1:8172/msdeploy.axd?site=Default web site'.
The underlying connection was closed:
Could not establish trust relationship for the SSL/TLS secure channel.
The remote certificate is invalid according to the validation procedure.
This is because you don't have a certificate for SSL.
In the publish profile window, You need to check the
"Allow untrusted certificate" checkbox
and the publish should succceed. good luck
by pass the certificate:
Step 1:
System.Net.HttpWebRequest req = (HttpWebRequest)WebRequest.Create(Url);
ServicePointManager.ServerCertificateValidationCallback = AcceptAllCertifications;
step 2:
public Boolean AcceptAllCertifications(Object sender, System.Security.Cryptography.X509Certificates.X509Certificate certification, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
{
return true;
}
In my case I had this problem in an Azure DevOps build pipeline and it was a SSL/TLS version mismatch between build agent (on-prem machine) and Azure DevOps. I am not sure why it happened but I followed this guide detailing the use of SCH_USE_STRONG_CRYPTO flag in registry to force the use of "strong cryptography" (TLS 1.2, TLS 1.1, and TLS 1.0).
On the build agent machine I updated the registry with the following keys for .NET Framework 4 (x86/x64):
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001
What I still do not understand is why I was not using "strong cryptography" from the start and what I actually was using? (SSL v.X? Why?)