Karaf Jaas combined with custom LoginModule doesn't work when loginModule jar is in deploy folder - apache-karaf

I am using Karaf 4.0.7 in combination with com.tagish.jaasmodules, which can be found at https://github.com/chriseldredge/tagish-jaas. It works fine when my code is compiled into jars and placed in the karaf/system/company/prefix/folders/.../ folder with features.xml files included as follows (company prefix folders and irrelevant features edited out):
daemons.server.dependencies-features.xml:
<?xml version="1.0" encoding="UTF-8"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1" name="daemons.server.dependencies">
<feature name="daemons.server.dependencies" version="5.8.0"> <bundle>#KARAF_HOME#system/daemons/server/jaasmodules.jar</bundle>
</feature>
</features>
The jaasmodules.jar file also exists and is contained in the same folder as the above and below feature files
daemons.server-features.xml
<?xml version="1.0" encoding="UTF-8"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.1" name="daemons.server">
<repository>#KARAF_HOME#system/daemons/server/daemons.server.dependencies-features.xml</repository>
<feature name="daemons.server" version="5.8.0">
<feature>daemons.server.dependencies</feature>
<bundle start-level="85">#KARAF_HOME#system/daemons/server/daemons.server.jar</bundle>
</feature>
</features>
These features are then added as featuresRepositories and set to install at startup in org.apache.karaf.features.cfg.
I have a JaasPropertiesLoginModule.xml file in my karaf/deploy folder, contents of which are as follows:
<?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">
<jaas:config name="ALM">
<jaas:module className="com.tagish.auth.FileLogin" flags="required">
pwdFile=E:/alm/ALM_HEAD/dev/system/security/passwd.config
</jaas:module>
</jaas:config>
<jaas:config name="Sample_FileLogin">
<jaas:module className="com.tagish.auth.FileLogin" flags="required">
pwdFile=E:/alm/ALM_HEAD/dev/system/security/passwd.config
</jaas:module>
</jaas:config>
<jaas:config name="Sample_LDAPLogin">
<jaas:module className="edu.vt.middleware.ldap.jaas.LdapLoginModule" flags="required">
ldapUrl=ldap://ldaphost:389
bindDn=CN=ldapuser,OU=Users,DC=company,DC=com
bindCredential=ldapuserpassword
baseDn=OU=Users,DC=company,DC=com
subtreeSearch=true
userField=sAMAccountName
referral=follow
org.osgi.framework.BundleContext=dummy
</jaas:module>
<jaas:module className="edu.vt.middleware.ldap.jaas.LdapRoleAuthorizationModule" flags="required">
ldapUrl=ldap://ldaphost:389
bindDn=CN=ldapuser,OU=Users,DC=company,DC=com
bindCredential=ldapuserpassword
baseDn=OU=Users,DC=company,DC=com
subtreeSearch=true
userField=sAMAccountName
roleBase=OU=Groups,DC=company,DC=com
roleFilter=(|(sAMAccountName={1})(member={0}))
roleAttribute=memberOf
searchResultHandlers=edu.vt.middleware.ldap.handler.FqdnSearchResultHandler,edu.vt.middleware.ldap.handler.RecursiveSearchResultHandler{{searchAttribute=memberOf}{mergeAttributes=CN}}
referral=follow
org.osgi.framework.BundleContext=dummy
</jaas:module>
</jaas:config>
</blueprint>
The above works perfectly in a standard deployment, with everything being located in the system folder or a subdirectory of the systemfolder apart from the JaasPropertiesLoginModule.xml, which is found in the deploy folder. When I create a new LoginContext using context name ALM, it can properly find the ALM config and initialize the FileLogin module with the correct settings, and this FileLogin module fully functions to login.
However, in our local development environment, instead of the system folder, we have all our jars and dependencies located inside the deploy folder alongside the JaasPropertyLoginModule.xml file, and we don't use the feature file either (which means that we sometimes have to manually start most of our bundles because they don't automatically start). In this particular configuration, when I create a new LoginContext using context name ALM, it gives the following error:
javax.security.auth.login.LoginException: No LoginModules configured for ALM
at javax.security.auth.login.LoginContext.init(LoginContext.java:264)[:1.8.0_172]
at javax.security.auth.login.LoginContext.<init>(LoginContext.java:417)[:1.8.0_172]
at business.server.bs.login.LoginServiceImpl.login(LoginServiceImpl.java:136)
Is there something particular I need to change somewhere to allow the JaasPropertiesLoginModule.xml file to recognize the JaasModules.jar file in the karaf/deploy folder instead of the karaf/system folder?
This is the Karaf log file for a startup procedure:
2019-06-04 13:08:08,976 | INFO | pool-49-thread-1 | SecurityUtils | 64 - org.apache.sshd.core - 0.14.0 | BouncyCastle not registered, using the default JCE provider
2019-06-04 13:08:09,318 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/lib.util.xmlrpc.jar
2019-06-04 13:08:09,320 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/axis.jar
2019-06-04 13:08:09,321 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/bndlib.jar
2019-06-04 13:08:09,324 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/commons-digester.jar
2019-06-04 13:08:09,324 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/stax2-api.jar
2019-06-04 13:08:09,324 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/xmlrpc.jar
2019-06-04 13:08:09,325 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/xstream.jar
2019-06-04 13:08:09,325 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/daemons.shared.jar
2019-06-04 13:08:09,327 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jfreechart.jar
2019-06-04 13:08:09,331 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/phases.scripting.jar
2019-06-04 13:08:09,336 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/com.springsource.org.apache.velocity.jar
2019-06-04 13:08:09,336 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jackson-annotations.jar
2019-06-04 13:08:09,340 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/org.osgi.core.jar
2019-06-04 13:08:09,340 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/mail.jar
2019-06-04 13:08:09,341 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/tinybundles.jar
2019-06-04 13:08:09,344 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jsoup.jar
2019-06-04 13:08:09,348 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/ops4j-base-io.jar
2019-06-04 13:08:09,353 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/ojb.jar
2019-06-04 13:08:09,353 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/trueswing.jar
2019-06-04 13:08:09,354 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/tfs.sdk.jar
2019-06-04 13:08:09,358 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/woodstox-core-asl.jar
2019-06-04 13:08:09,358 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/lib.util.jar
2019-06-04 13:08:09,362 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/util.urlhandlers.almscp.jar
2019-06-04 13:08:09,367 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/org.osgi.compendium.jar
2019-06-04 13:08:09,371 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/commons-validator.jar
2019-06-04 13:08:09,375 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jackson-databind.jar
2019-06-04 13:08:09,375 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jcommon.jar
2019-06-04 13:08:09,376 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/com.springsource.org.apache.xml.resolver.jar
2019-06-04 13:08:09,376 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/truelicense.jar
2019-06-04 13:08:09,379 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/httpcore.jar
2019-06-04 13:08:09,382 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/lib.orm.jar
2019-06-04 13:08:09,385 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/com.springsource.org.apache.commons.lang.jar
2019-06-04 13:08:09,386 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jaasmodules.jar
2019-06-04 13:08:09,388 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/wsdl4j.jar
2019-06-04 13:08:09,391 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/daemons.server.jar
2019-06-04 13:08:09,394 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/commons-discovery.jar
2019-06-04 13:08:09,395 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jaxrpc-api.jar
2019-06-04 13:08:09,399 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/phases.core.server.jar
2019-06-04 13:08:09,400 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/itext.jar
2019-06-04 13:08:09,403 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/com.springsource.org.apache.commons.net.jar
2019-06-04 13:08:09,404 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/com.springsource.org.apache.oro.jar
2019-06-04 13:08:09,405 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/ops4j-base-lang.jar
2019-06-04 13:08:09,407 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jackson-core.jar
2019-06-04 13:08:09,408 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/org.apache.servicemix.bundles.jsch.jar
2019-06-04 13:08:09,414 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/truexml.jar
2019-06-04 13:08:09,415 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/ops4j-base-store.jar
2019-06-04 13:08:09,416 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/soap60.jar
2019-06-04 13:08:09,417 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/util.urlhandlers.almftp.jar
2019-06-04 13:08:09,418 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/pax-swissbox-property.jar
2019-06-04 13:08:09,419 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/ops4j-base-monitors.jar
2019-06-04 13:08:09,422 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/pax-url-commons.jar
2019-06-04 13:08:09,422 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/poi.jar
2019-06-04 13:08:09,425 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/vt-ldap.jar
2019-06-04 13:08:09,425 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/protobuf-java.jar
2019-06-04 13:08:09,428 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/commons-pool.jar
2019-06-04 13:08:09,433 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/jasperreports.jar
2019-06-04 13:08:09,434 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/ojdbc16.jar
2019-06-04 13:08:09,435 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/commons-compress.jar
2019-06-04 13:08:09,436 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/com.springsource.org.apache.commons.cli.jar
2019-06-04 13:08:09,436 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/commons-codec.jar
2019-06-04 13:08:09,437 | INFO | ver\karaf/deploy | fileinstall | 4 - org.apache.felix.fileinstall - 3.5.4 | Started bundle: file:/E:/alm/ALM_HEAD/dev/trunk/daemons/server/karaf/deploy/httpclient.jar
2019-06-04 13:08:09,441 | DEBUG | FelixStartLevel | xmlrpc | 131 - lib.util.xmlrpc - 7.0.0 | BundleEvent RESOLVED - lib.util.xmlrpc
2019-06-04 13:08:09,441 | DEBUG | FelixStartLevel | util | 152 - lib.util - 7.0.0 | BundleEvent RESOLVED - lib.util
2019-06-04 13:08:09,442 | DEBUG | FelixStartLevel | xmlrpc | 131 - lib.util.xmlrpc - 7.0.0 | BundleEvent STARTING - lib.util.xmlrpc
2019-06-04 13:08:09,442 | DEBUG | FelixStartLevel | xmlrpc | 131 - lib.util.xmlrpc - 7.0.0 | BundleEvent STARTED - .lib.util.xmlrpc
2019-06-04 13:08:09,460 | DEBUG | FelixStartLevel | server 2019-06-04 13:08:09,620 | DEBUG | FelixStartLevel | almftp | 147 - util.urlhandlers.almftp - 5.8.0 | BundleEvent RESOLVED - util.urlhandlers.almftp
2019-06-04 13:08:09,621 | DEBUG | FelixStartLevel | almftp | 147 - util.urlhandlers.almftp - 5.8.0 | BundleEvent STARTING - util.urlhandlers.almftp
2019-06-04 13:08:09,624 | DEBUG | FelixStartLevel | almftp | 147 - util.urlhandlers.almftp - 5.8.0 | ServiceEvent REGISTERED - [org.osgi.service.url.URLStreamHandlerService] - util.urlhandlers.almftp
2019-06-04 13:08:09,625 | DEBUG | FelixStartLevel | almftp | 147 - util.urlhandlers.almftp - 5.8.0 | ServiceEvent REGISTERED - [org.osgi.service.cm.ManagedService] - util.urlhandlers.almftp
2019-06-04 13:08:09,626 | DEBUG | FelixStartLevel | almftp | 147 - util.urlhandlers.almftp - 5.8.0 | BundleEvent STARTED - util.urlhandlers.almftp
2019-06-04 13:08:09,636 | DEBUG | FelixStartLevel | util | 152 - lib.util - 7.0.0 | BundleEvent STARTING - lib.util
2019-06-04 13:08:09,636 | DEBUG | FelixStartLevel | util | 152 - lib.util - 7.0.0 | BundleEvent STARTED - lib.util
2019-06-04 13:08:09,640 | DEBUG | FelixStartLevel | almscp | 153 - util.urlhandlers.almscp - 5.8.0 | BundleEvent RESOLVED - util.urlhandlers.almscp
2019-06-04 13:08:09,641 | DEBUG | FelixStartLevel | almscp | 153 - util.urlhandlers.almscp - 5.8.0 | BundleEvent STARTING - util.urlhandlers.almscp
2019-06-04 13:08:09,642 | DEBUG | FelixStartLevel | almscp | 153 - util.urlhandlers.almscp - 5.8.0 | ServiceEvent REGISTERED - [org.osgi.service.url.URLStreamHandlerService] - util.urlhandlers.almscp
2019-06-04 13:08:09,643 | DEBUG | FelixStartLevel | almscp | 153 - util.urlhandlers.almscp - 5.8.0 | ServiceEvent REGISTERED - [org.osgi.service.cm.ManagedService] - util.urlhandlers.almscp
2019-06-04 13:08:09,644 | DEBUG | FelixStartLevel | almscp | 153 - util.urlhandlers.almscp - 5.8.0 | BundleEvent STARTED - util.urlhandlers.almscp
2019-06-04 13:08:09,644 | DEBUG | FelixStartLevel | server | 158 - daemons.server - 5.8.0 | BundleEvent STARTING - daemons.server
2019-06-04 13:08:09,647 | DEBUG | FelixStartLevel | server | 158 - daemons.server - 5.8.0 | ServiceEvent REGISTERED - [org.osgi.service.cm.ManagedService] - daemons.server
2019-06-04 13:08:09,648 | INFO | e: pid=[server]) | ServerActivator | 152 - lib.util - 7.0.0 | keepKarafRunningWhenServerStops=true
2019-06-04 13:08:09,648 | DEBUG | FelixStartLevel | server | 158 - daemons.server - 5.8.0 | BundleEvent STARTED - daemons.server
2019-06-04 13:08:09,651 | INFO | e: pid=[server]) | ServerActivator | 152 - lib.util - 7.0.0 | Trying to load database configuration from : E:\alm\ALM_HEAD\dev\trunk\daemons\server\karaf/etc/hibernate.properties
2019-06-04 13:08:09,704 | INFO | e: pid=[server]) | Version | 72 - org.jboss.logging.jboss-logging - 3.3.1.Final | HHH000412: Hibernate Core {5.2.17.Final}
2019-06-04 13:08:09,705 | INFO | e: pid=[server]) | Environment | 72 - org.jboss.logging.jboss-logging - 3.3.1.Final | HHH000206: hibernate.properties not found
2019-06-04 13:08:10,029 | INFO | e: pid=[server]) | Version | 72 - org.jboss.logging.jboss-logging - 3.3.1.Final | HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2019-06-04 13:08:10,089 | INFO | e: pid=[server]) | C3P0ConnectionProvider | 72 - org.jboss.logging.jboss-logging - 3.3.1.Final | HHH010002: C3P0 using driver: com.mysql.cj.jdbc.Driver at URL: jdbc:mysql://localhost:3306/almhead?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
2019-06-04 13:08:10,090 | INFO | e: pid=[server]) | C3P0ConnectionProvider | 72 - org.jboss.logging.jboss-logging - 3.3.1.Final | HHH10001001: Connection properties: {user=root, password=****}
2019-06-04 13:08:10,091 | INFO | e: pid=[server]) | C3P0ConnectionProvider | 72 - org.jboss.logging.jboss-logging - 3.3.1.Final | HHH10001003: Autocommit mode: false

