Service Unavailable

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
skaguy25
Posts: 4
Joined: Tue Mar 04, 2008 1:05 pm

Service Unavailable

Post by skaguy25 » Tue Mar 04, 2008 1:09 pm

I have installed both the server & the client on an XP 64-bit machine and put IIS in 32-bit mode. When I open the Admin client I get the error "Service Unavailable". So far I have not found a solution in other posts. Any ideas?

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Tue Mar 04, 2008 1:42 pm

Is the VaultService running as an application in IIS? Is the Application Pool where Vault is installed using the 2.0 framework? Did you stop and restart the Application Pool after you put IIS in 32-bit mode?
Mary Jo Skrobul
SourceGear

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Tue Mar 04, 2008 1:47 pm

Also, it may be helpful if you sent your install log (%temp%\vault_install.log) so I can see what options were chosen during the server install.
Mary Jo Skrobul
SourceGear

skaguy25
Posts: 4
Joined: Tue Mar 04, 2008 1:05 pm

Post by skaguy25 » Wed Mar 05, 2008 10:25 am

The VaultAppPool is listed, but was not started. After starting there was no change. I tried stopping & starting again. No Luck.

I do have .NET 2.0 installed, but I do not know how to check if it is being used by a specific application pool.

Below is my install log:

Log started at 29 Feb 2008 - 20.28.06

Custom action assembly location: C:\inetpub\wwwroot\VaultService\bin\CustomActionExe.exe
Custom Action version: 4.1.0

FileVersionInfo: File: C:\inetpub\wwwroot\VaultService\bin\CustomActionExe.exe
InternalName: CustomActionExe.exe
OriginalFilename: CustomActionExe.exe
FileVersion: 4.1.0.16216
FileDescription:
Product:
ProductVersion: 4.1.0.16216
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language: Language Neutral


The commandline args as passed in to us:

/TARGETDIR='C:\inetpub\wwwroot\VaultService\'
/TARGETDIR2='C:\inetpub\wwwroot\Fortress\'
/PARAMS=
/DROPDB=
/UPGRADE=
/ADMINPW=
/SQLSERVER=
/WINAUTH=1
End commandline args.

Found local name of NT AUTHORITY\NETWORK SERVICE for Network Service account.
Validate the target dir for shadow folders
See if we need to do an upgrade or an install...Configuring your new Vault Installation
Entered CreateCryptoRegistryValues.
CreateCryptoRegistryValues completed successfully.
Requesting the IIS Process User...Found local name of NT AUTHORITY\NETWORK SERVICE for Network Service account.
Requesting Vault Admin user password... Hashing the admin pw
OK
Connecting to the SQL Server...ConnectToDatabase() completed successfully.
dialog result for uninstall is: OK
OK
Verifying the SQL Server requirements... User is trying to install to Microsoft SQL version 9.00.2047.00
OK
Checking for an existing databases...Not found.
Creating a new Vault database on PURETECH38\LOCALDB...
Using collation: SQL_Latin1_General_CP1_CI_AS
Making sure we don't have a user login still hanging around.
Executing commands in master_ddl.sql
Read master_ddl.sql from our resources.
substituting collation for master_ddl.sqlwith collation SQL_Latin1_General_CP1_CI_AS
Creating the SourceGear master database...OK
DoSqlCommandsFromFile completed successfully.
Executing commands in vault_ddl.sql
Read vault_ddl.sql from our resources.
substituting collation for vault_ddl.sqlwith collation SQL_Latin1_General_CP1_CI_AS
Creating the SourceGear source control database...OK
DoSqlCommandsFromFile completed successfully.
Executing commands in master_sp.sql
Read master_sp.sql from our resources.
Creating SourceGear master stored procedures...OK
DoSqlCommandsFromFile completed successfully.
Executing commands in vault_sp.sql
Read vault_sp.sql from our resources.
Creating SourceGear source control stored procedures...OK
DoSqlCommandsFromFile completed successfully.
Executing commands in master_data.sql
Read master_data.sql from our resources.
Adding Data to SourceGear master database...OK
DoSqlCommandsFromFile completed successfully.
Executing commands in vault_data.sql
Read vault_data.sql from our resources.
Adding Data to SourceGear source control database...OK
DoSqlCommandsFromFile completed successfully.

