You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jacek Laskowski <jl...@apache.org> on 2005/11/09 01:03:18 UTC

WARN [SilentStartupMonitor] Unable to start ... (starting)

Hi,

What does it mean? Where should I look for answers?

00:56:17,016 WARN  [SilentStartupMonitor] Unable to start 
geronimo.server:name=petstore-realm,J2EEServer=geronimo,J2EEApplication=null,j2eeType=SecurityRealm,J2EEModule=org/apache/geronimo/PetStoreSecurity1.3.2 
(starting)

I'm almost certain it is the reason why the authentication fails:

00:59:31,937 INFO  [JAASJettyRealm] problem
javax.security.auth.login.LoginException: No LoginModules configured for 
petstore-realm
         at 
javax.security.auth.login.LoginContext.init(LoginContext.java:256)
         at 
javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
         at 
org.apache.geronimo.jetty.JAASJettyRealm.authenticate(JAASJettyRealm.java:91)
         at 
org.mortbay.jetty.servlet.FormAuthenticator$FormCredential.authenticate(FormAuthenticator.java:305)
         at 
org.mortbay.jetty.servlet.FormAuthenticator.authenticate(FormAuthenticator.java:148)
         at 
org.apache.geronimo.jetty.interceptor.SecurityContextBeforeAfter.obtainUser(SecurityContextBeforeAfter.java:282)
         at 
org.apache.geronimo.jetty.interceptor.SecurityContextBeforeAfter.checkSecurityConstraints(SecurityContextBeforeAfter.java:191)
         at 
org.apache.geronimo.jetty.JettyWebAppContext.checkSecurityConstraints(JettyWebAppContext.java:516)
         at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:432)
         at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
         at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
         at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:635)
         at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
         at org.mortbay.http.HttpServer.service(HttpServer.java:954)
         at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
         at 
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
         at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
         at 
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
         at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
         at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

even though the following is in the plan:

     <gbean name="petstore-realm"
         class="org.apache.geronimo.security.realm.GenericSecurityRealm">
         <attribute name="realmName">petstore-realm</attribute>
         <reference name="LoginModuleConfiguration">
             <name>petstore-login</name>
         </reference>
         <reference name="ServerInfo">
             <module>org/apache/geronimo/System</module>
             <name>ServerInfo</name>
         </reference>
         <reference 
name="LoginService"><name>JaasLoginService</name></reference>
     </gbean>

When the LoginService reference is removed, another exception 
(assertion, actually) is thrown during authentication with a message 
that the module is null or something alike.

Jacek

Re: WARN [SilentStartupMonitor] Unable to start ... (starting) - SOLVED

Posted by David Jencks <da...@yahoo.com>.
On Nov 10, 2005, at 4:16 PM, Jacek Laskowski wrote:

> David Jencks wrote:
>> I think you have an unsatisfied reference in your generic security   
>> realm.
>
> Thanks Dave! It took me additional 2 days when I finally figured out  
> that a wrong GBean is looked up. I had to use the following reference  
> configuration to get it working.
>
>   <reference name="LoginService">
>     <module>org/apache/geronimo/Security</module>
>     <name>JaasLoginService</name>
>   </reference>
>
> Otherwise the module was assigned with  
> org/apache/geronimo/PetStoreSecurity1.3.2. I wonder whether or not  
> it's intended. Could you elaborate on it a little?

That's expected.  When you specify only some components of a gbean name  
in a reference, the other components are determined from the context.   
For everything except j2eeType this means they are copied from the  
gbean that has the reference.  So, in particular, the module will be  
the same as the module of the gbean with the reference.  The j2eeType  
is determined by explicitly setting it in the GBeanReference object  
when constructing the GBeanInfo.

thanks
david jencks

>
> 00:45:44,083 DEBUG [GBeanInstanceState] GBeanInstanceState for:  
> geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/ 
> Security,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginSe 
> rvice State changed from starting to running
> ...
> 00:45:44,654 DEBUG [GBeanSingleReference] Waiting to start  
> geronimo.server:name=petstore- 
> realm,J2EEServer=geronimo,J2EEApplication=null,j2eeType=SecurityRealm,J 
> 2EEModule=org/apache/geronimo/PetStoreSecurity1.3.2 because no targets  
> are running for reference LoginService matching the patterns  
> geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/ 
> PetStoreSecurity1.3.2,J2EEServer=geronimo,j2eeType=JaasLoginService,nam 
> e=JaasLoginService
>
>> david jencks
>
> Jacek
>


Re: WARN [SilentStartupMonitor] Unable to start ... (starting) - SOLVED

Posted by Jacek Laskowski <jl...@apache.org>.
David Jencks wrote:
> I think you have an unsatisfied reference in your generic security  
> realm. 

Thanks Dave! It took me additional 2 days when I finally figured out 
that a wrong GBean is looked up. I had to use the following reference 
configuration to get it working.

   <reference name="LoginService">
     <module>org/apache/geronimo/Security</module>
     <name>JaasLoginService</name>
   </reference>

Otherwise the module was assigned with 
org/apache/geronimo/PetStoreSecurity1.3.2. I wonder whether or not it's 
intended. Could you elaborate on it a little?

00:45:44,083 DEBUG [GBeanInstanceState] GBeanInstanceState for: 
geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/Security,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginService 
State changed from starting to running
...
00:45:44,654 DEBUG [GBeanSingleReference] Waiting to start 
geronimo.server:name=petstore-realm,J2EEServer=geronimo,J2EEApplication=null,j2eeType=SecurityRealm,J2EEModule=org/apache/geronimo/PetStoreSecurity1.3.2 
because no targets are running for reference LoginService matching the 
patterns 
geronimo.server:J2EEApplication=null,J2EEModule=org/apache/geronimo/PetStoreSecurity1.3.2,J2EEServer=geronimo,j2eeType=JaasLoginService,name=JaasLoginService

> david jencks

Jacek

Re: WARN [SilentStartupMonitor] Unable to start ... (starting)

Posted by David Jencks <da...@yahoo.com>.
I think you have an unsatisfied reference in your generic security  
realm.  Its much easier to see what is going on with the sercurity  
realm configuration if you use the xml-reference form to include the  
login module configurations inside your security realm gbean config.

I agree the first problem causes the second.

Here's an example config with 2 login modules:
     <gbean name="client-properties-realm"
         class="org.apache.geronimo.security.realm.GenericSecurityRealm">
         <attribute name="realmName">client-properties-realm</attribute>
         <xml-reference name="LoginModuleConfiguration">
             <lc:login-config  
xmlns:lc="http://geronimo.apache.org/xml/ns/loginconfig">
                 <lc:login-module control-flag="REQUIRED"  
server-side="true">
                      
<lc:login-domain-name>client-properties-realm</lc:login-domain-name>
                      
<lc:login-module- 
class>org.apache.geronimo.security.realm.providers.PropertiesFileLoginMo 
dule</lc:login-module-class>
                     <lc:option  
name="usersURI">var/security/users.properties</lc:option>
                     <lc:option  
name="groupsURI">var/security/groups.properties</lc:option>
                 </lc:login-module>
                 <lc:login-module control-flag="REQUIRED"  
server-side="true">
                     <lc:login-domain-name>default</lc:login-domain-name>
                      
<lc:login-module- 
class>org.apache.geronimo.security.jaas.NamedUPCredentialLoginModule</ 
lc:login-module-class>
                     <lc:option  
name="org.apache.geronimo.jaas.NamedUPCredentialLoginModule.Name">defaul 
t</lc:option>
                 </lc:login-module>
             </lc:login-config>
         </xml-reference>
         <reference name="ServerInfo">
             <module>org/apache/geronimo/ClientSystem</module>
             <name>ServerInfo</name>
         </reference>
         <reference name="LoginService">
             <name>JaasLoginService</name>
         </reference>
     </gbean>

This is from an app-client config so some of the references include  
client-side module names which will not work on the server.

thanks
david jencks
On Nov 8, 2005, at 4:03 PM, Jacek Laskowski wrote:

> Hi,
>
> What does it mean? Where should I look for answers?
>
> 00:56:17,016 WARN  [SilentStartupMonitor] Unable to start  
> geronimo.server:name=petstore- 
> realm,J2EEServer=geronimo,J2EEApplication=null,j2eeType=SecurityRealm,J 
> 2EEModule=org/apache/geronimo/PetStoreSecurity1.3.2 (starting)
>
> I'm almost certain it is the reason why the authentication fails:
>
> 00:59:31,937 INFO  [JAASJettyRealm] problem
> javax.security.auth.login.LoginException: No LoginModules configured  
> for petstore-realm
>         at  
> javax.security.auth.login.LoginContext.init(LoginContext.java:256)
>         at  
> javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
>         at  
> org.apache.geronimo.jetty.JAASJettyRealm.authenticate(JAASJettyRealm.ja 
> va:91)
>         at  
> org.mortbay.jetty.servlet.FormAuthenticator$FormCredential.authenticate 
> (FormAuthenticator.java:305)
>         at  
> org.mortbay.jetty.servlet.FormAuthenticator.authenticate(FormAuthentica 
> tor.java:148)
>         at  
> org.apache.geronimo.jetty.interceptor.SecurityContextBeforeAfter.obtain 
> User(SecurityContextBeforeAfter.java:282)
>         at  
> org.apache.geronimo.jetty.interceptor.SecurityContextBeforeAfter.checkS 
> ecurityConstraints(SecurityContextBeforeAfter.java:191)
>         at  
> org.apache.geronimo.jetty.JettyWebAppContext.checkSecurityConstraints(J 
> ettyWebAppContext.java:516)
>         at  
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplication 
> Handler.java:432)
>         at  
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 
> 568)
>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
>         at  
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCo 
> ntext.java:635)
>         at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
>         at org.mortbay.http.HttpServer.service(HttpServer.java:954)
>         at  
> org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
>         at  
> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
>         at  
> org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
>         at  
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java: 
> 244)
>         at  
> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
>         at  
> org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
>
> even though the following is in the plan:
>
>     <gbean name="petstore-realm"
>          
> class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>         <attribute name="realmName">petstore-realm</attribute>
>         <reference name="LoginModuleConfiguration">
>             <name>petstore-login</name>
>         </reference>
>         <reference name="ServerInfo">
>             <module>org/apache/geronimo/System</module>
>             <name>ServerInfo</name>
>         </reference>
>         <reference  
> name="LoginService"><name>JaasLoginService</name></reference>
>     </gbean>
>
> When the LoginService reference is removed, another exception  
> (assertion, actually) is thrown during authentication with a message  
> that the module is null or something alike.
>
> Jacek
>