We managed to fix this a couple weeks ago. Turns out that it was a mix of dependency issues and bundle misconfiguration: we had to exclude org.osgi.core and org.osgi.compendium from the hibernate-osgi dependency, and we had to make the javax.security import required in the Karaf bundle that contained our security code.

Related

sdkman does not provide more java candidates on Apple Silicon M1

I'm trying to install a different version of java amzn on macOS Apple Silicon M1 but it's no other candidate available than the listed ones:
Would it be possible to get extra candidates?
tl;dr
Ask your vendor of choice to publish their product via SDKMAN using simple REST API or Gradle/Maven plugin.
To refresh the list of products, run the update command.
sdk update
You asked:
install a different version of java amzn on macOS Apple Silicon
I see Amazon offering four releases of Corretto for Macs with Apple Silicon:
18
18.0.1
17.0.3.6.1
17.0.2.8.1
Details
As I understand it, the way SDKMAN works is that a vendor chooses to publish their releases via that avenue. If you want a product from a vendor not currently listed, ask that vendor to make their product available via SDKMAN.
To quote the SDKMAN web site:
SDKMAN! is unique in that it empowers SDK Vendors to publish their candidate releases on our platform. We provide a secure API that can be used to manage all aspects of a release on SDKMAN!. Such aspects include Releasing a new version, setting an existing version as Default (Stable) and Announcing the release on the SDKMAN! CLI broadcast and Twitter feed.
The process seems quite simple. See the Vendors page of the SDKMAN web site.
SDKMAN makes available a JSON REST API by which a vendor supplies their release information.
If the vendor prefers not to mess with cURL or HttpClient, they may alternatively choose to use the plugins for Gradle or Maven as the way to publish their new build.
As of 2022-04, the list of product offerings on SDKMAN for the Java platform on Macs with Apple Silicon has grown in just these last two months. When I run sdk list java, I get eight vendors offering various products that include:
Current version 18.0.1
All three LTS versions (8, 11, 17)
Early-access version of Java 19.
================================================================================
Available Java Versions for macOS ARM 64bit
================================================================================
Vendor | Use | Version | Dist | Status | Identifier
--------------------------------------------------------------------------------
Corretto | | 18 | amzn | | 18-amzn
| >>> | 18.0.1 | amzn | installed | 18.0.1-amzn
| | 17.0.3.6.1 | amzn | | 17.0.3.6.1-amzn
| | 17.0.2.8.1 | amzn | | 17.0.2.8.1-amzn
Java.net | | 19.ea.19 | open | | 19.ea.19-open
| | 19.ea.18 | open | | 19.ea.18-open
| | 19.ea.5.lm | open | | 19.ea.5.lm-open
| | 18 | open | | 18-open
| | 18.0.1 | open | | 18.0.1-open
| | 17.0.2 | open | | 17.0.2-open
Liberica | | 18.fx | librca | | 18.fx-librca
| | 18.0.1.fx | librca | | 18.0.1.fx-librca
| | 18.0.1 | librca | | 18.0.1-librca
| | 18 | librca | | 18-librca
| | 17.0.3.fx | librca | | 17.0.3.fx-librca
| | 17.0.3 | librca | | 17.0.3-librca
| | 17.0.2.fx | librca | | 17.0.2.fx-librca
| | 17.0.2 | librca | | 17.0.2-librca
| | 11.0.15 | librca | | 11.0.15-librca
| | 11.0.14 | librca | | 11.0.14-librca
| | 8.0.332 | librca | | 8.0.332-librca
| | 8.0.322 | librca | | 8.0.322-librca
Microsoft | | 17.0.2 | ms | | 17.0.2-ms
| | 11.0.14 | ms | | 11.0.14-ms
Oracle | | 18.0.1 | oracle | | 18.0.1-oracle
| | 18 | oracle | | 18-oracle
| | 17.0.3 | oracle | | 17.0.3-oracle
| | 17.0.2 | oracle | | 17.0.2-oracle
SapMachine | | 18 | sapmchn | | 18-sapmchn
| | 18.0.1 | sapmchn | | 18.0.1-sapmchn
| | 17.0.2 | sapmchn | | 17.0.2-sapmchn
Temurin | | 18 | tem | | 18-tem
| | 17.0.2 | tem | | 17.0.2-tem
Zulu | | 18 | zulu | | 18-zulu
| | 18.fx | zulu | | 18.fx-zulu
| | 17.0.3 | zulu | | 17.0.3-zulu
| | 17.0.2 | zulu | | 17.0.2-zulu
| | 17.0.2.fx | zulu | | 17.0.2.fx-zulu
| | 11.0.15 | zulu | | 11.0.15-zulu
| | 11.0.14 | zulu | | 11.0.14-zulu
| | 8.0.332 | zulu | | 8.0.332-zulu
| | 8.0.322 | zulu | | 8.0.322-zulu
================================================================================