Now add some stuff not in the script...
Adding installation specific data.
Generating RSA value.
Adding the admin user and putting him in a group.
Adding the admin user...OK
Add user 'sgvaultuser', grant him db access, and set as rolemember to database sgvault
Giving sgvaultuser access to the Vault database...Adding Vault SQL permissions
Checking for database access on sgvaultuser within the sgvault database.
Checking for database access on sgvaultuser within the sgmaster database.
OK
Adding Initial Repository.
Creating Initial Repository...OK
AddSqlData completed successfully.
Updating upgrade history table...
Database created successfully!
Checking permissions on local folders... Shadowdir as retrieved from context params : C:\inetpub\wwwroot\VaultService\VaultShadowFolder
Adding permissions per user's request.
Failed
Error granting permissions. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
Adding NT AUTHORITY/NETWORK SERVICE to IIS_WPG
Exception The specified account name is already a member of the local group. (Exception from HRESULT: 0x80070562)
Entered ModifyWebDotConfig().
Updating Configuration... Encrypting the admin pw
Read Web.config from our resources.
Preparing to write Web.config...
ModifyWebDotConfig() completed successfully.
OK

Pre-Website Check...

Entering Website Check...
Begin search for websites on this machine - PURETECH38
Looking for websites on this machine...
Begin search for websites on this machine - PURETECH38
Looking for websites on this machine...
Prepped IIS Path : IIS://LocalHost/W3SVC. Preparing to do directory entry
Directory Entry succeeded : W3SVC
W3SVC child is 1
1Added to _websites
Found website - 'Default Web Site'
W3SVC child is AppPools
W3SVC child is Filters
W3SVC child is Info
Search for websites returned successfully.

Successfully exited Website Check...
Found 1 websites.
Creating the Virtual Directory, VaultService...Confirmed our website 'IIS://LocalHost/W3SVC/1/Root' exists.
The directory physical path is 'C:\inetpub\wwwroot\VaultService\' and the name is 'VaultService'
Checking for existing directory at 'IIS://LocalHost/W3SVC/1/Root/VaultService'
Begin creating the Virtual Directory 'VaultService'.
Added the Virtual Directory 'VaultService'. Commiting the Add to the IIS Metabase
Changes have been commited to IIS Metabase. Now giving setting path to files on disk and giving them read access
Changes have been commited to IIS Metabase. Now giving setting path to files on disk etc.
Path, Access, browse flags and default doc have been commited to IIS Metabase.
Creating the App Pool.
App pool changes have been commited. Now setting the application name
Application name has been committed.
Found SOFTWARE\Wow6432Node key
OK
Creating the Virtual Directory, VaultShadowFolder...Confirmed our website 'IIS://LocalHost/W3SVC/1/Root' exists.
The directory physical path is 'C:\inetpub\wwwroot\VaultService\VaultShadowFolder' and the name is 'VaultShadowFolder'
Checking for existing directory at 'IIS://LocalHost/W3SVC/1/Root/VaultShadowFolder'
Begin creating the Virtual Directory 'VaultShadowFolder'.
Added the Virtual Directory 'VaultShadowFolder'. Commiting the Add to the IIS Metabase
Changes have been commited to IIS Metabase. Now giving setting path to files on disk and giving them read access
Changes have been commited to IIS Metabase. Now giving setting path to files on disk etc.
Path, Access, browse flags and default doc have been commited to IIS Metabase.
Creating the App Pool.
App pool changes have been commited. Now setting the application name
Application name has been committed.
Found SOFTWARE\Wow6432Node key
OK
Creating app pool on 'IIS://LocalHost/W3SVC/AppPools'.
Created app pool on 'IIS://LocalHost/W3SVC/AppPools'.
Assigning app pool on 'IIS://LocalHost/W3SVC/1/Root/VaultService'.
Assigned app pool on 'IIS://LocalHost/W3SVC/1/Root/VaultService'.
Assigning app pool on 'IIS://LocalHost/W3SVC/1/Root/VaultShadowFolder'.
Assigned app pool on 'IIS://LocalHost/W3SVC/1/Root/VaultShadowFolder'.
Editing keepalive on IIS://LocalHost/W3SVC/1
Couldn't enable web service extension Exception has been thrown by the target of an invocation.
Entered SetInstallationSettings().
Exit SetInstallationSettings() success
Entered GetServerBindings()
Exit GetServerBindings()
Entered MakeUrl()
Hostname lookup returned: PureTech38
Port is default, 80
Exit MakeUrl() - PureTech38
Updating Vault.config with Server URL
Updating Vault.Config with Server URL...Server URL for email configured successfully
OK
Updating Shadow Folder Configuration...OK
Creating the Server Home Page...Read index.html from our resources.
Entered GetAssemblyVersion()
GetAssemblyVersion completed successfully.
Could not find host at http or https. Defaulting to http.
OK
Your Vault Server has been successfully configured.

