Fresh install - Cannot logon to admins ite

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

Moderator: SourceGear

Post Reply
thx1200
Posts: 6
Joined: Wed Sep 03, 2008 7:30 pm

Fresh install - Cannot logon to admins ite

Post by thx1200 » Sat Nov 29, 2008 6:53 pm

I've been using Vault for a while (single user mode). My old server died, so I had to reinstall everything from scratch. This server is brand new. I installed SQL, reattached the old vault database, and installed vault server. It detected the older db version, upgraded it (no errors), then proceeded with the rest of the installation. After the MSI installer finished, it opened the browser and I got a 401.3 (access denied) error. Odd. I ran SysInternal's ProcMon and, even more oddly, it found no access denied errors during registry or file operations even after an IISReset before hitting the admin site again. On a hunch, I changed the anonymous account to the impersonation account (domain\AppVault instead of server\IUSR_SERVER) and made sure AppVault was in the IIS_WPG. The admin page came up fine.

But this isn't the end of my problems. Now, I can't log on. It just won't accept my admin password. To make sure I wasn't instane, I typed out the admin password in notepad after uninstalling and reinstalling vault, and copy-pasted it into the vault installer and then into the logon prompt. (to make sure it is exactly the same). This does not work! It always says the username/password is invalid. I'm using "admin" as the username, but it never asked me for a username, so I'm just guessing. My previous installation used "admin."

The vault log says...


----11/29/2008 7:54:45 PM admin--server.domain.com(127.0.0.1)--SSL Disabled Rolling Back a transaction at VaultServiceSQL.VaultSqlConn.RollbackTransaction()
at VaultServiceAPILib.VaultServiceAPI.Login(VaultSqlConn conn, Boolean allowwebonly, String strLogin, String strDecryptedPassword, String strHostname, String strSessionID, String strDomain, String& strToken, VaultUser& vu, Int32& nValidUserAttempts)
at VaultServiceAPILib.VaultServiceAPISystem.DoLogin(Boolean allowwebonlyusers, Boolean bAdminLogin, HttpSessionState hss, String strHostname, String strLogin, String strPassword, String strRMKey, String& strAuthToken, String strDomain)
at VaultServiceAPILib.VaultServiceAPISystem.DoLogin(Boolean allowwebonlyusers, Boolean bAdminLogin, HttpSessionState hss, String strHostname, String strLogin, String strPassword, String strRMKey, String& strAuthToken)
at VaultService.VaultWeb.Login.DoLoginStuff(String strLogin, String strPassword, LoginToken lt)
at VaultService.VaultWeb.Login.ButtonLogin_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.vaultweb_login_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)

----11/29/2008 7:54:45 PM admin--server.domain.com(127.0.0.1)--SSL Disabled Login failed: FailNotValidLogin


(the domain and computer name has been sanatized from the above log entries.)

I dug into the sgmaster database, not sure if the cause is there, and i noticed the users table has no entries.

SELECT * FROM [sgmaster].[dbo].[users] gives me "(0 row(s) affected)"

Is that normal or am i barking up the wrong tree?

I've never had problems installing or upgrading vault before, so this is a surprise.

Again, the server is vanilla since it's just been reinstalled. It only has a bare IIS install and SQL 2008. Nothing else is on there. It's fresh out of the box, otherwise.

OS: Windows Server 2003 R2, SP2
SQL: SQL Server 2008 Enterprise Edition (MSDN)
Vault Installer: VaultServer_4_1_4_18402.msi

thx1200
Posts: 6
Joined: Wed Sep 03, 2008 7:30 pm

Re: Fresh install - Cannot logon to admins ite

Post by thx1200 » Sat Nov 29, 2008 7:20 pm

I ran SQL Profiler to try to figure out what Vault is doing and I found this line, which may be the culprit...

declare @p4 int
set @p4=0
exec [sgmaster].dbo.spgetlogininfo @login=N'admin',@hostname=N'REMOVED',@sessionid=N'REMOVED',@attempts=@p4 output
select @p4

(Note that some possibly sensitive values were removed)

When I ran the exact same command from within management studio's query window, I saw this...
The 'spgetlogininfo' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.
(1 row(s) affected)

thx1200
Posts: 6
Joined: Wed Sep 03, 2008 7:30 pm

Re: Fresh install - Cannot logon to admins ite

Post by thx1200 » Sat Nov 29, 2008 10:13 pm

It appears my sgmaster DB was corrupted somehow. I did a completely blank install without attaching any of the previous databases. It worked. Then I detached the sgvault and attached the old (but upgraded) sgvault. Everything was back to normal.

Weird.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Fresh install - Cannot logon to admins ite

Post by Beth » Mon Dec 01, 2008 10:18 am

When something like what you saw happens, I have the user start over, but remove the login from the sgvault and sgmaster databases that Vault is using. If you installed with SQL authentication, then the user to remove would be sgvaultuser. If you used Windows, then it depends on the IIS process model as to what user is in SQL. Then I have the user install Vault and it will recreate the logins to SQL.

On the route you took, are all your logins working? Usually, putting the database in second results in no one but admin being able to log in.
Beth Kieler
SourceGear Technical Support

Post Reply