Sample waffle-negotiate: 404 Not Found

Oct 12, 2010 at 8:30 AM

Hello,

as I wrote in discussion 'Negotiate delivers "404 not found"', the sample "waffle-negotiate" delivers an 404 error in my test setup. I re-checked the browser settings as dblock suggested and to my eyes, it all seems in order.

This is the output from ieHTTPHeaders:

GET /waffle-negotiate HTTP/1.1
Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, */*
Referer: http://localhost:8080/manager/html
Accept-Language: de
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Accept-Encoding: gzip, deflate
Host: localhost:8080
Connection: Keep-Alive

HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Location: http://localhost:8080/waffle-negotiate/
Transfer-Encoding: chunked
Date: Tue, 12 Oct 2010 08:19:02 GMT

GET /waffle-negotiate/ HTTP/1.1
Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, */*
Referer: http://localhost:8080/manager/html
Accept-Language: de
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Accept-Encoding: gzip, deflate
Host: localhost:8080
Connection: Keep-Alive

HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 01:00:00 CET
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
Connection: close
Transfer-Encoding: chunked
Date: Tue, 12 Oct 2010 08:19:02 GMT

 

And here again an excerpt from catalina.log:

12.10.2010 10:16:25 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
12.10.2010 10:16:25 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
12.10.2010 10:16:26 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
12.10.2010 10:16:26 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
12.10.2010 10:16:26 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2474 ms
12.10.2010 10:16:27 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
12.10.2010 10:16:27 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
12.10.2010 10:16:27 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
12.10.2010 10:16:28 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
12.10.2010 10:16:28 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor waffle-negotiate.xml
12.10.2010 10:16:28 waffle.apache.NegotiateAuthenticator <init>
FEIN: [waffle.apache.NegotiateAuthenticator] loaded
12.10.2010 10:16:28 waffle.apache.WaffleAuthenticatorBase setPrincipalFormat
FEIN: principal format: fqn
12.10.2010 10:16:28 waffle.apache.WaffleAuthenticatorBase setRoleFormat
FEIN: role format: both
12.10.2010 10:16:28 waffle.apache.NegotiateAuthenticator start
INFO: [waffle.apache.NegotiateAuthenticator] started
12.10.2010 10:16:28 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
12.10.2010 10:16:28 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
12.10.2010 10:16:29 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
12.10.2010 10:16:29 org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
12.10.2010 10:16:29 org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
12.10.2010 10:16:29 org.apache.catalina.startup.Catalina start
INFO: Server startup in 3013 ms
12.10.2010 10:17:28 waffle.apache.NegotiateAuthenticator authenticate
FEIN: GET /waffle-negotiate/, contentlength: -1
12.10.2010 10:17:28 waffle.apache.NegotiateAuthenticator authenticate
FEIN: authorization: <none>, ntlm post: false
12.10.2010 10:17:28 waffle.apache.NegotiateAuthenticator authenticate
FEIN: authorization required
12.10.2010 10:19:02 waffle.apache.NegotiateAuthenticator authenticate
FEIN: GET /waffle-negotiate/, contentlength: -1
12.10.2010 10:19:02 waffle.apache.NegotiateAuthenticator authenticate
FEIN: authorization: <none>, ntlm post: false
12.10.2010 10:19:02 waffle.apache.NegotiateAuthenticator authenticate
FEIN: authorization required

 

Thank you for your help,

Oliver

Coordinator
Oct 12, 2010 at 11:10 AM

I figured it out. It's really silly. The 1.3 distribution is definining an error page in the waffle-negotiate/WEB-INF/web.xml.

<error-page>
  <error-code>401</error-code> 
  <location>/401.html</location> 
</error-page>

But the page is missing from the distribution package, so Tomcat is returning 404 (file not found). Place a 401.html into the waffle-negotiate folder or remove this entry to workaround the problem. The 1.4 distribution has this fixed.

Oct 12, 2010 at 11:54 AM

Ah. Yes, that did it.

Thanks again!