remember login returns exception

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

Moderator: SourceGear

Post Reply
jp1982
Posts: 28
Joined: Fri Aug 27, 2010 3:23 pm

remember login returns exception

Post by jp1982 » Thu Jul 21, 2011 5:24 pm

Hello Vault team! I am running client/server version 3.1.9.3798

So far my app has been running successfully. But sometimes I get the following error:

<vault>
<error>
The connection to the server failed: server cannot be contacted or uses a protocol
that is not supported by this client. Unable to connect to http://MYPATH/VaultService.
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 operation has timed-out.
</error>
<exception>
System.Exception: The connection to the server failed: server cannot be contacted or uses a protocol that is not supported
by this client. Unable to connect to http://MYPATH/VaultService. 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 operation has timed-out.
at VaultCmdLineClient.VaultCmdLineClient.Login(Boolean bAllowAuto, Boolean bSaveSession)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)
</exception>
<result success="no" />
</vault>

The way I am running my cmd line is exactly the same as this old topic of mine http://support.sourcegear.com/viewtopic.php?f=5&t=15533

Any ideas on what could be wrong or why its failing? If I run the app again it usually works just fine.

PS. I was thinking instead of doing a remember login, add the credentials and host info on each command I am running. That is the only thing I can think of.

Thanks for the help

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

Re: remember login returns exception

Post by Beth » Fri Jul 22, 2011 7:41 am

Do you have a script that runs multiple times at once with the same login? For example, often user's build systems have 1 user that will try to perform 10 builds at once on the same machine under the same user.

If not, then can you tell me how your 3.1.9 script is used?
Beth Kieler
SourceGear Technical Support

jp1982
Posts: 28
Joined: Fri Aug 27, 2010 3:23 pm

Re: remember login returns exception

Post by jp1982 » Fri Jul 22, 2011 4:08 pm

Beth wrote:Do you have a script that runs multiple times at once with the same login? For example, often user's build systems have 1 user that will try to perform 10 builds at once on the same machine under the same user.

If not, then can you tell me how your 3.1.9 script is used?
Yesterday, I ran 2 scripts with the same credentials on the same computer. I thought that was possible the cause but I've seen this happened in the past also with only one instance running so I was not 100% certain that might be the issue. On other occasions, when I am running a getversion I get the message that I need to specify host, password, user even though I do a rememberlogin at the beginning. Don't know if they might be linked.

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

Re: remember login returns exception

Post by Beth » Fri Jul 22, 2011 4:18 pm

Nothing you've mentioned so far should be a problem as far as I can tell.

What might help is if you can place your Vault Server Log into debug mode, then send me the full log the next time the issue happens. You can send the logl to support at sourcegear.com (attn: Beth) with a link to this forum thread.
Beth Kieler
SourceGear Technical Support

jp1982
Posts: 28
Joined: Fri Aug 27, 2010 3:23 pm

Re: remember login returns exception

Post by jp1982 » Mon Jul 25, 2011 10:18 am

I will give that a try.

I've looked at the current logs (no debug mode) and it seems like the conx stops working for some reason.

----7/14/2011 6:39:01 PM myUser--myServer--SSL Disabled Login
----7/14/2011 6:39:05 PM myUser--myServer--SSL Disabled Logout
----7/14/2011 6:39:07 PM myUser--myServer--SSL Disabled Login
----7/14/2011 6:39:21 PM myUser--myServer--SSL Disabled Exception in plugin thread : The request failed with HTTP status 503: Service Unavailable.
----7/14/2011 6:39:21 PM myUser--myServer--SSL Disabled Logout

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

Re: remember login returns exception

Post by Beth » Mon Jul 25, 2011 10:46 am

Do you have the AppPools set to automatically recycle based on any events? That can cause the IIS service to appear to go down.

In your IIS Manager, expand the Application Pools, then right-click the VaultAppPool and select Properties. Can you tell me your settings for the VaultAppPool on the first 2 tabs of Properties?
Beth Kieler
SourceGear Technical Support

jp1982
Posts: 28
Joined: Fri Aug 27, 2010 3:23 pm

Re: remember login returns exception

Post by jp1982 » Mon Jul 25, 2011 12:30 pm

for the 1st tab the only box checked is "recycle worker process at following times" and time is set to 02:22.

