You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by kotoole <ke...@gmail.com> on 2017/06/19 17:41:35 UTC
LDAP module fails randomly
The LDAP module in Karaf 4.0.8 randomly fails at startup.
Logs:
14:26:13,438 | ERROR | 1.0.0 | | FrameworkEvent ERROR -
custom-ldap-moduleorg.osgi.framework.BundleException: Unable to resolve
custom-ldap-module [286](R 286.0): missing requirement [custom-ldap-module
[286](R 286.0)] osgi.wiring.package;
(osgi.wiring.package=org.apache.karaf.jaas.modules.ldap) Unresolved
requirements: [[custom-ldap-module [286](R 286.0)] osgi.wiring.package;
(osgi.wiring.package=org.apache.karaf.jaas.modules.ldap)] at
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)[org.apache.felix.framework-5.6.1.jar:]
at
org.apache.felix.framework.Felix.startBundle(Felix.java:2117)[org.apache.felix.framework-5.6.1.jar:]
at
org.apache.felix.framework.Felix.setBundleStartLevel(Felix.java:1563)[org.apache.felix.framework-5.6.1.jar:]
at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:338)[org.apache.felix.framework-5.6.1.jar:]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
Blueprint file being used:
<?xml version="1.0" encoding="UTF-8"?>
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
<manifest
xmlns="http://karaf.apache.org/xmlns/deployer/blueprint/v1.0.0">
Import-Package: org.apache.karaf.jaas.modules.ldap
</manifest>
<ext:property-placeholder
placeholder-prefix="$["
placeholder-suffix="]">
</ext:property-placeholder>
<ext:property-placeholder
placeholder-prefix="$("
placeholder-suffix=")">
<ext:location>$[secure.file]</ext:location>
</ext:property-placeholder>
<jaas:config
name="karaf"
rank="1">
<jaas:module
className="org.apache.karaf.jaas.modules.ldap.LDAPLoginModule"
flags="required">
connection.url=$[ldap.url]
connection.username=CN=$(serviceAccount.username),OU=ServiceAccounts,DC=company,DC=com
connection.password=$(serviceAccount.password)
user.base.dn=DC=company,DC=com
user.filter=(sAMAccountName=%u)
user.search.subtree=true
role.base.dn=OU=CompanyGroups,DC=company,DC=com
role.name.attribute=cn
role.filter=(member=%fqdn)
role.search.subtree=false
ssl.protocol=SSL
authentication=simple
</jaas:module>
</jaas:config>
</blueprint>
--
View this message in context: http://karaf.922171.n3.nabble.com/LDAP-module-fails-randomly-tp4050828.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: LDAP module fails randomly
Posted by kotoole <ke...@gmail.com>.
This appears to have worked. Thanks!
--
View this message in context: http://karaf.922171.n3.nabble.com/LDAP-module-fails-randomly-tp4050828p4050840.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: LDAP module fails randomly
Posted by kotoole <ke...@gmail.com>.
I will give that a try and get back to you.
Thanks,
Kevin
--
View this message in context: http://karaf.922171.n3.nabble.com/LDAP-module-fails-randomly-tp4050828p4050832.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: LDAP module fails randomly
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
I think it could be related to fileinstall and race condition.
Can you try to change the etc/org.apache.felix.fileinstall-deploy.cfg as follow:
felix.fileinstall.start.level=100
felix.fileinstall.noInitialDelay=false
felix.fileinstall.poll=5000
Thanks,
Regards
JB
On 06/19/2017 09:22 PM, kotoole wrote:
> Correct!
>
> Thanks,
> Kevin
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/LDAP-module-fails-randomly-tp4050828p4050830.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: LDAP module fails randomly
Posted by kotoole <ke...@gmail.com>.
Correct!
Thanks,
Kevin
--
View this message in context: http://karaf.922171.n3.nabble.com/LDAP-module-fails-randomly-tp4050828p4050830.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: LDAP module fails randomly
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,
I guess you drop the blueprint file directly in deploy folder right ?
Regards
JB
On 06/19/2017 07:41 PM, kotoole wrote:
> The LDAP module in Karaf 4.0.8 randomly fails at startup.
> Logs:
> 14:26:13,438 | ERROR | 1.0.0 | | FrameworkEvent ERROR -
> custom-ldap-moduleorg.osgi.framework.BundleException: Unable to resolve
> custom-ldap-module [286](R 286.0): missing requirement [custom-ldap-module
> [286](R 286.0)] osgi.wiring.package;
> (osgi.wiring.package=org.apache.karaf.jaas.modules.ldap) Unresolved
> requirements: [[custom-ldap-module [286](R 286.0)] osgi.wiring.package;
> (osgi.wiring.package=org.apache.karaf.jaas.modules.ldap)] at
> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)[org.apache.felix.framework-5.6.1.jar:]
> at
> org.apache.felix.framework.Felix.startBundle(Felix.java:2117)[org.apache.felix.framework-5.6.1.jar:]
> at
> org.apache.felix.framework.Felix.setBundleStartLevel(Felix.java:1563)[org.apache.felix.framework-5.6.1.jar:]
> at
> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:338)[org.apache.felix.framework-5.6.1.jar:]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
> Blueprint file being used:
> <?xml version="1.0" encoding="UTF-8"?>
> <blueprint
> xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0"
>
> xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
>
> <manifest
> xmlns="http://karaf.apache.org/xmlns/deployer/blueprint/v1.0.0">
> Import-Package: org.apache.karaf.jaas.modules.ldap
> </manifest>
>
> <ext:property-placeholder
> placeholder-prefix="$["
> placeholder-suffix="]">
> </ext:property-placeholder>
>
> <ext:property-placeholder
> placeholder-prefix="$("
> placeholder-suffix=")">
> <ext:location>$[secure.file]</ext:location>
> </ext:property-placeholder>
>
> <jaas:config
> name="karaf"
> rank="1">
> <jaas:module
>
> className="org.apache.karaf.jaas.modules.ldap.LDAPLoginModule"
> flags="required">
> connection.url=$[ldap.url]
>
> connection.username=CN=$(serviceAccount.username),OU=ServiceAccounts,DC=company,DC=com
> connection.password=$(serviceAccount.password)
> user.base.dn=DC=company,DC=com
> user.filter=(sAMAccountName=%u)
> user.search.subtree=true
> role.base.dn=OU=CompanyGroups,DC=company,DC=com
> role.name.attribute=cn
> role.filter=(member=%fqdn)
> role.search.subtree=false
> ssl.protocol=SSL
> authentication=simple
> </jaas:module>
> </jaas:config>
>
> </blueprint>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/LDAP-module-fails-randomly-tp4050828.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com