Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After a first redirect loop, only a restart can put the system back #22

Open
cmazzon-rassystem opened this issue Feb 24, 2015 · 3 comments

Comments

@cmazzon-rassystem
Copy link

From my browser:

GET https://id.rassystem.com.br/cas/login?service=http%3a%2f%2frascol.rassystem.com.br%2f net::ERR_TOO_MANY_REDIRECTS
Request URL:https://id.rassystem.com.br/cas/login?service=http%3a%2f%2frascol.rassystem.com.br%2f
Request Headers
Provisional headers are shown
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36
Query String Parametersview sourceview URL encoded
service:http://rascol.rassystem.com.br/

Problem begins after a new application deployment, but not every application deployment. Sometimes it happens even without any environment change. A spottable difference on logs is a protocol message:

Invalid request - pgtId parameter not found

After a restart, all work fine again.

My configuration log messages follow:

DotNetCasClient.Config Information 3237 casServerUrlPrefix = https://id.rassystem.com.br/cas/
DotNetCasClient.Config Information 3237 casServerLoginUrl = https://id.rassystem.com.br/cas/login
DotNetCasClient.Config Information 3237 ticketValidatorName = Cas20
DotNetCasClient.Config Information 3237 ticketTimeTolerance = 1000
DotNetCasClient.Config Information 3237 serverName = http://rascol.rassystem.com.br/
DotNetCasClient.Config Information 3237 renew = False
DotNetCasClient.Config Information 3237 gateway = False
DotNetCasClient.Config Information 3237 gatewayStatusCookieName = cas_gateway_status
DotNetCasClient.Config Information 3237 redirectAfterValidation = True
DotNetCasClient.Config Information 3237 singleSignOut = True
DotNetCasClient.Config Information 3237 serviceTicketManagerProvider = CacheServiceTicketManager
DotNetCasClient.Config Information 3237 proxyTicketManagerProvider = CacheProxyTicketManager
DotNetCasClient.Config Information 3237 notAuthorizedUrl = ~/NotAuthorized.aspx
DotNetCasClient.Config Information 3237 cookiesRequiredUrl = ~/CookiesRequired.aspx
DotNetCasClient.Config Information 3237 gatewayParameterName = gatewayResponse
DotNetCasClient.Config Information 3237 proxyCallbackParameterName = proxyResponse
DotNetCasClient.Config Information 3237 proxyCallbackUrl =
DotNetCasClient.Config Information 3237 requireCasForMissingContentTypes = True
DotNetCasClient.Config Information 3237 requireCasForContentTypes = System.String[]
DotNetCasClient.Config Information 3237 bypassCasForHandlers = System.String[]


A sample working request log:


DotNetCasClient.HttpModule Information 3237 Redirecting to CAS Login Page
DotNetCasClient.Protocol Information 3237 Redirecting to https://id.rassystem.com.br/cas/login?service=http%3a%2f%2frascol.rassystem.com.br%2fGeomapas%2fMapaPrincipal.aspx%3fproxyResponse%3dtrue%2chttp%3a%2f%2frascol.rassystem.com.br%2fScriptResource.axd%3fd%3d6SlcmXaK98kXPeZwLxBZEkXUfsvw3bUQl3AaTHOBR79--1nutzpvds36JdBnHM7MQby_YqGVVSw1SKnzPwTG6-f1nZdn-DhRuG4sK2V0Si4YeMhJoBzrRyvfqqqu1zqfDPwv1zPtNHEHsaQvjXzv_UuH9UXBYeNiJGLNuHT8NJj2JlR5jnRfg8i7R_5MqvnQ0%26proxyResponse%3dtrue%26t%3d7e632e9f
DotNetCasClient.HttpModule Information 3237 Redirecting to CAS Login Page
DotNetCasClient.Protocol Information 3237 Redirecting to https://id.rassystem.com.br/cas/login?service=http%3a%2f%2frascol.rassystem.com.br%2fGeomapas%2fMapaPrincipal.aspx%3fproxyResponse%3dtrue%2chttp%3a%2f%2frascol.rassystem.com.br%2fScriptResource.axd%3fd%3d6SlcmXaK98kXPeZwLxBZEkXUfsvw3bUQl3AaTHOBR79--1nutzpvds36JdBnHM7MQby_YqGVVSw1SKnzPwTG6-f1nZdn-DhRuG4sK2V0Si4YeMhJoBzrRyvfqqqu1zqfDPwv1zPtNHEHsaQvjXzv_UuH9UXBYeNiJGLNuHT8NJj2JlR5jnRfg8i7R_5MqvnQ0%26proxyResponse%3dtrue%26t%3d7e632e9f%26pgtIou%3dPGTIOU-593342-QQeoDrfuVQkUeBbFUP3Y-cas%26pgtId%3dTGT-653161-vVrwYCWwZqbhG0XamaNj3NtccQ3b2A1I5qo7p2mIvmdW4JBuVM-cas
DotNetCasClient.Protocol Verbose 3237 Ticket validation response:

