[jira] [Commented] (MRM-1907) Archiva won't start due to a misconfigured Redback Runtime Configuration

2016-10-16 Thread Martin Stockhammer (JIRA)

[ 
https://issues.apache.org/jira/browse/MRM-1907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15580166#comment-15580166
 ] 

Martin Stockhammer commented on MRM-1907:
-

Added a validation flag to authenticators. So startup should not fail, if the 
LDAP configuration is invalid and not used. 

archiva:
commit 3fe1000
 
archiva-redback-core:
commit 78d822d  

   
commit 2aa6cdf


> Archiva won't start due to a misconfigured Redback Runtime Configuration
> 
>
> Key: MRM-1907
> URL: https://issues.apache.org/jira/browse/MRM-1907
> Project: Archiva
>  Issue Type: Bug
>  Components: redback, Users/Security
>Affects Versions: 2.2.0
>Reporter: Oliver E
>Priority: Critical
>
> I already posted this on the mailing list, but it won't show up so I will 
> post it here.
> I hope you can help since we need to upgrade Archiva to the latest version as 
> fast as possible due to a Java Update.
> Steps that I did:
> * Upgrade 1.3.6 to 2.2.0
> * Open Redback Runtime Configuration
> * Switch to tab "Properties"
> * Set Password expiration to false
> Archiva then displayed something like "Could not save property". Now archiva 
> won't start anymore.
> *Note:* We use our database for user management and therefore I changed 
> nothing on the user managers.
>  
> Somehow Archiva now thinks I configured LDAP (at least the log indicates 
> this).
>  
> How can I undo my configuration so that Archiva starts again without LDAP? As 
> already stated, Archiva won't start therefore I have no UI to configure the 
> system.
> Maybe a side question: Where are the Redback Runtime Configurations stored? I 
> couldn't find it.
>  
> Side note: The stack trace shows "invalid name" of my name - but I have no 
> idea where the server could have taken this from?
>  
> Thanks in advance!
>  
> Here the output from catalina.out:
> {code}
> SEVERE: Exception sending context initialized event to listener instance of 
> class org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'archivaServices': Cannot resolve reference to bean 
> 'authenticationInterceptor#rest' while setting bean property 'providers' with 
> key [1]; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'authenticationInterceptor#rest': Injection of autowired 
> dependencies failed; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Could not autowire 
> field: private 
> org.apache.archiva.redback.integration.filter.authentication.basic.HttpBasicAuthentication
>  
> org.apache.archiva.redback.rest.services.interceptors.AuthenticationInterceptor.httpAuthenticator;
>  nested exception is org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'httpAuthenticator#basic': Injection of 
> autowired dependencies failed; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Could not autowire 
> field: protected org.apache.archiva.redback.system.SecuritySystem 
> org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticator.securitySystem;
>  nested exception is org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'securitySystem': Injection of autowired 
> dependencies failed; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Could not autowire 
> field: private 
> org.apache.archiva.redback.authentication.AuthenticationManager 
> org.apache.archiva.redback.system.DefaultSecuritySystem.authnManager; nested 
> exception is org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'authenticationManager': Invocation of init method 
> failed; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'authenticator#ldap': Injection of autowired dependencies failed; 
> nested exception is org.springframework.beans.factory.BeanCreationException: 
> Could not autowire field: private 
> org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory 
> org.apache.archiva.redback.authentication.ldap.LdapBindAuthenticator.connectionFactory;
>  nested exception is org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'ldapConnectionFactory#archiva': Invocation of 
> init method failed; nested exception is java.lang.RuntimeException: Error 
> while initializing connection factory.
> at 
> 

[jira] [Commented] (MRM-1907) Archiva won't start due to a misconfigured Redback Runtime Configuration

2016-10-04 Thread Owen Healy (JIRA)

[ 
https://issues.apache.org/jira/browse/MRM-1907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15545910#comment-15545910
 ] 

Owen Healy commented on MRM-1907:
-

Oh wow... this tripped me up too.

Maybe Archiva should pre-validate the Distinguished Name before saving it to 
the configuration? Or perhaps, if it fails to load the LDAP configuration on 
startup it should mark it as invalid and continue?

So glad I found this thread...