Openstack Neutron Linux Bridge MTU 1500 issue

We have configured Neutron and ml2 agent to use MTU 1500 using linux bridge agent but the VM's cannot run apt update but if we set the MTU to 1450 in the VM network interface works well.
Here is my neutron.conf value and ml2_conf.ini.
neutron.conf:
global_physnet_mtu = 1550
ml2_conf.ini:
[DEFAULT]
path_mtu = 1550
physical_network_mtus = physnet1:1550
Vxlan:
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | nova |
| created_at | 2021-03-30T17:40:59Z |
| description | |
| dns_domain | None |
| id | 4ddce1ef-8151-4c67-b3ca-7519f2ab54c3 |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | None |
| is_vlan_transparent | None |
| mtu | 1500 |
| name | gfgfggf |
| port_security_enabled | True |
| project_id | 2467cb8a053d40f0a0a8af43d89d1c32 |
| provider:network_type | vxlan |
| provider:physical_network | None |
| provider:segmentation_id | 2 |
| qos_policy_id | None |
| revision_number | 4 |
| router:external | Internal |
| segments | None |
| shared | False |
| status | ACTIVE |
| subnets | 9a312e58-e830-4dc5-bd6e-ad903230f6b4 |
| tags | |
| updated_at | 2021-03-30T17:57:31Z |
+---------------------------+--------------------------------------+
Anyone can help?
UPDATE: The issue was solved restarting the controller and all hypervisors.
Thanks.
The settings in ml2_conf.ini should be under the heading [ml2]. [DEFAULT] is used in neutron.conf.

