Cannot start TFS Build service: Error 1227 - tfs

When I try to start the TFS 2008 Build service on the port 9191 I get the following error message:
Windows could not start the Visual
Studio Team Foundation Build service
on Local Computer.
Error 1227: The network transport
endpoint already has an address
associated with it.
If I use another port it works, but I need it to be the default, 9191.
I will appreciate any help!
Update:
I have tried by removing every binding to the port 9191 that the following command shows:
netsh http show uracl
To remove the bindings I used the following command:
netsh http delete urlacl url=https://xxxx:9191/Build/v2.0/AgentService.asmx/
Once I removed the bindings, the service was able to start, but the BS web service were not available from the outside, this is because of the removed bindings. I ran the following command to reserve the endpoint again:
wcfhttpconfig.exe reserve Domain\ServiceAccount https://xxxx:9191/Build/v2.0/AgentService.asmx/
But then, the service is unable to start again. The same error message is displayed as before.
The log trace of TFSBuildService contains the following message:
TF224000: The Visual Studio Team Foundation Build service failed to start because another application is already using the address http://xxxx:9191/Build/v2.0/AgentService.asmx.
Exception Message: HTTP could not register URL http://+:9191/Build/v2.0/AgentService.asmx/. Another application has already registered this URL with HTTP.SYS. (type AddressAlreadyInUseException)

It sounds like you already have a build agent defined on that server using the standard port. Each build agent has to have it's own port, otherwise it wouldn't know where to listen.

Related

unable to deploy .net project using TFS IIS app deployment task

I am trying to deploy my project to IIS using TFS Winrm:IIS web app deployment task. I am new to this.
I am getting the following error'
"Deployment failed on machine xxx with following message : System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server xxx failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". "
I was able deploy the project to the same remote server using TFS Winrm: windows machine file copy task which is the prior step for web app deployment to IIS. Winrm service is running and when it type the "winrm quickconfig i am getting "winrm is already been configured".
What am i missing here ? please suggest. Thanks in advance.
The Winrm:IIS task is actually MSDeploy from Machine A to Machine B so for this to work you need to install MSDeploy on Machine B. You should then be ok to deploy from Machine A. Check this article out for more information and to see if you have all the pre-requisite. Also these articles have a bit more info.
https://learn.microsoft.com/en-us/azure/devops/pipelines/apps/cd/deploy-webdeploy-iis-winrm?view=azure-devops
https://marketplace.visualstudio.com/items?itemName=ms-vscs-rm.iiswebapp
The issue was resolved when i enable remote powershell remoting my remote machine using the command Enable-PSRemoting –force

Cannot access wsdl file from different machine

I am trying to run the running Client & Server Application on different machine but then I am getting below exception message which says it can not get wsdl file on that machine:
javax.xml.ws.WebServiceException: Failed to access the WSDL at:
http://localhost:8080/proj_name/EmpServices?wsdl. It failed with: Got
http://localhost:8080/proj_name/EmpServices?wsdl while opening stream
from same_link_as_above/EmpServices?wsdl.
It looks like connection issue, not WSDL or service-related.
Possible causes and solutions:
You tell about "remote machine", but errors says "localhost".
Have you configured your service client to work with your remote machine?
Shouldn't it be remote machine's address? Or is it just a typo?
If you configured it correctly, make sure that you have a working connection and port 8080 is allowed in your firewalls.
You may also try to open this link directly in your browser from client machine, and see what is says.
Perhaps, you will get connection error message, while you should get WSDL file.

Error while adding a wcf service refrence in ASP.Net mvc

I get this message error from visual studio when I attempt to add a service reference in visual studio using an url address.
There was an error downloading
'http://serviceendpoint.com/_vti_bin/ListData.svc/$metadata'. Unable
to connect to the remote server No connection could be made because
the target machine actively refused it 127.0.0.1:8888 Metadata
contains a reference that cannot be resolved:
'http://serviceendpoint.com.tn:10200/'. There was no endpoint
listening at http://serviceendpoint.com.tn:10200/ that could accept
the message. This is often caused by an incorrect address or SOAP
action. See InnerException, if present, for more details. Unable to
connect to the remote server No connection could be made because the
target machine actively refused it 127.0.0.1:8888 If the service is
defined in the current solution, try building the solution and adding
the service reference again.
However, this url is accessible from the browser and from another computer using visual studio.
Can you check your host file? Seems like it doesn't contain reference to your localhost

Deploy to Azure Virtual Directory - Web deployment task failed.(Could not complete the request to remote agent URL

I'm having issues deploying an asp.net mvc 4 project from the buildserver to Azure.
We have one azure web site (strictly with nothing deployed to it directly), with a number of Apps deployed in virtual directories underneath. It is with these apps / virtual directories I'm having problems deploying to.
I can deploy direct to Azure from within VS using publish profiles, and also from a batch file which uses publish profiles locally, but it sounds like you cannot use publish profiles on a build server, so I'm using the same settings to fire MSBuild with parameters instead.
The error being returned is:
error : Web deployment task failed.(Could not complete the request to remote agent URL 'http://[site].scm.azurewebsites.net:443/MSDEPLOYAGENTSERVICE'.)
Note this first error lists the main site, not the virtual directory, though this is the value from the .pubxml file that works through VS.
Other errors listed after the first (above) are..
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(3847,5): error : 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 : Could not complete the request to remote agent URL 'http://[site].scm.azurewebsites.net:443/MSDEPLOYAGENTSERVICE'.
error : The underlying connection was closed: An unexpected error occurred on a receive.
error : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
..and the batch file including the msbuild commands & paramaters is..
msbuild projectname.csproj
/P:Configuration=DevDeployMyApp
/p:DeployTarget=MSDeployPublish
/p:DeployOnBuild=True
/p:MsDeployServiceUrl=[Site].scm.azurewebsites.net:443
/p:AllowUntrustedCertificate=True
/p:VisualStudioVersion=11.0
/P:CreatePackageOnPublish=True
/p:username=[user]
/p:Password=[password]
/p:DeployIisAppPath=[site]/[VirtualDirectoryName]
/p:MSDeployPublishMethod=RemoteAgent
/p:IgnoreDeployManagedRuntimeVersion=True
Any ideas?
Is your service is already running, try going into the Azure portal and stopping it before publishing. That sometimes helps get it unstuck.

TFS build agent, same port as team server?

My team foundation is setup to use port 8080, when I am creating a new build agent it defaults to port 9191.
Which one should I use?
I am getting an error when I try and run my build, it says the build agent was unreachable.
I created a share on my drive c:\tfsbuilds, and I added the TFSService account and gave it full rights.
I am using the \computername\tfsbuilds as my path to the builds folder.
What else could be wrong?
Error message
Team Foundation Build on computer TFSBUILDS.MyServer1.local (port 9191) is not responding. (Detail Message: Unable to connect to the remote server)
Has the Build service been started? This is probably the most common issue as the service will need to be started first. And yes, 9191 is the default port for the build agents. Can you also check your firewall?

Resources