> Archiva won't start due to a misconfigured Redback Runtime Configuration
> 
>
> Key: MRM-1907
> URL: https://issues.apache.org/jira/browse/MRM-1907
> Project: Archiva
>  Issue Type: Bug
>  Components: redback, Users/Security
>Affects Versions: 2.2.0
>Reporter: Oliver E
>Priority: Critical
>
> I already posted this on the mailing list, but it won't show up so I will 
> post it here.
> I hope you can help since we need to upgrade Archiva to the latest version as 
> fast as possible due to a Java Update.
> Steps that I did:
> * Upgrade 1.3.6 to 2.2.0
> * Open Redback Runtime Configuration
> * Switch to tab "Properties"
> * Set Password expiration to false
> Archiva then displayed something like "Could not save property". Now archiva 
> won't start anymore.
> *Note:* We use our database for user management and therefore I changed 
> nothing on the user managers.
>  
> Somehow Archiva now thinks I configured LDAP (at least the log indicates 
> this).
>  
> How can I undo my configuration so that Archiva starts again without LDAP? As 
> already stated, Archiva won't start therefore I have no UI to configure the 
> system.
> Maybe a side question: Where are the Redback Runtime Configurations stored? I 
> couldn't find it.
>  
> Side note: The stack trace shows "invalid name" of my name - but I have no 
> idea where the server could have taken this from?
>  
> Thanks in advance!
>  
> Here the output from catalina.out:
> {code}
> SEVERE: Exception sending context initialized event to listener instance of 
> class org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'archivaServices': Cannot resolve reference to bean 
> 'authenticationInterceptor#rest' while setting bean property 'providers' with 
> key [1]; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'authenticationInterceptor#rest': Injection of autowired 
> dependencies failed; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Could not autowire 
> field: private 
> org.apache.archiva.redback.integration.filter.authentication.basic.HttpBasicAuthentication
>  
> org.apache.archiva.redback.rest.services.interceptors.AuthenticationInterceptor.httpAuthenticator;
>  nested exception is org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'httpAuthenticator#basic': Injection of 
> autowired dependencies failed; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Could not autowire 
> field: protected org.apache.archiva.redback.system.SecuritySystem 
> org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticator.securitySystem;
>  nested exception is org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'securitySystem': Injection of autowired 
> dependencies failed; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Could not autowire 
> field: private 
> org.apache.archiva.redback.authentication.AuthenticationManager 
> org.apache.archiva.redback.system.DefaultSecuritySystem.authnManager; nested 
> exception is org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'authenticationManager': Invocation of init method 
> failed; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'authenticator#ldap': Injection of autowired dependencies failed; 
> nested exception is org.springframework.beans.factory.BeanCreationException: 
> Could not autowire field: private 
> org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory 
> org.apache.archiva.redback.authentication.ldap.LdapBindAuthenticator.connectionFactory;
>  nested exception is org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'ldapConnectionFactory#archiva': Invocation of 
> init method failed; nested exception is java.lang.RuntimeException: Error 
> while initializing connection factory.
> at 
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
> at 
> 

[jira] [Commented] (MRM-1907) Archiva won't start due to a misconfigured Redback Runtime Configuration

2016-07-21 Thread Jeff Rasmussen (JIRA)

[ 
https://issues.apache.org/jira/browse/MRM-1907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15388011#comment-15388011
 ] 

Jeff Rasmussen commented on MRM-1907:
-

I've ran into the same problem just today. 

This really shouldn't be marked as resolved as "not doing anything about this" 
isn't really solving the problem. 

The issue seems to be with browsers that auto-fill fields. It recognizes the 
username and password field as fields it should fill with your username and 
password. EVEN IF you never visit the LDAP tab.

Workaround:
if you do save anything on the Runtime Configuration page. Be sure to go to the 
ldap page and remove your user and pass, or verify that the values are correct 
before saving.

If you do manage to save and restart archiva while saving and thus generating 
the error indicated in the description above, navigate to your archiva.xml file 
(typically in the conf folder of the archiva install)
Scroll to the bottom, past the significant amount of unnecessary whitespace and 
remove the  ldapConfiguration section, then restart archiva. 




> Archiva won't start due to a misconfigured Redback Runtime Configuration
> 
>
> Key: MRM-1907
> URL: https://issues.apache.org/jira/browse/MRM-1907
> Project: Archiva
>  Issue Type: Bug
>  Components: redback, Users/Security
>Affects Versions: 2.2.0
>Reporter: Oliver E
>Priority: Critical
>
> I already posted this on the mailing list, but it won't show up so I will 
> post it here.
> I hope you can help since we need to upgrade Archiva to the latest version as 
> fast as possible due to a Java Update.
> Steps that I did:
> * Upgrade 1.3.6 to 2.2.0
> * Open Redback Runtime Configuration
> * Switch to tab "Properties"
> * Set Password expiration to false
> Archiva then displayed something like "Could not save property". Now archiva 
> won't start anymore.
> *Note:* We use our database for user management and therefore I changed 
> nothing on the user managers.
>  
> Somehow Archiva now thinks I configured LDAP (at least the log indicates 
> this).
>  
> How can I undo my configuration so that Archiva starts again without LDAP? As 
> already stated, Archiva won't start therefore I have no UI to configure the 
> system.
> Maybe a side question: Where are the Redback Runtime Configurations stored? I 
> couldn't find it.
>  
> Side note: The stack trace shows "invalid name" of my name - but I have no 
> idea where the server could have taken this from?
>  
> Thanks in advance!
>  
> Here the output from catalina.out:
> {code}
> SEVERE: Exception sending context initialized event to listener instance of 
> class org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'archivaServices': Cannot resolve reference to bean 
> 'authenticationInterceptor#rest' while setting bean property 'providers' with 
> key [1]; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'authenticationInterceptor#rest': Injection of autowired 
> dependencies failed; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Could not autowire 
> field: private 
> org.apache.archiva.redback.integration.filter.authentication.basic.HttpBasicAuthentication
>  
> org.apache.archiva.redback.rest.services.interceptors.AuthenticationInterceptor.httpAuthenticator;
>  nested exception is org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'httpAuthenticator#basic': Injection of 
> autowired dependencies failed; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Could not autowire 
> field: protected org.apache.archiva.redback.system.SecuritySystem 
> org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticator.securitySystem;
>  nested exception is org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'securitySystem': Injection of autowired 
> dependencies failed; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Could not autowire 
> field: private 
> org.apache.archiva.redback.authentication.AuthenticationManager 
> org.apache.archiva.redback.system.DefaultSecuritySystem.authnManager; nested 
> exception is org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'authenticationManager': Invocation of init method 
> failed; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'authenticator#ldap': Injection of autowired dependencies failed; 
> nested exception is org.springframework.beans.factory.BeanCreationException: 
> Could not autowire field: