On Tue, Nov 30, 2010 at 12:00 PM, Vidar Ramdal <vi...@idium.no> wrote:
> Hi, we're having a problem with our Sling-based app. On about 50% of
> the cases, the app returns 404 on all requests immediately after
> startup.
> A random number of restarts usually solves the problem, with the app
> responding properly again.
>
> In the startup log I see two lines saying "*INFO* [Jetty HTTP Service]
> org.apache.felix.http.jetty Started jetty 6.1.x at port 80" - is this
> normal?
> I suspect, that for some reason, two instances of Jetty is started,
> and that this may cause servlets to bind to the one instance that is
> not active when the startup procedure is done.
>
> But why is Jetty started twice?
>
> There is also a large number of lines saying *INFO* [SCR Component
> Actor] org.apache.sling.servlets.resolver
> [org.apache.sling.servlets.resolver.SlingServletResolver] Dependency
> not satisfied: servletContext

Digging around, I see that o.a.felix.http.jetty.internal.JettyService
is started, the thread's run method is invoked, but then almost
immediately interrupted from the updated method, when JettyService
receives its configuration.
This again triggers initializeJetty(), which calls new Server().

Would this cause servlets that happen to be registered before the
configuration is updated, to become unreachable?

> Any help appreciated.

-- 
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Sommerrogata 13-15, N-0255 Oslo, Norway
+ 47 22 00 84 00 / +47 22 00 84 76
Quando omni flunkus moritatus!

Reply via email to