Home » Bugs, Glassfish, Java, Linux

java.io.IOException: empty AVA in RDN

27 January 2009 One Comment

I get this error in the morning and eat me 1 hour from my life. I tried to install a glassfish on a new server (installed by some other third party) and ant finished with this error:

keytool error: java.io.IOException: empty AVA in RDN “”

when is trying to create domain1.

First I looked to glassfish and after at keytool from java. I tried several java JDK, but no chance … the same error spoted again and again. At a moment I “debugged” create domain command

strace -fff -s 128 ../asadmin create-domain –adminport 4848 –instanceport 8080 –user admin –passwordfile /home/user/glassfish/passfile –domainproperties orb.listener.port=3700:jms.port=7676:http.ssl.port=8181 –savelogin domain1

strace help me to extract the keytool command what asadmin create-domain is calling:

keytool -genkey -keyalg RSA -keystore /home/user/glassfish/domains/domain1/config/keystore.jks -alias s1as -dname “CN=dev.randombugs.com,,OU=Sun GlassFish Enterprise Server,O=Sun Microsystems,L=Santa Clara,ST=California,C=US” -validity 3650 -keypass changeit -storepass changeit -J-Dsun.security.internal.keytool.skid

When I looked very closer at keytool command parameters I spotted two commas after CN parameter. After I removed 1 of them keytool worked perfectly. So the problem is comming from my hostname (or /etc/hosts).   When I checked /etc/hosts I saw a line something like:   dev.randombugs.com, dev

After I removed the stupid comma from /etc/hosts glassfish installation worked perfectly.

So this error just appear because of a misspelled host name and it can appear if any parameter from “distinguish name” is misspelled. So just take care how is your host configured.

Good Luck!

One Comment »

  • Pablo said:

    Thank you very much, you solved me a great problem!! Muchas gracias, me has resuelto un problema muy grave que no me dejaba continuar.

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.