You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (JIRA)" <ji...@apache.org> on 2014/10/10 13:42:33 UTC
[jira] [Created] (QPID-6142) NPE on startup if key permissions are
wrong
Keith Wall created QPID-6142:
--------------------------------
Summary: NPE on startup if key permissions are wrong
Key: QPID-6142
URL: https://issues.apache.org/jira/browse/QPID-6142
Project: Qpid
Issue Type: Bug
Components: Java Broker
Affects Versions: 0.31
Reporter: Keith Wall
I was testing the AESKeyFile Encryptor and run into the following problem. It looks like if the Broker cannot be opened then you'll get the NPE..
I had enabled the AESKeyFile, then deliberately chmod'd the .key file to have world readable permissions. The Broker failed on restart with the following NPE.
{noformat}
log4j:WARN No appenders could be found for logger (org.apache.qpid.server.plugin.QpidServiceLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[Broker] BRK-1006 : Using configuration : /Users/keith/src/qpid/qpid/java/systests/target/qpid-broker/0.32-SNAPSHOT/work/config.json
[Broker] BRK-1007 : Using logging configuration : /Users/keith/src/qpid/qpid/java/systests/target/qpid-broker/0.32-SNAPSHOT/etc/log4j.xml
[Broker] BRK-1001 : Startup : Version: 0.32-SNAPSHOT Build: Unversioned directory
[Broker] BRK-1010 : Platform : JVM : Oracle Corporation version: 1.7.0_60-b19 OS : Mac OS X version: 10.9.5 arch: x86_64
[Broker] BRK-1011 : Maximum Memory : 1,908,932,608 bytes
[Broker] BRK-1004 : Qpid Broker Ready
Exception during startup: java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.qpid.server.registry.ApplicationRegistry.initialise(ApplicationRegistry.java:89)
at org.apache.qpid.server.Broker.startupImpl(Broker.java:154)
at org.apache.qpid.server.Broker.access$000(Broker.java:52)
at org.apache.qpid.server.Broker$1.run(Broker.java:113)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.qpid.server.Broker.startup(Broker.java:108)
at org.apache.qpid.server.Main.startBroker(Main.java:470)
at org.apache.qpid.server.Main.execute(Main.java:326)
at org.apache.qpid.server.Main.<init>(Main.java:159)
at org.apache.qpid.server.Main.main(Main.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
{noformat}
The logs say:
{noformat}
2014-10-08 22:41:37,816 INFO [main] (broker.startup) - [Broker] BRK-1001 : Startup : Version: 0.32-SNAPSHOT Build: Unversioned directory
2014-10-08 22:41:37,817 INFO [main] (broker.platform) - [Broker] BRK-1010 : Platform : JVM : Oracle Corporation version: 1.7.0_60-b19 OS : Mac OS X version: 10.9.5 arch: x86_64
2014-10-08 22:41:37,818 INFO [main] (broker.max_memory) - [Broker] BRK-1011 : Maximum Memory : 1,908,932,608 bytes
2014-10-08 22:41:37,871 ERROR [main] (model.AbstractConfiguredObject) - Failed to open object with name 'Broker'. Object will be put into ERROR state.
java.lang.IllegalArgumentException: Key file '/Users/keith/src/qpid/qpid/java/systests/target/qpid-broker/0.32-SNAPSHOT/work/.keys/Broker_Broker.key' has incorrect permissions. Only the owner should be able to read or write this file.
at org.apache.qpid.server.security.encryption.AESKeyFileEncrypterFactory.createEncrypter(AESKeyFileEncrypterFactory.java:99)
at org.apache.qpid.server.model.adapter.BrokerAdapter.postResolve(BrokerAdapter.java:141)
at org.apache.qpid.server.model.AbstractConfiguredObject.doResolution(AbstractConfiguredObject.java:658)
at org.apache.qpid.server.model.AbstractConfiguredObject.open(AbstractConfiguredObject.java:415)
at org.apache.qpid.server.registry.ApplicationRegistry.initialise(ApplicationRegistry.java:83)
at org.apache.qpid.server.Broker.startupImpl(Broker.java:154)
at org.apache.qpid.server.Broker.access$000(Broker.java:52)
at org.apache.qpid.server.Broker$1.run(Broker.java:113)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.qpid.server.Broker.startup(Broker.java:108)
at org.apache.qpid.server.Main.startBroker(Main.java:470)
at org.apache.qpid.server.Main.execute(Main.java:326)
at org.apache.qpid.server.Main.<init>(Main.java:159)
at org.apache.qpid.server.Main.main(Main.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
2014-10-08 22:41:37,873 INFO [main] (broker.stopped) - [Broker] BRK-1005 : Stopped
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org