You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jacek Laskowski <ja...@japila.pl> on 2011/09/02 23:51:16 UTC

G 2.2.1/Tomcat throws Unable to decrypt on Mac OS X

Hi,

I'm on Mac OS X and to my great surprise I couldn't run it right from
the shell prompt with JAVA_HOME=`/usr/libexec/java_home`
./bin/geronimo.sh run -vv. What am I doing wrong? I've seen a couple
of issues like this, but was unable to find a solution. What's the
solution?

jacek:~/apps/geronimo-tomcat6-javaee5-2.2.1
$ uname -a
Darwin devmac.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7
16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
jacek:~/apps/geronimo-tomcat6-javaee5-2.2.1
$ echo $JAVA_HOME

jacek:~/apps/geronimo-tomcat6-javaee5-2.2.1
$ env | grep -i java
PATH=/Users/jacek/apps/gradle/bin:/Users/jacek/apps/grails/bin:/Users/jacek/apps/pax-runner/bin:/Users/jacek/apps/pax-construct/bin:/Users/jacek/apps/seam/forge/bin:/Users/jacek/apps/scala/bin:/Users/jacek/apps/jruby/bin:/Users/jacek/apps/geronimo/bin:/Users/jacek/apps/groovy/bin:/Users/jacek/apps/bin:/usr/local/appengine-java-sdk/bin/:/opt/local/bin:/opt/local/sbin:/usr/local/fsharp/bin:/Users/jacek/apps/maven/bin:/usr/local/gwt:/usr/local/glassfish/bin:/Users/jacek/apps/mysql/bin:/usr/local/grails/bin:/usr/local/groovy/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/opt/local/bin
PWD=/Users/jacek/apps/geronimo-tomcat6-javaee5-2.2.1
jacek:~/apps/geronimo-tomcat6-javaee5-2.2.1
$ JAVA_HOME=`/usr/libexec/java_home` ./bin/geronimo.sh run -vv
Using GERONIMO_HOME:   /Users/jacek/apps/geronimo-tomcat6-javaee5-2.2.1
Using GERONIMO_TMPDIR: var/temp
Using JRE_HOME:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
23:47:59,038 INFO  [AbstractGBeanReference] GBean references are not
using proxies
23:47:59,443 INFO  [MultiParentClassLoader] ClassLoading behaviour has
changed.  The Original Classloading mode is in effect.  If you are
experiencing a problem
you can change the behaviour by specifying
-DXorg.apache.geronimo.kernel.config.MPCLSearchOption= property.
Specify
="safe" to revert to the original behaviour.  This is a temporary
change until we decide whether or not to make it
permanent for the 2.0 release
2011-09-02 23:48:00,505 INFO  [Log4jService]
----------------------------------------------
2011-09-02 23:48:00,505 INFO  [Log4jService] Started Logging Service
2011-09-02 23:48:00,505 INFO  [Log4jService] Runtime Information:
2011-09-02 23:48:00,506 INFO  [Log4jService]   Install Directory =
/Users/jacek/apps/geronimo-tomcat6-javaee5-2.2.1
2011-09-02 23:48:00,508 INFO  [JvmVendor] Sun JVM 1.6.0_26
2011-09-02 23:48:00,508 INFO  [Log4jService]   JVM in use        = Sun
JVM 1.6.0_26
2011-09-02 23:48:00,508 INFO  [Log4jService] Java Information:
2011-09-02 23:48:00,508 INFO  [Log4jService]   System property
[java.runtime.name]     = Java(TM) SE Runtime Environment
2011-09-02 23:48:00,509 INFO  [Log4jService]   System property
[java.runtime.version]  = 1.6.0_26-b03-384-10M3425
2011-09-02 23:48:00,509 INFO  [Log4jService]   System property
[os.name]               = Mac OS X
2011-09-02 23:48:00,509 INFO  [Log4jService]   System property
[os.version]            = 10.6.8
2011-09-02 23:48:00,509 INFO  [Log4jService]   System property
[sun.os.patch.level]    = unknown
2011-09-02 23:48:00,510 INFO  [Log4jService]   System property
[os.arch]               = x86_64
2011-09-02 23:48:00,510 INFO  [Log4jService]   System property
[java.class.version]    = 50.0
2011-09-02 23:48:00,511 INFO  [Log4jService]   System property
[locale]                = en_US
2011-09-02 23:48:00,511 INFO  [Log4jService]   System property
[unicode.encoding]      = UnicodeLittle
2011-09-02 23:48:00,511 INFO  [Log4jService]   System property
[file.encoding]         = MacRoman
2011-09-02 23:48:00,511 INFO  [Log4jService]   System property
[java.vm.name]          = Java HotSpot(TM) 64-Bit Server VM
2011-09-02 23:48:00,512 INFO  [Log4jService]   System property
[java.vm.vendor]        = Apple Inc.
2011-09-02 23:48:00,512 INFO  [Log4jService]   System property
[java.vm.version]       = 20.1-b02-384
2011-09-02 23:48:00,512 INFO  [Log4jService]   System property
[java.vm.info]          = mixed mode
2011-09-02 23:48:00,512 INFO  [Log4jService]   System property
[java.home]             =
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
2011-09-02 23:48:00,512 INFO  [Log4jService]   System property
[java.classpath]        = null
...
2011-09-02 23:48:01,962 INFO  [KernelContextGBean] bound gbean
org.apache.geronimo.framework/rmi-naming/2.2.1/car?ServiceModule=org.apache.geronimo.framework/rmi-naming/2.2.1/car,j2eeType=Context,name=GeronimoContext
at name ger:
2011-09-02 23:48:02,447 ERROR [AbstractEncryption] Unable to decrypt
java.io.EOFException
	at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2280)
	at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)
	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:279)
	at org.apache.geronimo.crypto.AbstractEncryption.decrypt(AbstractEncryption.java:76)
	at org.apache.geronimo.crypto.EncryptionManager.decrypt(EncryptionManager.java:109)
	at org.apache.geronimo.system.plugin.PluginRepositoryDownloader.loadUserRepositories(PluginRepositoryDownloader.java:122)
	at org.apache.geronimo.system.plugin.PluginRepositoryDownloader.<init>(PluginRepositoryDownloader.java:80)