After pressing [OK] the install will complete and launch a Web browser where you can enter license keys. Please log in with the user name and password that you supplied during this install.
Please press OK to continue installing the Client (if selected).ExitCode on exit: 0

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Wed Mar 05, 2008 11:12 am

Thanks for the log file.
In IIS 6.0 I think you can check which version of the framework an App Pool is running in the AppPool Properties.

You may want to re-register the 32-bit 2.0 framework:
Go to command line, browse to the 32-bit 2.0 .NET framework folder (%windir%\Microsoft.NET\Framework\v2.0.50727) and run:
aspnet_regiis -i

There are a couple of errors in the log file that are not normal:
Adding permissions per user's request.
Failed
Error granting permissions. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
Permissions were not set correctly on the necessary folders. Verify the following permissions:

NT Authority/Network Service account (which is the account used by default on 2003) needs read/write access to the following folders in order for the Server to work:

* the local directory containing the server installation files (by default, InetPub\wwwroot\VaultService).
* the directory where the log files are written (by default, WINNT\Temp). The log file location can be changed after installation, in the Vault Admin Tool under Server Options.
* the IIS process account's %userprofile%\Application Data \Microsoft\Crypto\RSA\MachineKeys or to %ALLUSERSPROFILE%\Application Data\Microsoft\Crypto\RSA\MachineKeys if the IIS process account does not have a user profile.
* the Vault Shadow Folder directory.
* Windows\Microsoft.NET\Framework\<version>\Temporary ASP.NET Files.
Couldn't enable web service extension Exception
Verify that you have ASP.NET and ASP.NET web server extensions enabled in IIS.

http://technet2.microsoft.com/windowsse ... x?mfr=true
Mary Jo Skrobul
SourceGear

skaguy25
Posts: 4
Joined: Tue Mar 04, 2008 1:05 pm

Post by skaguy25 » Wed Mar 05, 2008 12:44 pm

I was not able to check the framework version from the AppPool properties. However, I did have some success with the other suggestions.

I ran the aspnet_regiis -i command and was back to a 404 error when opening the admin client. I then opened up permissions on the InetPub\wwwroot\VaultService folder. Last used IIS to enable web services for .NET 2.0 (32-bit).

I can now access the admin client. However, I cannot login. I get the following error:

Login Failed: The Vault Server could not establish a connection to the database. Please check the server's log for detailed information. (FailDBConn)

When Trying to access the Vault Client (not the admin client) I get the following error:

Unable to connect to http://puretech38/localdb. No server was found at the specified URL. Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client. Web Exception: The request failed with HTTP status 404: Not Found.

Below is my server log:

