vladdyd | 8 Feb 18:10
Picon
Favicon

[jetty-user] Getting org.mortbay.jetty.EofException when writing to a response

Hi,

I am using jetty 6.1.23 within eclipse RAP (Rich Ajax Platform 1.3.2).  I am
sending a PNG image to the browser.  This is the code that I am executing:

byte[] imageBytes = new byte[outputSize];
response.setContentType(application.getMimeType(".png"));
response.setContentLength(outputSize);
response.setHeader("Cache-Control", "no-cache"); 
response.setDateHeader("Expires", 0); 
response.setHeader("Pragma", "no-cache"); 
response.setDateHeader("Max-Age", 0); 
ServletOutputStream servletoutputstream = response.getOutputStream();

servletoutputstream.write(imageBytes);===>*THIS CALL THROWS
org.mortbay.jetty.EofException.  The full exception trace is shown at the
bottom. *

servletoutputstream.flush();

When the exception gets thrown, image does not get displayed at all at the
client's browser end!!  What is going on? What can I do fix it or at least
have a workaround? Any advise is needed.  Please help me asap since this is
an urgent project.

This is the full exception trace:

08 Feb 2012 11:49:08,955 ERROR [1584291438 <at> qtp-2135195460-260] plugin.sda - 
org.mortbay.jetty.EofException
	at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:789)
(Continue reading)

KwanKin Yau | 9 Feb 04:56

[jetty-user] How to determine port of the jetty listen on

Hi,

I am using jetty as local http server in a RCP application(embedded via 
org.eclipse.equinox.http.jetty), but I can't specified the listen port 
fixedly, so my application want to runs without 
"-Dorg.eclipse.equinox.http.jetty.http.port=" vm argument, but how to 
know that when the jetty was started successfully and which port it was 
listen on?

--

-- 
邱关坚
KwanKin Yau

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Something Something | 13 Feb 07:08
Picon

[jetty-user] Http request timeout?

I have developed an application using Jetty.  It's working well, but sometimes processing incoming requests such as GET, POST take too long because of the slowness in the business layer.

We have decided that if a request is taking too long we will terminate the request.  To accomplish this I need to add a timeout to all the incoming http requests.  I tried doing this:

        jetty = new Server(port);
        Connector connector = jetty.getConnectors()[0];
        connector.setMaxIdleTime(5000);

thinking that this will timeout all the http requests after 5 seconds, but it's not working :(


How do I timeout the httprequest in Jetty?

Thanks for your help.


Sujatha Rangarajan | 13 Feb 19:28
Picon

[jetty-user] Jetty http thread pool limitation

Jetty - V7.1.6

I have the following

jetty.threadpool.max = 50
jetty.http.acceptors = 4

I run my application and subject it under some load. I have a JMX bean
for " org.eclipse.jetty.util.thread.QueuedThreadPool" and I keep
refreshing it every 2 seconds.

I do observe that the "threads" is always between 30-45 and the
idleThreads is between 25-40. Alarmingly the difference between the
"threads" and "idleThreads" always seems to be 5.

This suggests to me that although I have four acceptors for accepting
http based traffic and I have a thread pool of 50 threads there is
definitely something else that is limiting the ability to serve
requests and it is only 5 max. There is noticeable degradation in that
after ramping up a few users the system becomes unresponsive.

Can someone shed some light on what could possibly be happening?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Jaya | 14 Feb 06:08
Favicon

[jetty-user] Running Jetty On Https

I was trying to run jetty on https.

I was following this site http://
http://docs.codehaus.org/display/JETTY/How+to+configure+SSL http://
http://docs.codehaus.org/display/JETTY/How+to+configure+SSL 

When i tried to run the following command
openssl x509 -in jetty.der -inform DER -outform PEM -out jetty.crt

I got the following error 
Error opening Certificate jetty.der
3207:error:02001002:system library:fopen:No such file or
directory:bss_file.c:356:fopen('jetty.der','r')
3207:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:358:
unable to load certificate

And when i tried with  following command
java -classpath
$JETTY_HOME/lib/jetty-util-7.3.1.v20110307.jar:$JETTY_HOME/lib/jetty-6.1-SNAPSHOT.jar
org.eclipse.jetty.security.PKCS12Import jetty.pkcs12 keystore

I got following exception
Exception in thread "main" java.lang.NoClassDefFoundError:
org/eclipse/jetty/security/PKCS12Import
Caused by: java.lang.ClassNotFoundException:
org.eclipse.jetty.security.PKCS12Import
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.eclipse.jetty.security.PKCS12Import. 
Program will exit.

Please help me to solve these issues.

Thanks and Regards,
Jaya

--
View this message in context: http://jetty.4.n6.nabble.com/Running-Jetty-On-Https-tp4467579p4467579.html
Sent from the Jetty Support mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Joakim Erdfelt | 14 Feb 15:33
Favicon

Re: [jetty-user] Running Jetty On Https

docs.codehaus.org are for Jetty 6.x only.

I can see from your example command lines you are mixing Jetty 6.x and Jetty 7.x.

