Menu

Why is the p12 folder empty?

Help
2009-10-05
2013-02-18
1 2 > >> (Page 1 of 2)
  • Anna Claramonte

    Anna Claramonte - 2009-10-05

    Hello,

    I'm just installing EJBCA in a Debian O.S. Now, I've done the **ant install** step, and when I do **ant deploy** there's an error message:

    BUILD FAILED
    /usr/lib/ejbca_3_9_0/build.xml:741: The following error occurred while executing this line:
    /usr/lib/ejbca_3_9_0/bin/jboss.xml:57: Missing JKS keystore file in '/usr/lib/ejbca_3_9_0/p12/tomcat.jks'

    I see that the p12 folder is empty, and I think that it wouldn't be this.
    Can you help me?

    Thanks,

    Anna

     
  • J

    J - 2009-10-05

    Hi Anna,

    What directory are you running this from? I see a difference between  '/usr/lib/ejbca39_0'  and '/usr/lib/ejbca390'..

    Did you see any error messages before this one during the "ant install" command?

    Best Regards,

    Johan

     
  • Anna Claramonte

    Anna Claramonte - 2009-10-05

    Hi Johan,

    the directory is ejbca_3_9_0. I don't know why it has been copied like ejbca390.
    The first time I wrote 'ant install' I think there was an error message said that there isn't any CA install. It's possible?
    How can I resolt this?
    Thanks,

    Anna

     
  • Tham Wickenberg

    Tham Wickenberg - 2009-10-05

    Hello Anna,

    Try the install again and see what errors you get. You can Paste any errors you get here and we will have a better chance of helping you!

    Tham

     
  • Tham Wickenberg

    Tham Wickenberg - 2009-10-05

    Hello Anna,

    Try the install again and see what errors you get. You can Paste any errors you get here and we will have a better chance of helping you!

    Tham

     
  • Anna Claramonte

    Anna Claramonte - 2009-10-05

    Hi Tham,

    I can't see the 'ant install' error again, but I see this (in 'ant install')

    ejbca:adminweb:

          setup setdefaultbaseurl localhost ejbca
          ra adduser tomcat serverpwd "CN=localhost,O=EJBCA Sample,C=SE" "IPAddress=127.0.0.1" "AdminCA1" null 1 JKS SERVER
          Using certificate profile: SERVER, with id: 9
          Error : Couldn't find CA in database.
          ra setclearpwd tomcat serverpwd
          Setting clear text password serverpwd for user tomcat
          javax.ejb.ObjectNotFoundException: No such entity!
          Java Result: 255
          ra adduser superadmin ejbca "CN=SuperAdmin" null "AdminCA1" null 65 USERGENERATED
          Error : Couldn't find CA in database.
          ra setclearpwd superadmin ejbca
          Setting clear text password ejbca for user superadmin
          javax.ejb.ObjectNotFoundException: No such entity!
          Java Result: 255
          0     INFO  org.ejbca.ui.cli.batch.BatchMakeP12  - Generating keys in directory /usr/lib/ejbca_3_9_0/p12.
          4     INFO  org.ejbca.ui.cli.batch.BatchMakeP12  - Generating for all NEW.
          88    INFO  org.ejbca.ui.cli.batch.BatchMakeP12  - Batch generating 0 users.
          89    INFO  org.ejbca.ui.cli.batch.BatchMakeP12  - Generating for all FAILED.
          136   INFO  org.ejbca.ui.cli.batch.BatchMakeP12  - Batch generating 0 users.

    ejbca:javatruststore:

          Getting root certificate in DER format…
          ca getrootcert 'AdminCA1' /tmp/rootca.der -der
          No CA certificate found.
          Adding to or creating keystore: /usr/lib/ejbca_3_9_0/p12/truststore.jks

    ejbca:javatruststore-removeold:

          keytool error: java.io.FileNotFoundException: /tmp/rootca.der (No such file or directory)
          java.io.FileNotFoundException: /tmp/rootca.der (No such file or directory)
          at java.io.FileInputStream.open(Native Method)
          at java.io.FileInputStream.<init>(FileInputStream.java:106)
          at java.io.FileInputStream.<init>(FileInputStream.java:66)
          at sun.security.tools.KeyTool.doCommands(KeyTool.java:803)
          at sun.security.tools.KeyTool.run(KeyTool.java:172)
          at sun.security.tools.KeyTool.main(KeyTool.java:166)
          Result: 1

    BUILD SUCCESSFUL

    Anna.

     
  • Tham Wickenberg

    Tham Wickenberg - 2009-10-05

    Hello,

    My best guess is that there is some old data in the database. Try wiping the database or use a new datasource.

    (rm -rf $JBOSS_HOME/server/default/data/hypersonic if you are using hypersonic)

    And then give 'ant install' another try.

     
  • Tham Wickenberg

    Tham Wickenberg - 2009-10-05

    Also,

    make sure you do 'ant bootstrap' and let JBoss finish the deploy before 'ant install'

    Tham

     
  • Anna Claramonte

    Anna Claramonte - 2009-10-06

    Hi,

    I put the comand that you say to me (rm -rf $JBOSS_HOME/server/default/data/hypersonic) and I have the same error when I do 'ant deploy'.

     
  • Tham Wickenberg

    Tham Wickenberg - 2009-10-06

    But did you also bootstrap and restart JBoss?

    Try this:
    Stop JBoss if its running.
    Verify that it is not running. (netstat -l | grep java) and look for any running java processes.
    Remove the old database
    ant clean
    ant bootstrap
    start JBoss
    wait for it to start up completely
    ant install

    If this works out you:
    Stop JBoss
    ant deploy
    start JBoss

    and it should be running.

     
  • Anna Claramonte

    Anna Claramonte - 2009-10-06

    Sorry, I continue with the same error and I have followed all the steps that you have said to me.

     
  • J

    J - 2009-10-06

    If you use "conf/database.properties", please provide the uncommented lines from this file.

    When you tried with Tham's suggestion, was there any errors in the JBOSS_HOME/server/default/log/server log during EJBCA deployment or the "ant install" phase?

    /Johan

     
  • nbh

    nbh - 2009-10-08

    Vaguely recalling that if your install fails then you have to start over.  Meaning that you should delete the jBoss and ejbca directories.

    If jBoss 5.x, did you do the workaround?

    For me, the headache was directly attributed to how I was starting jBoss then after accepting the defaults everything was fine.

    HTH

    nbh

     
  • Anna Claramonte

    Anna Claramonte - 2009-10-12

    Then, I have to delete the JBoss and ejbca directories and do the 'ant bootstrap' again? Or how I have to do this?
    Thanks for all,

    Anna

     
  • Tomas Gustavsson

    If you did not use a database like mysql or similar, but used the default values for the database the easiest is simply to delete JBoss directory and do ant bootstrap again.

    Regards,
    Tomas

     
  • Anna Claramonte

    Anna Claramonte - 2009-10-12

    But I have to delete all the JBoss directory? Can I uninstall JBoss and reinstall?

     
  • Tomas Gustavsson

    How did you install JBoss? Normally it's just an unzip of the jboss zip file.

     
  • Anna Claramonte

    Anna Claramonte - 2009-10-12

    Yes, sorry. You're right. I'll try it.
    Now, I've installed mysql, too. It's ok?

     
  • Tomas Gustavsson

    I would stick with default values until you have had a succesful install with default (without mysql). After that you can start trying with mysql.

    /Tomas

     
  • Anna Claramonte

    Anna Claramonte - 2009-10-13

    I can't! :'(
    I don't know how to do. I've deleted the ejbca and jboss directories and I've put it again and I've installed mysql. What does the error mean?

    BUILD FAILED /usr/lib/ejbca390/build.xml:741: The following error occurred while executing this line: /usr/lib/ejbca390/bin/jboss.xml:57: Missing JKS keystore file in '/usr/lib/ejbca39_0/p12/tomcat.jks'

     
  • J

    J - 2009-10-13

    From your previous log:

    setup setdefaultbaseurl localhost ejbca
    ra adduser tomcat serverpwd "CN=localhost,O=EJBCA Sample,C=SE" "IPAddress=127.0.0.1" "AdminCA1" null 1 JKS SERVER
      Using certificate profile: SERVER, with id: 9
      Error : Couldn't find CA in database.

    This means that no p12/tomcat.jks (SSL server keystore) was created. This happened because the initial Admin CA wasn't properly initated. Could you paste the more output from the command before this happened?

    Best Regards,
    Johan

     
  • Anna Claramonte

    Anna Claramonte - 2009-10-15

    Now it's different. Now, I can see this:

    ejbca:install:
          Initializing CA with AdminCA1 'CN=AdminCA1,O=EJBCA Sample,C=SE' soft null 2048 RSA 3650 null SHA1WithRSA conf/catoken.properties…

    ca init "AdminCA1" "CN=AdminCA1,O=EJBCA Sample,C=SE" soft null 2048 RSA 3650 null SHA1WithRSA conf/catoken.properties

          WARNING!
          WARNING: Using exportable strength crypto!
          WARNING!
          The Unlimited Strength Crypto policy files have not been installed. EJBCA may not function correctly using exportable crypto.
          Please install the Unlimited Strength Crypto policy files as documented in the Installation guide.
          Sleeping 10 seconds…
         
          Initializing CA
          Generating rootCA keystore:
          CA name: AdminCA1
          DN: CN=AdminCA1,O=EJBCA Sample,C=SE
          CA token type: soft
          CA token password: null
          Keytype: RSA
          Keyspec: 2048
          Validity (days): 3650
          Policy ID: null
          Signature alg: SHA1WithRSA
          CA token properties: null
          Signed by: self signed
          Initalizing Temporary Authorization Module.
          0     ERROR org.ejbca.ui.cli.CaInitCommand  -
          org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:160)
          at org.ejbca.core.ejb.ServiceLocator.getRemoteHome(ServiceLocator.java:85)
          at org.ejbca.ui.cli.BaseCommand.getAuthorizationSession(BaseCommand.java:274)
          at org.ejbca.ui.cli.CaInitCommand.initAuthorizationModule(CaInitCommand.java:257)
          at org.ejbca.ui.cli.CaInitCommand.execute(CaInitCommand.java:152)
          at org.ejbca.ui.cli.ca.main(ca.java:32)
          Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
          at javax.naming.InitialContext.lookup(InitialContext.java:392)
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:158)
          … 5 more
          Caused by: javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
          … 9 more
          Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
          … 10 more
          Caused by: java.net.ConnectException: Connection refused
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
          at java.net.Socket.connect(Socket.java:519)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
          … 10 more
          java.lang.RuntimeException: org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          Java Result: 255

    ejbca:adminweb:

          setup setdefaultbaseurl localhost ejbca
          4     ERROR org.ejbca.ui.cli.SetupSetBaseURLCommand  -
          org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:160)
          at org.ejbca.core.ejb.ServiceLocator.getRemoteHome(ServiceLocator.java:85)
          at org.ejbca.ui.cli.BaseCommand.getRaAdminSession(BaseCommand.java:220)
          at org.ejbca.ui.cli.SetupSetBaseURLCommand.execute(SetupSetBaseURLCommand.java:47)
          at org.ejbca.ui.cli.setup.main(setup.java:33)
          Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
          at javax.naming.InitialContext.lookup(InitialContext.java:392)
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:158)
          … 4 more
          Caused by: javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
          … 8 more
          Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
          … 9 more
          Caused by: java.net.ConnectException: Connection refused
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
          at java.net.Socket.connect(Socket.java:519)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
          … 9 more
          java.lang.RuntimeException: org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          Java Result: 255
          ra adduser tomcat serverpwd "CN=localhost,O=EJBCA Sample,C=SE" "IPAddress=127.0.0.1" "AdminCA1" null 1 JKS SERVER
          2     ERROR org.ejbca.ui.cli.RaAddUserCommand  -
          org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:160)
          at org.ejbca.core.ejb.ServiceLocator.getRemoteHome(ServiceLocator.java:85)
          at org.ejbca.ui.cli.BaseCommand.getRaAdminSession(BaseCommand.java:220)
          at org.ejbca.ui.cli.RaAddUserCommand.execute(RaAddUserCommand.java:64)
          at org.ejbca.ui.cli.ra.main(ra.java:32)
          Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
          at javax.naming.InitialContext.lookup(InitialContext.java:392)
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:158)
          … 4 more
          Caused by: javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
          … 8 more
          Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
          … 9 more
          Caused by: java.net.ConnectException: Connection refused
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
          at java.net.Socket.connect(Socket.java:519)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
          … 9 more
          java.lang.RuntimeException: org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          Java Result: 255
          ra setclearpwd tomcat serverpwd
          Setting clear text password serverpwd for user tomcat
          13    ERROR org.ejbca.ui.cli.RaSetClearPwdCommand  -
          org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:160)
          at org.ejbca.core.ejb.ServiceLocator.getRemoteHome(ServiceLocator.java:85)
          at org.ejbca.ui.cli.BaseCommand.getUserAdminSession(BaseCommand.java:201)
          at org.ejbca.ui.cli.RaSetClearPwdCommand.execute(RaSetClearPwdCommand.java:56)
          at org.ejbca.ui.cli.ra.main(ra.java:32)
          Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
          at javax.naming.InitialContext.lookup(InitialContext.java:392)
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:158)
          … 4 more
          Caused by: javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
          … 8 more
          Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
          … 9 more
          Caused by: java.net.ConnectException: Connection refused
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
          at java.net.Socket.connect(Socket.java:519)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
          … 9 more
          java.lang.RuntimeException: org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          Java Result: 255
          ra adduser superadmin ejbca "CN=SuperAdmin" null "AdminCA1" null 65 USERGENERATED
          6     ERROR org.ejbca.ui.cli.RaAddUserCommand  -
          org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:160)
          at org.ejbca.core.ejb.ServiceLocator.getRemoteHome(ServiceLocator.java:85)
          at org.ejbca.ui.cli.BaseCommand.getRaAdminSession(BaseCommand.java:220)
          at org.ejbca.ui.cli.RaAddUserCommand.execute(RaAddUserCommand.java:64)
          at org.ejbca.ui.cli.ra.main(ra.java:32)
          Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
          at javax.naming.InitialContext.lookup(InitialContext.java:392)
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:158)
          … 4 more
          Caused by: javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
          … 8 more
          Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
          … 9 more
          Caused by: java.net.ConnectException: Connection refused
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
          at java.net.Socket.connect(Socket.java:519)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
          … 9 more
          java.lang.RuntimeException: org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          Java Result: 255
          ra setclearpwd superadmin ejbca
          Setting clear text password ejbca for user superadmin
          9     ERROR org.ejbca.ui.cli.RaSetClearPwdCommand  -
          org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:160)
          at org.ejbca.core.ejb.ServiceLocator.getRemoteHome(ServiceLocator.java:85)
          at org.ejbca.ui.cli.BaseCommand.getUserAdminSession(BaseCommand.java:201)
          at org.ejbca.ui.cli.RaSetClearPwdCommand.execute(RaSetClearPwdCommand.java:56)
          at org.ejbca.ui.cli.ra.main(ra.java:32)
          Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
          at javax.naming.InitialContext.lookup(InitialContext.java:392)
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:158)
          … 4 more
          Caused by: javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
          … 8 more
          Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
          … 9 more
          Caused by: java.net.ConnectException: Connection refused
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
          at java.net.Socket.connect(Socket.java:519)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
          … 9 more
          java.lang.RuntimeException: org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          Java Result: 255
          javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
          at javax.naming.InitialContext.lookup(InitialContext.java:392)
          at org.ejbca.ui.cli.batch.BatchMakeP12.<init>(BatchMakeP12.java:128)
          at org.ejbca.ui.cli.batch.BatchMakeP12.main(BatchMakeP12.java:604)
          Caused by: javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
          … 5 more
          Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
          … 6 more
          Caused by: java.net.ConnectException: Connection refused
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
          at java.net.Socket.connect(Socket.java:519)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
          … 6 more
          Java Result: 1

    ejbca:javatruststore:

          Getting root certificate in DER format…
          ca getrootcert 'AdminCA1' /tmp/rootca.der -der
          6     ERROR org.ejbca.ui.cli.CaGetRootCertCommand  -
          org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:160)
          at org.ejbca.core.ejb.ServiceLocator.getRemoteHome(ServiceLocator.java:85)
          at org.ejbca.ui.cli.BaseCommand.getCAAdminSession(BaseCommand.java:129)
          at org.ejbca.ui.cli.BaseCaAdminCommand.getCertChain(BaseCaAdminCommand.java:66)
          at org.ejbca.ui.cli.CaGetRootCertCommand.execute(CaGetRootCertCommand.java:63)
          at org.ejbca.ui.cli.ca.main(ca.java:32)
          Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
          at javax.naming.InitialContext.lookup(InitialContext.java:392)
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:158)
          … 5 more
          Caused by: javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
          … 9 more
          Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
          … 10 more
          Caused by: java.net.ConnectException: Connection refused
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
          at java.net.Socket.connect(Socket.java:519)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
          … 10 more
          66    ERROR org.ejbca.ui.cli.CaGetRootCertCommand  - Error while getting certfificate chain from CA.
          java.lang.RuntimeException: org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.ejbca.ui.cli.BaseCommand.getCAAdminSession(BaseCommand.java:134)
          at org.ejbca.ui.cli.BaseCaAdminCommand.getCertChain(BaseCaAdminCommand.java:66)
          at org.ejbca.ui.cli.CaGetRootCertCommand.execute(CaGetRootCertCommand.java:63)
          at org.ejbca.ui.cli.ca.main(ca.java:32)
          Caused by: org.ejbca.core.ejb.ServiceLocatorException: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:160)
          at org.ejbca.core.ejb.ServiceLocator.getRemoteHome(ServiceLocator.java:85)
          at org.ejbca.ui.cli.BaseCommand.getCAAdminSession(BaseCommand.java:129)
          … 3 more
          Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out  [Root exception is javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]]
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
          at javax.naming.InitialContext.lookup(InitialContext.java:392)
          at org.ejbca.core.ejb.ServiceLocator.getObject(ServiceLocator.java:158)
          … 5 more
          Caused by: javax.naming.CommunicationException: Failed to connect to server /127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099 ]
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)
          at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
          … 9 more
          Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /127.0.0.1:1099
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)
          … 10 more
          Caused by: java.net.ConnectException: Connection refused
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
          at java.net.Socket.connect(Socket.java:519)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
          at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
          at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
          … 10 more
          No CA certificate found.
          Adding to or creating keystore: /usr/lib/ejbca_3_9_0/p12/truststore.jks

    ejbca:javatruststore-removeold:

          keytool error: java.io.FileNotFoundException: /tmp/rootca.der (No such file or directory)
          java.io.FileNotFoundException: /tmp/rootca.der (No such file or directory)
          at java.io.FileInputStream.open(Native Method)
          at java.io.FileInputStream.<init>(FileInputStream.java:106)
          at java.io.FileInputStream.<init>(FileInputStream.java:66)
          at sun.security.tools.KeyTool.doCommands(KeyTool.java:803)
          at sun.security.tools.KeyTool.run(KeyTool.java:172)
          at sun.security.tools.KeyTool.main(KeyTool.java:166)
          Result: 1

    BUILD SUCCESSFUL
    Total time: 1 minute 18 seconds

    Sorry for the too long message.

    Thanks,

    Anna

     
  • J

    J - 2009-10-15

    Ok.. "WARNING: Using exportable strength crypto!" means that you haven't properly install the strong JCE crypto policy files. (http://www.ejbca.org/installation.html#Prerequisites)

    The other exceptions means that the install script cannot contact the bootstrapped code running in the application server. Did you start JBoss and wait for it to settle before you ran this?

    Best Regards,
    Johan

     
  • Anna Claramonte

    Anna Claramonte - 2009-10-19

    I installed JCE crypto policy files. I don't know why it says this. Maybe I've put the .jar in the wrong folder. Where I have to put local_policy.jar and US_export_policy.jar?

     
  • Tomas Gustavsson

    If you are running on windows you may have to put it in two places, under jdk/li/security and jre/lib/security. Just search for where the original files are and replace all of those.

    Cheers,
    Tomas


    PrimeKey Solutions offers a commercial EJBCA support subscription and training for EJBCA. <br/>
    Please see www.primekey.se or contact info@primekey.se for more information.<br/>
    http://www.primekey.se/Services/Support/<br/>
    http://www.primekey.se/Services/Training/

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.