# SourceGear Vault Server
----3/5/2008 11:07:35 AM --()-- Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----3/5/2008 11:07:35 AM --()-- Vault Failed to establish a connection to the database.
----3/5/2008 11:07:35 AM --()-- Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----3/5/2008 11:07:35 AM --()-- Vault Failed to establish a connection to the database.
----3/5/2008 11:07:35 AM --()-- Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----3/5/2008 11:07:35 AM --()-- Vault Failed to establish a connection to the database.
----3/5/2008 11:07:35 AM --()-- The session information was not removed from the database. Please check sgvault.dbo.tblsessions within SQL Server. There may be orphaned sessions stored within the database. Error: FailDBConn
----3/5/2008 11:07:42 AM --PureTech38(10.0.0.2)--SSL Disabled Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----3/5/2008 11:07:42 AM --PureTech38(10.0.0.2)--SSL Disabled Vault Failed to establish a connection to the database.
----3/5/2008 11:08:05 AM admin--PureTech38(10.0.0.2)--SSL Disabled Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----3/5/2008 11:08:05 AM admin--PureTech38(10.0.0.2)--SSL Disabled Vault Failed to establish a connection to the database.
----3/5/2008 11:08:14 AM --PureTech38(10.0.0.2)--SSL Disabled Login failed: FailNotValidLogin
----3/5/2008 11:08:20 AM admin--PureTech38(10.0.0.2)--SSL Disabled Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----3/5/2008 11:08:20 AM admin--PureTech38(10.0.0.2)--SSL Disabled Vault Failed to establish a connection to the database.
----3/5/2008 11:08:23 AM admin--PureTech38(10.0.0.2)--SSL Disabled Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----3/5/2008 11:08:23 AM admin--PureTech38(10.0.0.2)--SSL Disabled Vault Failed to establish a connection to the database.
----3/5/2008 11:08:31 AM administrator--PureTech38(10.0.0.2)--SSL Disabled Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----3/5/2008 11:08:31 AM administrator--PureTech38(10.0.0.2)--SSL Disabled Vault Failed to establish a connection to the database.
----3/5/2008 11:08:34 AM administrator--PureTech38(10.0.0.2)--SSL Disabled Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----3/5/2008 11:08:34 AM administrator--PureTech38(10.0.0.2)--SSL Disabled Vault Failed to establish a connection to the database.
----3/5/2008 11:08:42 AM admin--PureTech38(10.0.0.2)--SSL Disabled Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----3/5/2008 11:08:42 AM admin--PureTech38(10.0.0.2)--SSL Disabled Vault Failed to establish a connection to the database.
----3/5/2008 11:13:41 AM --PureTech38(127.0.0.1)--SSL Disabled Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----3/5/2008 11:13:41 AM --PureTech38(127.0.0.1)--SSL Disabled Vault Failed to establish a connection to the database.
----3/5/2008 11:13:42 AM admin--PureTech38(127.0.0.1)--SSL Disabled Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----3/5/2008 11:13:42 AM admin--PureTech38(127.0.0.1)--SSL Disabled Vault Failed to establish a connection to the database.
----3/5/2008 11:22:52 AM admin--PureTech38(127.0.0.1)--SSL Disabled Could not load connect string. There is probably an error with the encrypted password for the sgvaultuser database user. Contact technical support at http://support.sourcegear.com
----3/5/2008 11:22:52 AM admin--PureTech38(127.0.0.1)--SSL Disabled Vault Failed to establish a connection to the database.



It is worth noting that my SQL Server configuration is not the default "localhost" configuration. It is PureTech38\LocalDB.

If I try connecting to "localhost" using the Vault Client I get the following error:

The Vault Server could not establish a connection to the database. Please check the server's log for detailed information. (FailDBConn)

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

L

Post by mskrobul » Wed Mar 05, 2008 1:15 pm

Did you verify the permissions on the MachineKeys directory?

%ALLUSERSPROFILE%\Application
Data\Microsoft\Crypto\RSA\MachineKeys?

NT Authority/Network Service needs read/write permissions to that directory in order to decrypt the password.

If that still doesn't work, you could try re-installing just encase one of the failures messed that up. You should use SQL authentication when you install if your database is on a different machine (it looks like you did choose SQL auth from your log file) - it makes things easier.

Or if you don't mind a plain text password in your web.config file you could use "PASSWORD=plain_text_pwd" instead of "pwd=PPPP" in the connect string.

so

<AppConfig>
<add key="ConnectString" value="Application Name='SourceGear Vault Server'; Connection Reset='true'; Server=PURETECH38\LOCALDB; Database=sgvault; User ID=sgvaultuser; pwd=PPPPPPPP">
</AppConfig>

would be:
<AppConfig>
<add key="ConnectString" value="Application Name='SourceGear Vault Server'; Connection Reset='true'; Server=PURETECH38\LOCALDB; Database=sgvault; User ID=sgvaultuser; PASSWORD=PPPPPPPP">
</AppConfig>
Mary Jo Skrobul
SourceGear

skaguy25
Posts: 4
Joined: Tue Mar 04, 2008 1:05 pm

Post by skaguy25 » Wed Mar 05, 2008 3:44 pm

I verified all permissions again and also tried a plain text password. Neither did the trick.

I finally reinstalled a couple times. The last time I just used windows authentication for SQL Server and that cleared up the problem. Everything seems to be working now.

It seems that the install package could use a bit more testing. However, the support has been excellent. Thank you for your help.

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Wed Mar 05, 2008 4:02 pm

Thanks for the update. Glad you got it working:-)

I really am not sure why Windows Auth worked but SQL didn't (not having SQL auth enabled in SQL server it could cause that, but the installer would have bombed in that case).

We are working on a 64-bit server and installer which should make installing on 64-bit Windows much less painful.
Mary Jo Skrobul
SourceGear

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Wed Mar 05, 2008 5:02 pm

Another user just reported your database connection problem. It is all our fault :oops:

http://support.sourcegear.com/viewtopic.php?p=39625
Mary Jo Skrobul
SourceGear

Post Reply