EOFException when loading keystore file

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

EOFException when loading keystore file

notoneword
I had my webapp running in secure mode with Jetty5.1.3, and I hadn't tried it
for a few days.  Since then our install started using the jdk1.4.2.08 (not sure
if that's relevant, but I think its the only thing that changed.)

Now when I try to start an HTTPS listener, I'm getting the below stack.  I'm
using the same keystore file, same passwords, same jetty jars, etc.

Anyone seen a similar error or have ideas of what to try?   I'd really
appreciate any help!!!  I've been googling my brain out - but to no avail.

I'll include my call stack in a reply to this, I kept getting warned about
top-posting when I tried to include it.



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: EOFException when loading keystore file

notoneword
Tom Cates <notoneword <at> yahoo.com> writes:

>
> I had my webapp running in secure mode with Jetty5.1.3, and I hadn't tried it
> for a few days.  Since then our install started using the jdk1.4.2.08 (not sure
> if that's relevant, but I think its the only thing that changed.)
>
> Now when I try to start an HTTPS listener, I'm getting the below stack.  I'm
> using the same keystore file, same passwords, same jetty jars, etc.
>
> Anyone seen a similar error or have ideas of what to try?   I'd really
> appreciate any help!!!  I've been googling my brain out - but to no avail.
>
> I'll include my call stack in a reply to this, I kept getting warned about
> top-posting when I tried to include it.
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Yahoo.
> Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
> Search APIs Find out how you can build Yahoo! directly into your own
> Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
> _______________________________________________
> Jetty-support mailing list
> Jetty-support <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jetty-support
>
>

and the call stack:


17:14:27.921 INFO   [Thread-0]
org.mortbay.http.SunJsseListener.createFactory(SunJsseListener.java:185) >15>
jetty.ssl.keystore=D:\install_dir/jre/bin/localhost.jks
17:14:27.921 INFO   [Thread-0]
org.mortbay.http.SunJsseListener.createFactory(SunJsseListener.java:189) >15>
jetty.ssl.password=**********
17:14:27.921 INFO   [Thread-0]
org.mortbay.http.SunJsseListener.createFactory(SunJsseListener.java:195) >15>
jetty.ssl.keypassword=**********
17:14:27.921 INFO   [Thread-0]
org.mortbay.http.SunJsseListener.createFactory(SunJsseListener.java:200) >15>
jetty.ssl.keystore.type=jks
17:14:27.921 INFO   [Thread-0]
org.mortbay.http.SunJsseListener.createFactory(SunJsseListener.java:225) >15>
jetty.ssl.keystore.provider.name=[DEFAULT]
17:14:27.921 WARN!! [Thread-0]
org.mortbay.util.ThreadedServer.start(ThreadedServer.java:518) >12> Failed to
start: Listener@0.0.0.0:8443
17:14:27.921 WARN!! [Thread-0] org.mortbay.jetty.Server.main(Server.java:438)
>08> EXCEPTION
org.mortbay.util.MultiException[java.io.EOFException]
at org.mortbay.http.HttpServer.doStart(HttpServer.java:733)
at org.mortbay.util.Container.start(Container.java:72)
at org.mortbay.jetty.Server.main(Server.java:433)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
                                (NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke
                    (DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.mortbay.start.Main.invokeMain(Main.java:151)
at org.mortbay.start.Main.start(Main.java:476)
at org.mortbay.start.Main.main(Main.java:94)
java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:268)
at java.io.DataInputStream.readFully(DataInputStream.java:242)
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:647)
at java.security.KeyStore.load(KeyStore.java:652)
at org.mortbay.http.SunJsseListener.createFactory(SunJsseListener.java:228)
at org.mortbay.http.JsseListener.newServerSocket(JsseListener.java:193)
at org.mortbay.util.ThreadedServer.open(ThreadedServer.java:477)
at org.mortbay.util.ThreadedServer.start(ThreadedServer.java:503)
at org.mortbay.http.SocketListener.start(SocketListener.java:203)
at org.mortbay.http.HttpServer.doStart(HttpServer.java:763)
at org.mortbay.util.Container.start(Container.java:72)
at org.mortbay.jetty.Server.main(Server.java:433)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
                                    (NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke
                   (DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.mortbay.start.Main.invokeMain(Main.java:151)
at org.mortbay.start.Main.start(Main.java:476)
at org.mortbay.start.Main.main(Main.java:94)
[0]=java.io.EOFException
        at java.io.DataInputStream.readFully(DataInputStream.java:268)
at java.io.DataInputStream.readFully(DataInputStream.java:242)
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:647)
at java.security.KeyStore.load(KeyStore.java:652)
at org.mortbay.http.SunJsseListener.createFactory(SunJsseListener.java:228)
at org.mortbay.http.JsseListener.newServerSocket(JsseListener.java:193)
at org.mortbay.util.ThreadedServer.open(ThreadedServer.java:477)
at org.mortbay.util.ThreadedServer.start(ThreadedServer.java:503)
at org.mortbay.http.SocketListener.start(SocketListener.java:203)
at org.mortbay.http.HttpServer.doStart(HttpServer.java:763)
at org.mortbay.util.Container.start(Container.java:72)
at org.mortbay.jetty.Server.main(Server.java:433)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
                                           (NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke
                                (DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.mortbay.start.Main.invokeMain(Main.java:151)
        at org.mortbay.start.Main.start(Main.java:476)
        at org.mortbay.start.Main.main(Main.java:94)






-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: EOFException when loading keystore file

notoneword
Hmmmm... Okay.. forget that first call-stack - that may have been due to me
running it in our local jre/bin directory.  I think the real problem was
obscured by a different error in that location.  It seems my self-signed
jks file, even though its expiration date wasnt until 2032 has crapped out.  
If I create a new one - it works fine.  Even in the jre/bin director (we've
since moved it)

Here's the call-stack I get when I move the 'outdated' keystore to its
regular home in the webapps folder:

posting call stack in next section, cuz I dont know how to do it here w/o
'top-posting'



-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: EOFException when loading keystore file

notoneword
In reply to this post by notoneword
Well, the keystore file was bad/corrupted - seems to be due to me adding it to
CVS without using the proper binary file params.

The file would work, but only for about a week.  And when I would create a new
key and replace the old one with it, the size of the new one was almost double
that of the old.  I dont quite understand that part of it yet, especially since
I'd created both files the same way.  But the reason I'm pretty convinced that
the file was corrupted by my not adding it to cvs as a binary file, is because
when I used the original JKS file from my desktop (that I had eventually
committed with cvs and was being used by the web-app) things would work okay.
While the version from cvs would no longer work.

ugh, anyway hope this will help, if anyone runs into the same problem...  






-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support