...
2011-09-02 23:48:04,518 ERROR [AbstractEncryption] Unable to decrypt
java.io.EOFException
	at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2280)
	at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)
	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:279)
	at org.apache.geronimo.crypto.AbstractEncryption.decrypt(AbstractEncryption.java:76)
	at org.apache.geronimo.crypto.EncryptionManager.decrypt(EncryptionManager.java:109)
	at org.apache.geronimo.gbean.annotation.EncryptionSetting$1.decrypt(EncryptionSetting.java:33)
	at org.apache.geronimo.system.configuration.GBeanOverride.getValue(GBeanOverride.java:416)
	at org.apache.geronimo.system.configuration.GBeanOverride.applyOverrides(GBeanOverride.java:367)
	at org.apache.geronimo.system.configuration.LocalAttributeManager.setAttributes(LocalAttributeManager.java:228)
	at org.apache.geronimo.system.configuration.LocalAttributeManager.applyOverrides(LocalAttributeManager.java:197)
	at org.apache.geronimo.kernel.config.Configuration.<init>(Configuration.java:297)
...
2011-09-02 23:48:04,650 INFO  [Log4jService] Stopping Logging Service
2011-09-02 23:48:04,654 INFO  [Log4jService]
----------------------------------------------

Jacek

-- 
Jacek Laskowski
Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl

Re: G 2.2.1/Tomcat throws Unable to decrypt on Mac OS X

Posted by Jacek Laskowski <ja...@japila.pl>.
On Sat, Sep 3, 2011 at 11:43 PM, Kevan Miller <ke...@gmail.com> wrote:

>So, you may want to start with a fresh install.

That was it. I can't find out what made the installation broken, but
once I removed and reinstalled it, Geronimo runs fine now. Thanks!

Jacek

-- 
Jacek Laskowski
Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl

Re: G 2.2.1/Tomcat throws Unable to decrypt on Mac OS X

Posted by Kevan Miller <ke...@gmail.com>.
On Sep 2, 2011, at 5:51 PM, Jacek Laskowski wrote:

> Hi,
> 
> I'm on Mac OS X and to my great surprise I couldn't run it right from
> the shell prompt with JAVA_HOME=`/usr/libexec/java_home`
> ./bin/geronimo.sh run -vv. What am I doing wrong? I've seen a couple
> of issues like this, but was unable to find a solution. What's the
> solution?

Hi Jacek,
I haven't had enough time to upgrade to 10.8. So, still on 10.7.  

$ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home ~/Servers/geronimo-tomcat6-javaee5-2.2.1/bin/geronimo.sh run

works for me. I've never used /usr/libexec/java_home, but 

$ JAVA_HOME=`/usr/libexec/java_home` ~/Servers/geronimo-tomcat6-javaee5-2.2.1/bin/geronimo.sh run

is working, also.

I'm guessing that something is wrong with the JAVA_HOME/JRE_HOME setting. geronimo.sh is calculating the location of the SDK lib/ext directory, but it's not matching your install. For me:

$ ls `/usr/libexec/java_home`/lib/ext     
apple_provider.jar      dnsns.jar               localedata.jar          sunjce_provider.jar     sunpkcs11.jar

There can be problems where starting Geronimo with a bad JAVA_HOME setting can cause obfuscated passwords in our config files to be improperly encrypted (so they can not be decrypted). So, you may want to start with a fresh install.

--kevan