I just noticed that if I just wait Sling seems to start ok, but it can take almost 5 minutes before I can access content! If i look in the error.log I can see that there's a pause for more than 3 minutes and then Sling seems to proceed with the startup as normal with no errors in the log. Is this normal behaviour?

Below is a small part of the log where there is a 3 minutes pause during the startup.

16.08.2010 00:36:34.820 *INFO* [FelixStartLevel] org.apache.sling.openidauth.impl.OpenIDAuthenticationHandler OpenIDAuthenticationHandler created 16.08.2010 00:36:34.829 *INFO* [FelixStartLevel] org.apache.sling.openidauth Service [LoginModulePlugin Support for OpenIDAuthenticationHandler,100] ServiceEvent REGISTERED 16.08.2010 00:36:34.837 *INFO* [FelixStartLevel] org.apache.sling.formauth.impl.FormAuthenticationHandler Login Form URL /system/sling/form/login 16.08.2010 00:36:34.838 *INFO* [FelixStartLevel] org.apache.sling.formauth.impl.FormAuthenticationHandler Using Cookie store with name sling.formauth 16.08.2010 00:36:34.838 *INFO* [FelixStartLevel] org.apache.sling.formauth.impl.FormAuthenticationHandler Setting Auth Data attribute name sling.formauth 16.08.2010 00:36:34.838 *INFO* [FelixStartLevel] org.apache.sling.formauth.impl.FormAuthenticationHandler Setting session timeout 30 minutes 16.08.2010 00:36:34.838 *INFO* [FelixStartLevel] org.apache.sling.formauth.impl.FormAuthenticationHandler Storing tokens in /usr/local/apache-tomcat-6.0.29/sling-work/felix/bundle57/data/cookie-tokens.bin 16.08.2010 00:39:51.157 *INFO* [FelixStartLevel] org.apache.sling.formauth Service [LoginModulePlugin Support for FormAuthenticationHandler,101] ServiceEvent REGISTERED 16.08.2010 00:39:51.170 *INFO* [FelixStartLevel] org.apache.sling.commons.auth Service [org.apache.sling.engine.impl.auth.SlingAuthenticator,102] ServiceEvent REGISTERED 16.08.2010 00:39:51.176 *INFO* [FelixStartLevel] org.apache.sling.commons.auth Service [org.apache.sling.commons.auth.impl.engine.EngineSlingAuthenticator,103] ServiceEvent REGISTERED 16.08.2010 00:39:51.186 *INFO* [FelixStartLevel] org.apache.sling.servlets.resolver Service [ServletResourceProvider for Servlets at [/system/sling/login.servlet, /system/sling/login],105] ServiceEvent REGISTERED 16.08.2010 00:39:51.187 *INFO* [FelixStartLevel] org.apache.sling.servlets.resolver.internal.SlingServletResolver Registered ServletResourceProvider: servlet=org.apache.sling.commons.auth.impl.LoginServlet, paths=[/system/sling/login.servlet, /system/sling/login]

/Pontus

On 2010-08-16 00:32, Pontus Amberg wrote:
Hum... I might have been a bit to quick. I frequently fail to access content in Sling after a restart with the following error being displayed in the log

"*ERROR* [http-80-6] org.apache.sling.engine.impl.SlingMainServlet handleSecurity: AuthenticationSupport service missing. Cannot authenticate request."

Is this error still a sign of startup order problems or is this maybe something completely different?

Since I still can access /system/console I can restart through the restart button under "System Information" and that sometimes seems to start Sling in a better state where I can access content. But its really random and most of the times i just get the AuthenticationSupport service missing.

/Pontus


On 2010-08-15 22:49, Pontus Amberg wrote:
I've just tried the current trunk and the problem seems to be fixed.

Thanks for the quick fix!

/Pontus

On 2010-08-15 17:16, Carsten Ziegeler wrote:
Hi,

I've committed a potential fix for the problem. It would be great, if
you can give the latest trunk a try.

Regards
Carsten

Carsten Ziegeler  wrote
Pontus Amberg  wrote
I just tried to deploy org.apache.sling.launchpad-6-SNAPSHOT.war built
from the current trunk to a small Linux server with SUN Java 1.6 and
Tomcat 6.0.29 and Slings fails to start since I get a
NullPointerException in SlingSettingsServiceImpl
Unfortunately this is a startup order problem - to be compatible, the
new settings bundle searches the old engine bundle and tries to read a
file from the bundle context of the engine bundle (to use the same sling
id which might have been generated by the engine bundle).

Unfortunately the bundle context is only available of the bundle is in
starting, active or stopping state but not in resolved or installed.

Therefore we have to find another solution here.

For now, I'll add a NPE check as a temporary solution

Regards
Carsten

14.08.2010 16:45:02.254 *ERROR* [FelixDispatchQueue]
org.apache.sling.settings FrameworkEvent ERROR
(org.osgi.framework.BundleException: Activator start error in bundle
org.apache.sling.settings [33].) org.
osgi.framework.BundleException: Activator start error in bundle
org.apache.sling.settings [33].
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1864) at org.apache.felix.framework.Felix.startBundle(Felix.java:1734)
         at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1143)
         at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
         at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
         at
org.apache.sling.settings.impl.SlingSettingsServiceImpl.setupSlingId(SlingSettingsServiceImpl.java:105)

         at
org.apache.sling.settings.impl.SlingSettingsServiceImpl.<init>(SlingSettingsServiceImpl.java:69)

         at
org.apache.sling.settings.impl.Activator.start(Activator.java:44)
         at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:633)

at org.apache.felix.framework.Felix.activateBundle(Felix.java:1817)
         ... 4 more

The strange thing is if I take the same WAR file and run it on my
workstation with the same versions of Java&  Tomcat it works. I'm not
sure but might the cause be that engineBundle.getBundleContext() returns
null and does anyone know of any reason why that might happen?

/Pontus








Reply via email to