for the 2nd tab, the only box checked is "limit kernel request queue" and it is set to 1000. Max number of working processes is set to 1.

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

Re: remember login returns exception

Post by Beth » Mon Jul 25, 2011 12:38 pm

for the 1st tab the only box checked is "recycle worker process at following times" and time is set to 02:22.
Turn this off entirely. Even if the issue doesn't occur at that exact time, let's get that setting out of the mix to make sure it's not influencing what's happening.

After that, can you look in your Event Viewer logs around the time of 7/14/2011 6:39:21 PM and see if there are any errors before, during, or after that time? If you see any, please post them or send them to support.

Also, please take a look at your IIS log around that same time. Anything that has a status other than 200 is an error. Can you either post or send the part of the IIS log around the time of 7/14/2011 6:39:21 PM?
Beth Kieler
SourceGear Technical Support

jp1982
Posts: 28
Joined: Fri Aug 27, 2010 3:23 pm

Re: remember login returns exception

Post by jp1982 » Mon Jul 25, 2011 2:06 pm

this is what the event viewer as around that time.

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 7/14/2011 6:39:05 PM
Event time (UTC): 7/15/2011 1:39:05 AM
Event ID: 8a99ca6fbd954adabc21957d1c430bb7
Event sequence: 4006
Event occurrence: 48
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/Root/VaultService-1-129550915614843750
Trust level: Full
Application Virtual Path: /VaultService
Application Path: drive:\VaultService\
Machine name: myMachineName

Process information:
Process ID: 3268
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.

Request information:
Request URL:
Request path:
User host address:
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 1
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at VaultServiceAPILib.VaultServiceAPISystem.GetOpenSqlConn(HttpApplicationState has, VaultLoginInfo vli, VaultSqlConn& conn)
at VaultServiceAPILib.VaultServiceAPI.Logout(HttpApplicationState has, HttpSessionState hss)
at VaultService.Global.Session_End(Object sender, EventArgs e)


Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


I've also uploaded a text file where I include the entries on the log 5 mins before and 5 mins after that time. I replaced the IP's for obvious reasons :wink:
Attachments
IIS log.txt
Log here
(6.28 KiB) Downloaded 375 times

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

Re: remember login returns exception

Post by Beth » Mon Jul 25, 2011 3:30 pm

The Event Viewer error is a benign error that was fixed in Vault 3.5.x (http://support.sourcegear.com/viewtopic ... 44&start=0).

On the 500 errors, are those on the script you are running?

Do you experience any of these issues with the Vault GUI client? If not, then I think it might be worthwhile to not using rememberlogin and put in the connection information into your script.

I think you might have more than one issue going on, so it would be good to rule out as many things as possible.
Beth Kieler
SourceGear Technical Support

jp1982
Posts: 28
Joined: Fri Aug 27, 2010 3:23 pm

Re: remember login returns exception

Post by jp1982 » Tue Jul 26, 2011 12:23 pm

On the 500 errors, are those on the script you are running? --> not quite sure what these 500 errors mean. I only get the one on the initial post and sometimes the one that mentions to specify host user and password same as this post http://support.sourcegear.com/viewtopic.php?f=5&t=16068

Do you experience any of these issues with the Vault GUI client? If not, then I think it might be worthwhile to not using rememberlogin and put in the connection information into your script. --> It only happens on my script. GUI client sometimes returns the same message but that is because of the IE sometimes enables the automatic config script which makes it loose connection with the server. Removing it on my local gets rid of the error but my script runs on a server where that option is disabled and always stays the same.

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

Re: remember login returns exception

Post by Beth » Tue Aug 02, 2011 12:34 pm

Will you be able to try the script without rememberlogin?
Beth Kieler
SourceGear Technical Support

jp1982
Posts: 28
Joined: Fri Aug 27, 2010 3:23 pm

Re: remember login returns exception

Post by jp1982 » Tue Aug 16, 2011 5:00 pm

Beth wrote:Will you be able to try the script without rememberlogin?
that is definitely a change I was thinking on doing. Once I get some time to return back to this app I will touch base with you and let you know how it does. So far I have not seen the error so I guess it is somehow working now maybe? Thanks for your help!

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

Re: remember login returns exception

Post by Beth » Fri Aug 19, 2011 8:29 am

Thank you for the update.
Beth Kieler
SourceGear Technical Support

Post Reply