<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
cas:authenticationSuccess
cas:userxxxxxxxxx/cas:user

    <cas:proxyGrantingTicket>PGTIOU-593342-QQeoDrfuVQkUeBbFUP3Y-cas</cas:proxyGrantingTicket>


</cas:authenticationSuccess>

/cas:serviceResponse
DotNetCasClient.HttpModule Information 3237 Redirecting from login callback
DotNetCasClient.HttpModule Information 3237 Processing Proxy Callback request
DotNetCasClient.Protocol Verbose 3237 Constructed validation URL https://id.rassystem.com.br/cas/proxyValidate?service=http%3a%2f%2frascol.rassystem.com.br%2fGeomapas%2fMapaPrincipal.aspx&ticket=ST-603858-9EGOnDQuLNuYaXoc9Dyq-cas&pgtUrl=http%3a%2f%2frascol.rassystem.com.br%2fGeomapas%2fMapaPrincipal.aspx%3fproxyResponse%3dtrue,http%3a%2f%2frascol.rassystem.com.br%2fScriptResource.axd%3fd%3d6SlcmXaK98kXPeZwLxBZEkXUfsvw3bUQl3AaTHOBR79--1nutzpvds36JdBnHM7MQby_YqGVVSw1SKnzPwTG6-f1nZdn-DhRuG4sK2V0Si4YeMhJoBzrRyvfqqqu1zqfDPwv1zPtNHEHsaQvjXzv_UuH9UXBYeNiJGLNuHT8NJj2JlR5jnRfg8i7R_5MqvnQ0%26t%3d7e632e9f%26proxyResponse%3dtrue


A redirect loop request log:


DotNetCasClient.HttpModule Information 3237 Processing Proxy Callback request
DotNetCasClient.Protocol Information 3237 Invalid request - pgtId parameter not found
DotNetCasClient.HttpModule Information 3237 Redirecting to CAS Login Page
DotNetCasClient.Protocol Information 3237 Redirecting to https://id.rassystem.com.br/cas/login?service=http%3a%2f%2frascol.rassystem.com.br%2fOperacoes%2fRelatorioDiarioLista.aspx%3fproxyResponse%3dtrue
DotNetCasClient.HttpModule Information 3237 Redirecting to CAS Login Page
DotNetCasClient.Protocol Information 3237 Redirecting to https://id.rassystem.com.br/cas/login?service=http%3a%2f%2frascol.rassystem.com.br%2f
DotNetCasClient.HttpModule Information 3237 Processing Proxy Callback request
DotNetCasClient.Protocol Information 3237 Recieved proxyGrantingTicketId [TGT-653386-6kAVTNNogkkaFNx6ufzPug4wn1kdXwImFtSsKJD6YEfrjTOFxT-cas] for proxyGrantingTicketIou [PGTIOU-593563-dpvB1RjJadBG2VSgvzdJ-cas]
DotNetCasClient.Protocol Verbose 3237 Ticket validation response:

<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
cas:authenticationSuccess
cas:userxxxxxxxx/cas:user

    <cas:proxyGrantingTicket>PGTIOU-593563-dpvB1RjJadBG2VSgvzdJ-cas</cas:proxyGrantingTicket>


</cas:authenticationSuccess>

