mq-create command fails with an error "keytool failed with exit code: -1"

Solution Verified - Updated -

Issue

The result of executing

mq-create --group client-group --profile client-broker client-broker

looks like

| ERROR | Thread-94        | MQServiceImpl                    | 171 - io.fabric8.fabric-core - 1.2.0.redhat-630187 | Failed to generate keystore.jks: keytool failed with exit code: -1
java.io.IOException: keytool failed with exit code: -1
        at io.fabric8.service.MQServiceImpl.createOrUpdateMQProfile(MQServiceImpl.java:142)
        at io.fabric8.core.jmx.MQManager.createOrUpdateProfile(MQManager.java:487)
        at io.fabric8.commands.MQCreateAction.doExecute(MQCreateAction.java:130)
        at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
        at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_131]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_131]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_131]
        at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_131]
        at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
        at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
        at io.fabric8.commands.$MQCreate1113057612.execute(Unknown Source)
        at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[38:org.apache.karaf.shell.console:2.4.0.redhat-630187]
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[38:org.apache.karaf.shell.console:2.4.0.redhat-630187]
        at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[38:org.apache.karaf.shell.console:2.4.0.redhat-630187]
        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[38:org.apache.karaf.shell.console:2.4.0.redhat-630187]
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[38:org.apache.karaf.shell.console:2.4.0.redhat-630187]
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[38:org.apache.karaf.shell.console:2.4.0.redhat-630187]
        at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
        at org.apache.karaf.shell.console.jline.Console.run(Console.java:197)
        at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.runConsole(ShellFactoryImpl.java:171)[156:org.apache.karaf.shell.ssh:2.4.0.redhat-630187]
        at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1$1.run(ShellFactoryImpl.java:126)
        at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_131]
        at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)[25:org.apache.karaf.jaas.modules:2.4.0.redhat-630187]
        at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.run(ShellFactoryImpl.java:124)[156:org.apache.karaf.shell.ssh:2.4.0.redhat-630187]

Environment

  • JBoss Fuse
    • 6.3.0
  • Ubuntu
    • 16.04
  • Fabric

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In