Configure network MTU in Openstack with Heat

Is it possible to configure the mtu of a network while creating it with a heat template in Openstack?
I can set the mtu through the CLI openstack network --mtu <value> <network_id>
I see a reference to mtu in the heat guide but it doesn't appear to allow setting of the value.
Yes, it is possible to set the MTU with heat-templates. You have to use the value_specs-field, which allows you additional properties. See its really bad documentation here:
https://docs.openstack.org/heat/pike/template_guide/openstack.html#OS::Neutron::Subnet-prop-value_specs
I tested it with the following simple heat-template:
heat_template_version: 2013-05-23
description: tests network
resources:
demo-network:
type: OS::Neutron::Net
properties:
name: demo-network
value_specs: { mtu: 1400 }
It really created a network with an MTU of 1400 like set in the template. Checked it with a show-command:
root#test-node:~# openstack network show demo-network
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | |
| created_at | 2020-05-16T13:33:53Z |
| description | |
| dns_domain | None |
| id | 965d890f-0c37-400e-8ee0-ec6ce1fcf4e6 |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | None |
| is_vlan_transparent | None |
| location | cloud='', project.domain_id=, project.domain_name='Default', project.id='2dacaa8f6d3348f28e126b371bf1dfab', project.name='admin', region_name='RegionOne', zone= |
| mtu | 1400 |
| name | demo-network |
| port_security_enabled | True |
| project_id | 2dacaa8f6d3348f28e126b371bf1dfab |
| provider:network_type | vxlan |
| provider:physical_network | None |
| provider:segmentation_id | 60 |
| qos_policy_id | None |
| revision_number | 1 |
| router:external | Internal |
| segments | None |
| shared | False |
| status | ACTIVE |
| subnets | |
| tags | |
| updated_at | 2020-05-16T13:33:53Z |
+---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+