You'll have more luck following the instructions at http://wiki.eclipse.org/Jetty/Howto/Configure_SSL

--
Joakim Erdfelt

(the people behind jetty and cometd)



On Mon, Feb 13, 2012 at 10:08 PM, Jaya <jaya <at> confluxtechnologies.com> wrote:
I was trying to run jetty on https.

I was following this site http://
http://docs.codehaus.org/display/JETTY/How+to+configure+SSL http://
http://docs.codehaus.org/display/JETTY/How+to+configure+SSL

When i tried to run the following command
openssl x509 -in jetty.der -inform DER -outform PEM -out jetty.crt

I got the following error
Error opening Certificate jetty.der
3207:error:02001002:system library:fopen:No such file or
directory:bss_file.c:356:fopen('jetty.der','r')
3207:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:358:
unable to load certificate

And when i tried with  following command
java -classpath
$JETTY_HOME/lib/jetty-util-7.3.1.v20110307.jar:$JETTY_HOME/lib/jetty-6.1-SNAPSHOT.jar
org.eclipse.jetty.security.PKCS12Import jetty.pkcs12 keystore

I got following exception
Exception in thread "main" java.lang.NoClassDefFoundError:
org/eclipse/jetty/security/PKCS12Import
Caused by: java.lang.ClassNotFoundException:
org.eclipse.jetty.security.PKCS12Import
       at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.eclipse.jetty.security.PKCS12Import.
Program will exit.

Please help me to solve these issues.


Thanks and Regards,
Jaya


--
View this message in context: http://jetty.4.n6.nabble.com/Running-Jetty-On-Https-tp4467579p4467579.html
Sent from the Jetty Support mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Jaya | 16 Feb 05:27
Favicon

[jetty-user] Enable https on jetty

Hi All,

I am using
jetty-distribution-7.3.1.v20110307.
ubuntu-10
I am  trying to enable https on jetty.
And I am refering
http://docs.codehaus.org/display/JETTY/How+to+configure+SSL.

I am getting  following errors:

  keytool -keystore keystore -import -alias jetty -file jetty.crt 
  Enter keystore password:  
  keytool error: java.lang.Exception: Public keys in reply and keystore
don't match

  openssl x509 -in jetty.der -inform DER -outform PEM -out jetty.crt
  Error opening Certificate jetty.der
  2409:error:02001002:system library:fopen:No such file or
directory:bss_file.c:356:fopen('jetty.der','r')
  2409:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:358:
  unable to load certificate

If anybody has tried to enable https on jetty,please help me out to solve
these issues.

Thanks and Regards,
Jaya

--
View this message in context: http://jetty.4.n6.nabble.com/Enable-https-on-jetty-tp4474753p4474753.html
Sent from the Jetty Support mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Jesse McConnell | 17 Feb 16:32
Picon
Gravatar

[jetty-user] Jetty 7.6.1 and 8.1.1 released!

I have released an incremental update to the jetty 7.6 and 8.1
releases from a few weeks back.

Eclipse:
http://download.eclipse.org/jetty/

Codehaus:
http://dist.codehaus.org/jetty/

Of particular note in these releases are a fix to usage of the --exec
in the start.ini, it was largely broken in the last release generating
some incorrect paths and then a few fixes to the nosql mongo session
handling.

cheers,
jesse

jetty-7.6.1.v20120215 - 15 February 2012
 + 369121 simplified test
 + 370120 jvm arguments added via start.ini and --exec are missing spaces
 + 370137 SslContextFactory does not respect order for
   [included|excluded]Protocols() and [included|excluded]CipherSuites().
 + 370368 resolve stack overflow in mongo db session manager
 + 370386 Remove META-INF from jetty distro
 + 371040 nosqlsession needs to call correct super contructor for new sessions
 + 371041 valid was not being set to new mongo db sessions, and the call to
   mongodb api was wrong in isIdInUse
 + 371162 NPE protection for nested security handlers
 + JETTY-1484 Add option for HashSessionManager to delete session files if it
   can't restore them

jetty <at> codehaus-7.6.1.v20120215 - 15 February 2012
 + 370386 Remove META-INF from hightide distro
 + JETTY-1480 jspc-maven-plugin does not find jstl tags
 + JETTY-1481 Change jetty-atomikos to be type jar so its dependencies can be
   used in jetty-hightide
 + JETTY-1482 fix path in setuid configuration

jetty-8.1.1.v20120215 - 15 February 2012
 + 369121 simplified test
 + 370120 jvm arguments added via start.ini and --exec are missing spaces
 + 370137 SslContextFactory does not respect order for
   [included|excluded]Protocols() and [included|excluded]CipherSuites().
 + 370368 resolve stack overflow in mongo db session manager
 + 370386 Remove META-INF from jetty distro
 + 371040 nosqlsession needs to call correct super contructor for new sessions
 + 371041 valid was not being set to new mongo db sessions, and the call to
   mongodb api was wrong in isIdInUse
 + 371162 NPE protection for nested security handlers
 + JETTY-1484 Add option for HashSessionManager to delete session files if it
   can't restore them

jetty <at> codehaus-8.1.1.v20120215 - 15 February 2012
 + 370386 Remove META-INF from hightide distro
 + JETTY-1480 jspc-maven-plugin does not find jstl tags
 + JETTY-1481 Change jetty-atomikos to be type jar so its dependencies can be
   used in jetty-hightide
 + JETTY-1482 fix path in setuid configuration

--
jesse mcconnell
jesse.mcconnell <at> gmail.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Jesse McConnell | 18 Feb 01:14
Picon
Gravatar

[jetty-user] Re: Jetty 7.6.1 and 8.1.1 released!

Heads up...

Something I should have mentioned on this release is that we have
addressed some build issues we had regarding signed jars in eclipse
orbit that we had to pull in for distribution.  These dependencies
used to be pulled into the jetty-distribution through some ant magic
and have not been what was referenced via maven transitive
dependencies.  If you only use the jetty-distribution or
jetty-hightide, you can stop reading now.

If you use jetty via maven or especially if you explode the
dependencies via the maven dependency plugin you will likely see an
issue about signed classes.  This might come out of now where and
surprise you.  You should be able to just exclude the ECLIPSE.RSA and
ECLIPSE.SF files and be fine.  Or you can exclude the
org.eclipse.jetty.orbit groupId from the transitive dependencies and
track down unsigned dependencies manually.

For some more history you can see this issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=371954

Thanks to bubbleguuum for pointing this out!
jesse

--
jesse mcconnell
jesse.mcconnell <at> gmail.com

On Fri, Feb 17, 2012 at 09:32, Jesse McConnell
<jesse.mcconnell <at> gmail.com> wrote:
> I have released an incremental update to the jetty 7.6 and 8.1
> releases from a few weeks back.
>
> Eclipse:
> http://download.eclipse.org/jetty/
>
> Codehaus:
> http://dist.codehaus.org/jetty/
>
> Of particular note in these releases are a fix to usage of the --exec
> in the start.ini, it was largely broken in the last release generating
> some incorrect paths and then a few fixes to the nosql mongo session
> handling.
>
> cheers,
> jesse
>
>
> jetty-7.6.1.v20120215 - 15 February 2012
>  + 369121 simplified test
>  + 370120 jvm arguments added via start.ini and --exec are missing spaces
>  + 370137 SslContextFactory does not respect order for
>   [included|excluded]Protocols() and [included|excluded]CipherSuites().
>  + 370368 resolve stack overflow in mongo db session manager
>  + 370386 Remove META-INF from jetty distro
>  + 371040 nosqlsession needs to call correct super contructor for new sessions
>  + 371041 valid was not being set to new mongo db sessions, and the call to
>   mongodb api was wrong in isIdInUse
>  + 371162 NPE protection for nested security handlers
>  + JETTY-1484 Add option for HashSessionManager to delete session files if it
>   can't restore them
>
> jetty <at> codehaus-7.6.1.v20120215 - 15 February 2012
>  + 370386 Remove META-INF from hightide distro
>  + JETTY-1480 jspc-maven-plugin does not find jstl tags
>  + JETTY-1481 Change jetty-atomikos to be type jar so its dependencies can be
>   used in jetty-hightide
>  + JETTY-1482 fix path in setuid configuration
>
> jetty-8.1.1.v20120215 - 15 February 2012
>  + 369121 simplified test
>  + 370120 jvm arguments added via start.ini and --exec are missing spaces
>  + 370137 SslContextFactory does not respect order for
>   [included|excluded]Protocols() and [included|excluded]CipherSuites().
>  + 370368 resolve stack overflow in mongo db session manager
>  + 370386 Remove META-INF from jetty distro
>  + 371040 nosqlsession needs to call correct super contructor for new sessions
>  + 371041 valid was not being set to new mongo db sessions, and the call to
>   mongodb api was wrong in isIdInUse
>  + 371162 NPE protection for nested security handlers
>  + JETTY-1484 Add option for HashSessionManager to delete session files if it
>   can't restore them
>
> jetty <at> codehaus-8.1.1.v20120215 - 15 February 2012
>  + 370386 Remove META-INF from hightide distro
>  + JETTY-1480 jspc-maven-plugin does not find jstl tags
>  + JETTY-1481 Change jetty-atomikos to be type jar so its dependencies can be
>   used in jetty-hightide
>  + JETTY-1482 fix path in setuid configuration
>
>
>
> --
> jesse mcconnell
> jesse.mcconnell <at> gmail.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Uday Subbarayan | 26 Feb 22:49
Picon
Favicon

[jetty-user] Rabbit MQ

Hi All,
[ I did some web search and did not get any answer. So checking mailing list]

I am exploring Jetty as a connector to connect a legacy C++ application with Rabbit MQ. The idea is to create an embedded Jetty server which will listen for messages from Rabbit MQ and will invoke the C++ application as a separate process with input from MQ message. It will then publish message to Rabbit MQ after C++ application completes its task.

Questions:
a) Has any one integrated Jetty with Rabbit MQ?
b) Has any one done any similar work?

Thanks,
-Uday. 

Gmane