We currently building a Non TFS environment. We install TFS 2015 Update 3 successfully. We create a project collection called Project 1 and create successfully. Then we copied the Tfs_Project1 database from Production environment
and try to restore using the following steps
Restoring TFS
1.Stop Service
C:\Program Files\Microsoft Team Foundation Server 14.0\Tools\TfsServiceControl Quiesce
2.Restore DB using SQL Management Studio
3.Remap DBs
TfsConfig.exe remapdbs /DatabaseName:SS01\APP01;Tfs_Configuration /SQLInstances:SS01\APP01 /continue
In this step i recieved errord TF400777: Unablee to find the database for the host with name "Project1".. This collection will be marked as unavailable. Please stop this collection via the TFS Management Console
4.Register DB
Tfsconfig.exe registerDB /SQLInstance:SS01\APP01 /DatabaseName:Tfs_Configuration
5. Start Service
C:\Program Files\Microsoft Team Foundation Server 14.0\Tools\TfsServiceControl Unquiesce
6.Unable to start collection in Team Foundation Admin Console.
Error: TF400783: The host "Project1' cannot be started. The host is in the process of being serviced. The servicing may have failed and needs to be restarted and completed before the host can be started
is there any best practice to restore or to import Project collection from Prod environment to non prod environment?
Related
I have a TFS 2013 build that I'm trying to get to publish to a folder on the build server. I've installed WebDeploy, but I always get the error:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets (4274): Web deployment task failed. (Could not connect to the remote computer ("localhost"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.)
I've set up a website on the build server and that's where I'm trying to publish the website. Actually I don't even care about publishing it per se - I just need my build output to go to a folder locally automatically. Right now we have to manually open the solution and choose Publish... to get the output that subsequent InstallShield builds need for input. Here are my MSBuild arguments. Does anyone have any idea what could be missing?
/p:SrcDir=C:\Builds\TFS\WebApps\Src
/p:RevKeyname=WebAppsRevNr
/p:DeployOnBuild=true
/p:DeployTarget=MsDeployPublish
/p:MSDeployServiceURL=https://127.0.0.1:8172/msdeploy.axd
/p:CreatePackageOnPublish=True
/p:DeployIisAppPath="WebApp"
/p:MsDeployPublishMethod=WMSVC
/p:AllowUntrustedCertificate=True
/p:AutoParameterizationWebConfigConnectionStrings=False
/p:Authtype=NTLM /p:username=""
I've checked both net start wmsvc and net start msdepsvc and both are running. Any ideas?
Thanks!
UPDATE
I've tried everything that Andy suggested and now when I run this from the command line I get this bizarre error message:
"C:\Workspace\VS2013\WebApps\Main\Src\webapps.sln" (default target) (1) ->
"C:\Workspace\VS2013\WebApps\Main\Src\CoreWebApps\CoreWebApps.csproj"
(default
target) (7) ->
(AutoParameterizationWebConfigConnectionStringsCore target) ->
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web
.Publishing.targets(2295,5): error : Could not open Source file: Could not
find
a part of the path
'C:\Workspace\VS2013\WebApps\Main\Src\CoreWebApps\Areas\Adm
in\Views\Web.config;Areas\Admin\Views\Web.config'.
[C:\Workspace\VS2013\WebApps
\Main\Src\CoreWebApps\CoreWebApps.csproj]
Any idea why it's looking for Web.config;Areas\Admin\Views\Web.config'.? That makes no sense.
Please try below items to narrow down the issue:
Try to use IP or Machine Name instead of "localhost"
Logon your build agent machine, then manually execute the same
MSBuild command within the same arguments(which you provided in build
definition) to build and deploy your solution, then check result. You
need to ensure you can manually run the same MSBuild command within
deploy argument to build and deploy your solution successfully from
build agent machine. Then use the same deploy arguments in TFS Build
definition.
Double check Web Deploy settings to make sure that the name of the
website is exactly that of what's in IIS.
Install Web Management Tools before Web
Deploy : Install the Web Management Services (Roles -> Web Server >
Management Tools > Management Services). Then uninstall Web Deploy, and then install Web Deploy again.
You can also reference this thread for your troubleshooting.
Update:
For the issue "Could not open Source file: Could not find a part of the path" you can reference below similar articles for the troubleshooting.
https://social.msdn.microsoft.com/Forums/en-US/8f959964-c951-4f9a-8486-8283a925c9f6/build-error-could-not-open-source-file-though-i-know-it-exists?forum=windowsazurewebsitespreview
https://our.umbraco.org/forum/getting-started/installing-umbraco/60222-Umbraco-721-Build-fails-after-deploy-to-Azure-WebSite (See the last two answers)
Get this exception when running nservicebus.host.exe self-hosting either through Visual Studio or from command prompt. (Have tried both running from command prompt as administrator and my regular user):
2013-09-12 11:16:33,978 [1] FATAL NServiceBus.Hosting.GenericHost [(null)] <(nul
l)> - System.InvalidOperationException: NServiceBus performance counter for Crit
ical Time not set up correctly. Please run the NServiceBus infrastructure instal
lers to rectify this problem. ---> System.InvalidOperationException: Could not R
ead Category Index: 9340.
I've tried running the "RunMeFirst.bat" which seems to run fine:
C:\Program Files (x86)\NServiceBus\v3.3.4>runmefirst
C:\Program Files (x86)\NServiceBus\v3.3.4>echo off
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
Running infrastructure installers and exiting (ignoring other command line parameters if exist).
There is already a RavenDB service installed on this computer, current status:Running
Starting installation of PerformanceCounters
Installation of PerformanceCounters successful.
Checking if MSMQ is installed.
MSMQ is installed.
Checking that only needed components are active.
Installation is good.
Checking if DTC is configured correctly.
The machine is a windows server 2008 R2 with terminal services which is a shared development server for multiple devs. I suspect the stricter security on win server is to blame here since it works on my win 7 machine.
EDIT
Tried running "Install-PerformanceCounters" in Package Manager Console, but same problem. FYI, the output of Package Manager Console was (my command at the bottom):
Package Manager Console Host Version 2.2.40116.9051
Type 'get-help NuGet' to see all available NuGet commands.
Type 'get-help about_NServiceBus' to see all available NServiceBus commands.
What if: Performing operation "Install-PerformanceCounters" on Target "DEV01".
Performance Counters is setup and ready for use with NServiceBus
What if: Performing operation "Install-Msmq" on Target "DEV01".
Msmq is installed and setup for use with NServiceBus What if:
Performing operation "Install-Dtc" on Target "DEV01".
DTC is not properly configured
What if: Performing operation "Install-RavenDB" on Target "DEV01".
PM> Install-PerformanceCounters
True
PM>
Try using the powershell cmdlets, see http://docs.particular.net/nservicebus/operations/management-using-powershell
Thanks to the comment by John Simons I found the answer in this SO question: corrupted performance counters
In my particular case, running
lodctr /R
in admin command prompt was sufficient.
We are trying to deploy a database project using tfs deployer and "vsdbcmd.exe" (VS 2010 version).
Both are on a windows server 2008 r2 (64 bit).
When our deployment script runs and we call the VSDBCMD.exe, we get the following error:
An unexpected failure occurred: Object reference not set to an instance of an object.
Note: SQL Server is not installed on this server, the script calls to a different server which has the databases we want to execute the database schemas against. Visual studio is also not installed on this server so I executed reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0 as I found a missing registry key could be causing the issue. However, the problem still occurs
The dll's copied to the server are:
Extensions (folder)
DatabaseSchemaProviders.Extensions.xml
Microsoft.Data.Schema.dll
Microsoft.Data.Schema.ScriptDom.dll
Microsoft.Data.Schema.ScriptDom.Sql.dll
Microsoft.Data.Schema.Sql.dll
Microsoft.Data.Schema.Utilities.dll
Sqlceer35en.dll
Sqlceme35.dll
Sqlceqp35.dll
Sqlcese35.dll
sqlceca35.dll
sqlcecompact35.dll
sqlceoledb35.dll
System.Data.SqlServerCe.dll
vsdbcmd.exe
vsdbcmd.exe.config
Any ideas on how to resolve this would be great
Thanks,
Ryan
Background:
I have several builds running on a Windows Server 2003 R2 machine via TFS2010. All of these build definitions have the Path to Publish Symbols set to "\\server\SymbolStore" and the builds run fine.
(Note - I have inherited this set up from a former employee, and I also have other builds running on a separate 2K8 machine that also run without issue)
I am now migrating these builds to a new Windows 2008 R2 build server using the same settings.
Problem:
When running the builds on the new build machine, everything is working fine until the build tries to run the "Publish Symbols" activity in the workflow, at which point I get the error
SYMSTORE ERROR: Class: Server. Desc: Couldn't connect to server.
Error 5: Access is denied. TF270015: 'symstore.exe' returned an
unexpected exit code. Expected '0'; actual '5'.
which also sets the build status to Partially Succeeded.
I have searched the web for these error messages to no avail so far, so does anyone know what might be causing this and how to get it working again?
As always, thanks in advance
Did you check the folder has the right permissions for the service account that is used by Team Build to create/write files ?
Turns out that after I had set up the new build machine, I had left the Credentials for the Build Service Properties (found in the Team Foundation Server Administration Console/Build Configuration) to its default setting which is "NT AUTHORITY\NetworkService". Once I had changed this to use the build service account, the builds are able to write to the symbol store properly
When using IIS6, should the 'Deploy' context menu item be available when right clicking on a web site?
I've installed the Web Deploy 2.1 (web installation tool) and rebooted but still it doesn't show. Maybe it doesn't show, and you just use the Web Deploy command line instead?
Any information appreciated.
No, The "deploy" context menu is only available in IIS 7 and 7.5. You'll have to do things via command line.
If you want to migrate from iis6 to iis7 you can follow the instructions here: http://learn.iis.net/page.aspx/427/migrate-a-web-site-from-iis-60-to-iis-7/ Note part 3 which goes into the actual web deploy commands.
Part 3 – Migrate your site to the
target by using a package file
Always make a backup of the destination server. Even if you are
just testing, it allows you to easily
restore the state of your server.
%windir%\system32\inetsrv\appcmd add backup “PreWebDeploy”
Run the following command on the source server to create a package
(compressed) file of the server:
msdeploy -verb:sync -source:metakey=lm/w3svc/1 -dest:package=c:\Site1.zip > WebDeployPackage.log
Copy the package file to the destination server.
Run the following command on the destination server to validate what
would happen if a sync operation were
run:
msdeploy -verb:sync -source:package=c:\Site1.zip -dest:metakey=lm/w3svc/1 -whatif > WebDeploySync.log
After verifying the output, run the same command again without the whatif
flag:
msdeploy -verb:sync -source:package=c:\Site1.zip -dest:metakey=lm/w3svc/1 > WebDeploySync.log