10-27-2009 05:28 PM
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: org.alfresco.web.site.exception.RequestContextException: Exception running UserFactory in HttpRequestContextFactory
org.alfresco.web.site.servlet.DispatcherServlet.service(DispatcherServlet.java:146)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
org.alfresco.web.site.exception.RequestContextException: Exception running UserFactory in HttpRequestContextFactory
org.alfresco.web.site.DefaultRequestContextFactory.newInstance(DefaultRequestContextFactory.java:117)
org.alfresco.web.site.FrameworkHelper.initRequestContext(FrameworkHelper.java:202)
org.alfresco.web.site.servlet.DispatcherServlet.service(DispatcherServlet.java:142)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
org.alfresco.web.site.exception.UserFactoryException: Unable to retrieve user from repository
org.alfresco.web.site.AlfrescoUserFactory.loadUser(AlfrescoUserFactory.java:252)
org.alfresco.web.site.UserFactory.faultUser(UserFactory.java:176)
org.alfresco.web.site.UserFactory.faultUser(UserFactory.java:110)
org.alfresco.web.site.DefaultRequestContextFactory.newInstance(DefaultRequestContextFactory.java:93)
org.alfresco.web.site.FrameworkHelper.initRequestContext(FrameworkHelper.java:202)
org.alfresco.web.site.servlet.DispatcherServlet.service(DispatcherServlet.java:142)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.json.JSONException: A JSONObject text must begin with '{' at character 1 of <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>…..</html>
org.json.JSONTokener.syntaxError(Unknown Source)
org.json.JSONObject.<init>(Unknown Source)
org.json.JSONObject.<init>(Unknown Source)
org.alfresco.web.site.AlfrescoUserFactory.loadUser(AlfrescoUserFactory.java:165)
org.alfresco.web.site.UserFactory.faultUser(UserFactory.java:176)
org.alfresco.web.site.UserFactory.faultUser(UserFactory.java:110)
org.alfresco.web.site.DefaultRequestContextFactory.newInstance(DefaultRequestContextFactory.java:93)
org.alfresco.web.site.FrameworkHelper.initRequestContext(FrameworkHelper.java:202)
org.alfresco.web.site.servlet.DispatcherServlet.service(DispatcherServlet.java:142)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
<alfresco-config>
<!– Overriding endpoints to reference a remote Alfresco server –>
<!–
<config evaluator="string-compare" condition="Remote">
<remote>
<endpoint>
<id>alfresco-noauth</id>
<name>Alfresco - unauthenticated access</name>
<description>Access to Alfresco Repository WebScripts that do not require authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://yourserver:8080/alfresco/s</endpoint-url>
<identity>none</identity>
</endpoint>
<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://yourserver:8080/alfresco/s</endpoint-url>
<identity>user</identity>
</endpoint>
<endpoint>
<id>alfresco-feed</id>
<name>Alfresco Feed</name>
<description>Alfresco Feed - supports basic HTTP authentication</description>
<connector-id>http</connector-id>
<endpoint-url>http://yourserver:8080/alfresco/s</endpoint-url>
<basic-auth>true</basic-auth>
<identity>user</identity>
</endpoint>
</remote>
</config>
–>
<!– Overriding endpoints to reference an Alfresco server with external SSO or NTLM enabled –>
<!– NOTE: For NTLM, the NTLM Authentication Filter must also be enabled in share web.xml –>
<!– NOTE: if utilising a load balancer between web-tier and repository cluster, the "sticky –>
<!– sessions" feature of your load balancer must be used –>
<config evaluator="string-compare" condition="Remote" replace="true">
<remote>
<!– SSL client certificate + trusted CAs. Optionally used to authenticate share to an external SSO system such as CAS –>
<keystore>
<path>/opt/Alfresco/tomcat/shared/classes/alfresco/web-extension/alfresco-system.p12</path>
<type>pkcs12</type>
<password>alfresco</password>
</keystore>
<connector>
<id>alfrescoCookie</id>
<name>Alfresco Connector</name>
<description>Connects to an Alfresco instance using cookie-based authentication</description>
<class>org.alfresco.connector.AlfrescoConnector</class>
</connector>
<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfrescoCookie</connector-id>
<endpoint-url>http://<hostname removed>/alfresco/wcs</endpoint-url>
<identity>user</identity>
<external-auth>true</external-auth>
</endpoint>
</remote>
</config>
</alfresco-config>
11-04-2009 09:54 AM
Matthias, I wonder how you got your Share to send out the certificate. It seems (based on my logs) that I'm actually failing the X509CredentialsAuthenticationHandler in login-webflow and going on to the viewLoginForm action. But can't understand why. Do you have any suggestions? Did you have this problem before and solve the certificate handling somehow? Thanks much for any help.
11-04-2009 10:37 AM
Do you feel up to adding some additional logging to
org.alfresco.connector.RemoteClient.service(URL, InputStream, OutputStream, HttpServletRequest, HttpServletResponse, ResponseStatus)
?
If we could see what URLs are being called, what redirects are happening, what cookies are being returned and what status codes are being received, we might be able to work out what's going wrong!
16:25:37,223 DEBUG [org.alfresco.connector.RemoteClient] Executing (GET) https://app01.company.de/alfresco/wcs/webframework/content/metadata?user=matthias.name%40company.de
16:25:37,225 DEBUG [org.alfresco.connector.RemoteClient] - OutputStream supplied - will stream response…
16:25:37,305 DEBUG [org.alfresco.connector.RemoteClient] Setting cookie header: MOD_AUTH_CAS_S=b5d6a2524928d27bd5ade0bed30742e6;CASTGC=TGT-25-7CNalUs5KSroXN3zXgWPcN0DchY0CSttWwqx3Wk4uniP05ZVsE-app01.company.de
16:25:37,502 DEBUG [org.alfresco.connector.RemoteClient] Response status code: 401
16:25:37,502 DEBUG [org.alfresco.connector.RemoteClient] Response encoding: Content-Type: text/html; charset=iso-8859-1
11-04-2009 10:53 AM
SSLCertificateFile /etc/ssl/certs/localhost.crt
SSLCertificateKeyFile /etc/ssl/private/localhost.pem
In mod-enabled/ssl.conf, I added the JkMount /cas .. stuff, but also had to add JkMountCopy On:
JkMountCopy On
JkMount /cas casnode
JkMount /cas/* casnode
JkMount /examples casnode
JkMount /examples/* casnode
SSLVerifyClient optional
SSLCACertificateFile /etc/ssl/certs/cacert.pem
SSLOptions +StdEnvVars + ExportCertData
<Connector port="8444" protocol="HTTP/1.1" SSLEnabled="true"
maxHttpHeaderSize="8192" minSpareThreads="25" maxSpareThreads="75"
maxThreads="150" scheme="https" secure="true"
sslProtocol="TLS" connectionTimeout="20000"
clientauth="true"
keystoreFile="/etc/ssl/alfresco-system.p12"
keystoreType="PKCS12" keystorePass="password"
truststoreFile="/etc/ssl/alfresco-system.p12"
truststorePass="password" truststoreType="PKCS12"
/>
keytool –import -alias alfresco-system -keystore /etc/ssl/keystore -file /etc/ssl/certs/cacert.pem
But this caused jsse.invalid_ssl_conf and "no available certifice or key corresponds to the ssl cipher suites which are enabled" during startup of casserver.11-04-2009 11:31 AM
11-04-2009 12:32 PM
SEVERE: Failed to load keystore type JKS with path /root/.keystore due to /root/.keystore (No such file or directory)java.io.FileNotFoundException: /root/.keystore (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:341)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:263)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:473)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:413)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:129)
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:503)
at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:526)
at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203)
at org.apache.catalina.connector.Connector.start(Connector.java:1131)
at org.apache.catalina.core.StandardService.start(StandardService.java:531)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Nov 4, 2009 12:28:14 PM org.apache.coyote.http11.Http11Protocol start
SEVERE: Error starting endpoint
java.io.FileNotFoundException: /root/.keystore (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:341)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:263)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:473)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:413)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:129)
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:503)
at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:526)
at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203)
at org.apache.catalina.connector.Connector.start(Connector.java:1131)
at org.apache.catalina.core.StandardService.start(StandardService.java:531)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
11-04-2009 12:39 PM
11-04-2009 01:23 PM
Not Found
the requested URL /cas/login was not found on this server
The only way to get this to work is to add JkMountCopy On in my default-ssl virtualhost. Adding this to my ssl.conf also does not work.11-04-2009 05:08 PM
worker.list=worker1
worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1
JkWorkersFile /etc/apache2/workers.properties
# Where to put jk logs
JkLogFile /var/log/apache2/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
11-04-2009 06:10 PM
worker.list=ajp12, ajp13, casnode, alfnode # I know I only need casnode and alfnode
worker.casnode.port=8009
worker.casnode.host=myhost
worker.casnode.type=ajp13
worker.casnode.lbfactor=1
worker.alfnode.port=8010
worker.alfnode.host=myhost
worker.alfnode.type=ajp13
worker.inprocess.type=jni
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
worker.inprocess.cmd_line=start
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr
2009-11-04 18:06:19,472 DEBUG [org.jasig.cas.adaptors.x509.web.flow.X509CertificateCredentialsNonInteractiveAction] - <Certificates not found in request.>
11-05-2009 08:24 AM
* Ensured that there is nothing in Your Certificates in Firefox's Certificate Manager.
* Go to http://myhost/examples/jsp/snp/snoop.jsp -> Get CAS login form
* Clear all cookies, import alfresco-system.p12 into Firefox's Your Certificates, and I get the CAS login form, same as before. And in my CAS log is:
2009-11-04 18:06:19,472 DEBUG [org.jasig.cas.adaptors.x509.web.flow.X509CertificateCredentialsNonInteractiveAction] - <Certificates not found in request.>
Thanks VERY VERY much for helping with this!
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.