The dashbord `Project -> NETWORK -> Network Topology` always loading

The Project -> NETWORK -> Network Topology always loading...
But the Project -> NETWORK -> Networks and Project -> NETWORK -> Routers all are good, will shows the information.
Finally I found nova-compute service did not start up:
[root#ha-node3 mysql]# nova service-list
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
| 2 | nova-consoleauth | ha-node3 | internal | enabled | up | 2017-08-06T11:44:32.000000 | - |
| 5 | nova-conductor | ha-node3 | internal | enabled | up | 2017-08-06T11:44:32.000000 | - |
| 7 | nova-cert | ha-node3 | internal | enabled | up | 2017-08-06T11:44:32.000000 | - |
| 15 | nova-scheduler | ha-node3 | internal | enabled | up | 2017-08-06T11:44:32.000000 | - |
| 22 | nova-cert | ha-node1 | internal | enabled | up | 2017-08-06T11:43:40.000000 | - |
| 29 | nova-conductor | ha-node1 | internal | enabled | up | 2017-08-06T11:43:40.000000 | - |
| 32 | nova-consoleauth | ha-node1 | internal | enabled | up | 2017-08-06T11:43:40.000000 | - |
| 33 | nova-consoleauth | ha-node2 | internal | enabled | up | 2017-08-06T11:43:38.000000 | - |
| 36 | nova-scheduler | ha-node1 | internal | enabled | up | 2017-08-06T11:43:41.000000 | - |
| 40 | nova-conductor | ha-node2 | internal | enabled | up | 2017-08-06T11:43:39.000000 | - |
| 44 | nova-cert | ha-node2 | internal | enabled | up | 2017-08-06T11:43:39.000000 | - |
| 46 | nova-scheduler | ha-node2 | internal | enabled | up | 2017-08-06T11:43:48.000000 | - |
| 49 | nova-compute | ha-node2 | nova | enabled | down | 2017-08-06T08:57:50.000000 | - |
| 53 | nova-compute | ha-node1 | nova | enabled | down | 2017-08-06T08:57:30.000000 | - |
+----+------------------+----------+----------+---------+-------+----------------------------+-----------------+
So I restarted the nova-compute service:
systemctl start openstack-nova-compute.service

Issues with Apache ServiceMix and javax.transaction

I am having an issue with Apache ServiceMix (7.0.0.M1). I start up a fresh service mix (clean) and simply install the transaction feature:
karaf#root>feature:install transaction
This puts the Aries Transaction Blueprint into a GracePeriod:
224 | GracePeriod | 80 | 1.1.1 | Apache Aries Transaction Blueprint
225 | GracePeriod | 80 | 2.1.0 | Apache Aries Transaction Blueprint
This keeps my apps I install later that require the javax transaction api from starting. Is there a workaround for this issue? I had the same issues when just using karaf 4.0.3 and trying to instal camel and transaction.
Below you'll find a listing of all bundles (the basic service mix + those added by installing the transaction feature above). Notice the failure due to the GracePeriod timeout.
karaf#root>list
START LEVEL 100 , List Threshold: 50
ID | State | Lvl | Version | Name
-------------------------------------------------------------------------------------------------------
10 | Active | 50 | 5.13.0 | activemq-karaf
11 | Active | 50 | 2.6.3 | Jackson-annotations
12 | Active | 50 | 2.6.3 | Jackson-core
13 | Active | 50 | 2.6.3 | jackson-databind
23 | Active | 50 | 3.1.4 | activeio-core
24 | Active | 50 | 5.13.0 | activemq-camel
25 | Active | 50 | 5.13.0 | activemq-osgi
40 | Active | 50 | 2.16.2 | camel-blueprint
41 | Active | 50 | 2.16.2 | camel-catalog
42 | Active | 80 | 2.16.2 | camel-commands-core
43 | Active | 50 | 2.16.2 | camel-core
44 | Active | 50 | 2.16.2 | camel-cxf
45 | Active | 50 | 2.16.2 | camel-cxf-transport
46 | Active | 50 | 2.16.2 | camel-jms
47 | Active | 50 | 2.16.2 | camel-spring
48 | Active | 50 | 2.16.2 | camel-xstream
49 | Active | 80 | 2.16.2 | camel-karaf-commands
51 | Active | 50 | 3.2.2 | Apache Commons Collections
53 | Active | 50 | 3.3.0 | Commons Net
54 | Active | 50 | 1.6.0 | Commons Pool
55 | Active | 50 | 2.4.2 | Apache Commons Pool
93 | Active | 50 | 2.0.0 | geronimo-j2ee-connector_1.5_spec
94 | Active | 50 | 1.0.1 | geronimo-j2ee-management_1.1_spec
99 | Active | 50 | 3.4.6 | ZooKeeper Bundle
129 | Active | 80 | 2.0.9 | Apache MINA Core
132 | Active | 50 | 7.0.0.M1 | Apache ServiceMix :: ActiveMQ :: Camel
133 | Active | 50 | 7.0.0.M1 | Apache ServiceMix :: ActiveMQ :: Service
136 | Active | 50 | 1.6.1.5 | Apache ServiceMix :: Bundles :: dom4j
138 | Active | 50 | 1.9.2.1 | Apache ServiceMix :: Bundles :: jasypt
142 | Active | 50 | 1.1.0.4 | Apache ServiceMix :: Bundles :: jdom
143 | Active | 50 | 2.3.0.2 | Apache ServiceMix :: Bundles :: kxml2
156 | Active | 50 | 1.7.0.6 | Apache ServiceMix :: Bundles :: velocity
160 | Active | 50 | 1.1.4.c | Apache ServiceMix :: Bundles :: xpp3
161 | Active | 50 | 1.4.8.1 | Apache ServiceMix :: Bundles :: xstream
172 | Active | 50 | 3.18.0 | Apache XBean :: Spring
201 | Active | 50 | 0.6.4 | JAXB2 Basics - Runtime
214 | Active | 50 | 2.11.0.v20140415-163722-cac6383e66 | Scala Standard Library
221 | Active | 80 | 1.2.0 | CDI APIs
222 | Active | 80 | 1.2 | javax.interceptor API
223 | Active | 80 | 1.2 | javax.transaction API
224 | Failure | 80 | 1.1.1 | Apache Aries Transaction Blueprint
225 | Failure | 80 | 2.1.0 | Apache Aries Transaction Blueprint
226 | Active | 80 | 1.3.0 | Apache Aries Transaction Manager
227 | Active | 80 | 1.0.2 | Apache Felix Coordinator Service
228 | Active | 80 | 1.0.0.2 | Apache ServiceMix :: Bundles :: javax.inject
I have cross posted to the apache mailing lists as well.
The problem is that the spring-tx feature installs the jta 1.1 spec bundle. The aries transaction bundles require the new jta 1.2 spec though. So they do not find the TransactionManager which is bound to the wrong spec version.
This is caused by an error in the karaf spring-tx feature. The feature should depend on the jta 1.1 spec with dependency=true. This allows the karaf resolver to choose a different bundle providing suitable capabilities.
I have documented this issue in KARAF-4358. The issues is solved on master and the 4.0.x branch. So it will be delivered in karaf 4.0.5. You can fix you karaf distro by editing the feature file in the system dir in the same way I did.

Resources