0

I'm trying to setup Artemis with SSL

my etc/bootstrap.xml file looks like :

<broker xmlns="http://activemq.org/schema">
   <web bind="https://0.0.0.0:8161" path="web" keystorePath="keystore.p12" keystorePassword="123" truststorePath="trusstore.p12" truststorePassword="123">
      <app url="activemq-branding" war="activemq-branding.war"/>
      <app url="artemis-plugin" war="artemis-plugin.war"/>
      <app url="console" war="console.war"/>
   </web>
</broker>

which I did like it was written in the documentation, but when I run artemis service I'm getting error:

javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 28; columnNumber: 188; cvc-complex-type.3.2.2: Attribute 'keystorePath' is not allowed to appear in element 'web'.]

I cant understand what I did wrong?

Justin Bertram
  • 29,372
  • 4
  • 21
  • 43
LDropl
  • 846
  • 3
  • 9
  • 25

1 Answers1

2

JAXB unmarshalling is case sensitive, so you can fix this error replacing the following attribute names: keystorePath > keyStorePath, keystorePassword > keyStorePassword, truststorePath > trustStorePath and truststorePassword > trustStorePassword.

<broker xmlns="http://activemq.org/schema">
   <jaas-security domain="activemq"/>

   <server configuration="file:/home/dbruscin/Workspace/temp/apache-artemis-2.11.0/broker/etc//broker.xml"/>

   <web bind="https://0.0.0.0:8161" path="web" keyStorePath="keystore.p12" keyStorePassword="123" trustStorePath="trusstore.p12" trustStorePassword="123">
       <app url="activemq-branding" war="activemq-branding.war"/>
       <app url="artemis-plugin" war="artemis-plugin.war"/>
       <app url="console" war="console.war"/>
   </web>
</broker>
  • thank you! this problem was fixed but now I have something different: "no valid keystore" whats wrong could it be with my keystore ? I generated it as a self-signed certificate and its valid still. I'll appreciate for your help – LDropl Apr 15 '20 at 13:03
  • 1
    I generated a working self-signed keystore following the steps described at https://stackoverflow.com/questions/47434877/how-to-generate-keystore-and-truststore – Domenico Francesco Bruscino Apr 15 '20 at 13:50
  • 1
    I would set the keStorePath and the trustStorePath with an absolute path using the property "${artemis.instance}", ie "${artemis.instance}/etc/keystore.p12" – Domenico Francesco Bruscino Apr 15 '20 at 14:54