/cas:serviceResponse
DotNetCasClient.Protocol Verbose 3237 Creating FormsAuthenticationTicket for ST-604084-CSETWsdpYwNC96FWG5fl-cas
DotNetCasClient.HttpModule Information 3237 Redirecting from login callback
DotNetCasClient.HttpModule Information 3237 Processing Proxy Callback request
DotNetCasClient.Protocol Verbose 3237 Constructed validation URL https://id.rassystem.com.br/cas/proxyValidate?service=http%3a%2f%2frascol.rassystem.com.br%2f&ticket=ST-604087-t4XGhFu4S14k42EjpfSJ-cas&pgtUrl=http%3a%2f%2frascol.rassystem.com.br%2fOperacoes%2fRelatorioDiarioLista.aspx%3fproxyResponse%3dtrue
DotNetCasClient.HttpModule Information 3237 Processing Proxy Callback request
DotNetCasClient.Protocol Information 3237 Invalid request - pgtId parameter not found
DotNetCasClient.HttpModule Information 3237 Redirecting to CAS Login Page
DotNetCasClient.Protocol Information 3237 Redirecting to https://id.rassystem.com.br/cas/login?service=http%3a%2f%2frascol.rassystem.com.br%2fOperacoes%2fRelatorioDiarioLista.aspx%3fproxyResponse%3dtrue
DotNetCasClient.HttpModule Information 3237 Processing Proxy Callback request
DotNetCasClient.Protocol Information 3237 Recieved proxyGrantingTicketId [TGT-653387-dF2GUNOxKenJJqvHUdzEbNbLZsAGdRzNuuW31RnqnC1kjtV3Cm-cas] for proxyGrantingTicketIou [PGTIOU-593564-LdMoQ7dF3XwuNXvdHkUU-cas]
DotNetCasClient.Protocol Verbose 3237 Ticket validation response:

<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
cas:authenticationSuccess
cas:userxxxxxxxx/cas:user

    <cas:proxyGrantingTicket>PGTIOU-593564-LdMoQ7dF3XwuNXvdHkUU-cas</cas:proxyGrantingTicket>


</cas:authenticationSuccess>

/cas:serviceResponse
DotNetCasClient.Protocol Verbose 3237 Creating FormsAuthenticationTicket for ST-604087-t4XGhFu4S14k42EjpfSJ-cas
DotNetCasClient.HttpModule Information 3237 Redirecting from login callback
DotNetCasClient.HttpModule Information 3237 Redirecting to CAS Login Page
DotNetCasClient.Protocol Information 3237 Redirecting to https://id.rassystem.com.br/cas/login?service=http%3a%2f%2frascol.rassystem.com.br%2f
DotNetCasClient.HttpModule Information 3237 Redirecting to CAS Login Page
DotNetCasClient.Protocol Information 3237 Redirecting to https://id.rassystem.com.br/cas/login?service=http%3a%2f%2frascol.rassystem.com.br%2f
DotNetCasClient.HttpModule Information 3237 Processing Proxy Callback request
DotNetCasClient.Protocol Verbose 3237 Constructed validation URL https://id.rassystem.com.br/cas/proxyValidate?service=http%3a%2f%2frascol.rassystem.com.br%2f&ticket=ST-604082-k1Jq9WqZKqMbFVxIUA9O-cas&pgtUrl=http%3a%2f%2frascol.rassystem.com.br%2fOperacoes%2fRelatorioDiarioLista.aspx%3fproxyResponse%3dtrue

@joshuakent
Copy link

I am having the same issue, it only seems to be affecting one application on our server. It is using the latest version of the client so we tried to roll it back to see if that would resolve the issue but it just happened again. Anyone had any luck tracing down what causes this issue? As soon as I restart the app it works fine for several days before breaking again.

@wilsonson
Copy link
Contributor

I have got the same issue on my project, can't find what's really wrong with the configuration. The problem can be solved temporally by restarting the application pool.

@ghost
Copy link

ghost commented Jul 15, 2015

Recently had this issue with version client version 1.0.1. Restarting the system solved the problem. We have used the dotnet-cas-client since 2014 December without any CAS issues until last week, 2015 July. Non-dotnet clients seem unaffected.

My apache log4 spit out several of these, which I never saw until preceding and during the error. These events in the log have very little information to point to where they come from, though I do notice cmazzon-rassystem's output mentions pgtUrl as a querystring parameter.

Item has already been added. Key in dictionary: 'pgtUrl'  Key being added: 'pgtUrl'
Value cannot be null. Parameter name: key Line 1, position 186.
Value cannot be null. Parameter name: key Line 1, position 22.
Value cannot be null. Parameter name: value

UPDATE: Using Cas20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants