Joel B | 8 Jun 2011 19:38
Picon
Favicon

[jetty-user] Range request headers

I'm writing a Roku app that plays music from Subsonic which is an app that uses Jetty to stream music. 

The roku won't play mp3 or m4a files from subsonic that contain embedded album cover art, but it will play the
same files streamed from an apache server.

 Roku's support people tell me that this is due to not getting a proper response to the Range requests to be
able to skip the artwork and play the audio data. 

Is there a bug in Jettys range request system? I saw some old threads about PDFs that were not loading due to
some problem like this. 

Not sure how to address this issue and figure out exactly what is different about Jetty bs Apache.

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

    http://xircles.codehaus.org/manage_email

Michael Gorovoy | 8 Jun 2011 20:03
Gravatar

Re: [jetty-user] Range request headers

Please open a ticket (Bugzilla for Jetty 7, JIRA for Jetty 6) based on the Jetty version that is embedded in Subsonic, with tcpdump (wireshark or similar) attached showing the failed attempt to play a file in question.


-Michael

On Wed, Jun 8, 2011 at 1:38 PM, Joel B <onephatcat <at> earthlink.net> wrote:
I'm writing a Roku app that plays music from Subsonic which is an app that uses Jetty to stream music.

The roku won't play mp3 or m4a files from subsonic that contain embedded album cover art, but it will play the same files streamed from an apache server.

 Roku's support people tell me that this is due to not getting a proper response to the Range requests to be able to skip the artwork and play the audio data.

Is there a bug in Jettys range request system? I saw some old threads about PDFs that were not loading due to some problem like this.

Not sure how to address this issue and figure out exactly what is different about Jetty bs Apache.

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

   http://xircles.codehaus.org/manage_email



Joel B | 8 Jun 2011 23:44
Picon
Favicon

Re: [jetty-user] Range request headers

Hi Michael, 

I created bug Jetty-1381 and attached 4 tcpdumps, one for m4a playback, one for mp3 playback, and a pair of simultaneous dumps, one from the roku itself, and the other from the Subsonic/Jetty system.

Subsonic lists the jetty version as 6.1.x dont know what the  "x" is.

If you wish to test against my system send me an email.

-Joel



Let me know if you need anything else

Sent from my iPhone

On Jun 8, 2011, at 11:03 AM, Michael Gorovoy <michael <at> webtide.com> wrote:

Please open a ticket (Bugzilla for Jetty 7, JIRA for Jetty 6) based on the Jetty version that is embedded in Subsonic, with tcpdump (wireshark or similar) attached showing the failed attempt to play a file in question.

-Michael

On Wed, Jun 8, 2011 at 1:38 PM, Joel B <onephatcat <at> earthlink.net> wrote:
I'm writing a Roku app that plays music from Subsonic which is an app that uses Jetty to stream music.

The roku won't play mp3 or m4a files from subsonic that contain embedded album cover art, but it will play the same files streamed from an apache server.

 Roku's support people tell me that this is due to not getting a proper response to the Range requests to be able to skip the artwork and play the audio data.

Is there a bug in Jettys range request system? I saw some old threads about PDFs that were not loading due to some problem like this.

Not sure how to address this issue and figure out exactly what is different about Jetty bs Apache.

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

   http://xircles.codehaus.org/manage_email



Joel B | 22 Jun 2011 05:00
Picon
Favicon

[jetty-user] HLS with Jetty?

Does anyone know of any modules or plugins that might allow HTTP live streaming using Jetty?

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

    http://xircles.codehaus.org/manage_email

Arjun Panday | 22 Jun 2011 10:25
Favicon

[jetty-user] Static content with authentication?

Hi all,

I'm looking for way to configure the DefaultServlet used to serve static 
content on disk, so that it uses a form based authentication.

Here's what I have:
- an (embedded) jetty server, with 2 connectors: 1 private IP using 
regular HTTP, 1 public IP using HTTPS
- some webapps are served on the public IP and require authentication
- some webapps are served on the private IP and require no authentication

So far so good, but my server is also used to serve static disk content 
(not packaged in webapps) and i need the same :
- some static content is needed on the private IP without authent'
- some static content is needed on the public IP with authent'

I am able to serve the static content on the private IP by specifying 
the connector name as explained here 
http://docs.codehaus.org/display/JETTY/Static+Content and here 
http://wiki.eclipse.org/Jetty/Howto/WebappPerConnector

But I can't find a way to specify the security-constraint and 
login-config for the public static content.

Alternatively I could map the DefaultServlet from a webapp (so as to 
have a web.xml) but then how can I serve static content? Setting the 
resourceBase init-param to an absolute path doesn't seem to work (not to 
mention the use of an environment variable for the root path).

I hope my question is clear and someone can help,
Thanks,
Arjun

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

    http://xircles.codehaus.org/manage_email

Dale Gallagher | 22 Jun 2011 15:12
Picon

[jetty-user] Jetty unexpectedly shuts down

Hello everyone

A Jetty application is deployed on a server of mine, but keeps on
terminating, with little understandable evidence as to why. Any help
in resolving this would be greatly appreciated.

Details:

OS:

  Slackware Linux 13.1
  Linux 2.6.32.16 running as Xen guest OS

Java info:

  java version "1.6.0_20"
  Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
  Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

nginx 0.7.67 config (only pertinent items):

location /app {
    proxy_pass                 http://localhost:50013;
    proxy_set_header        X-Real-IP $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        Host $http_host;
  }

The Jetty app is launched via daemontools in a run file containing:

#!/bin/sh
cd /path/to/app
exec setuidgid userXYZ /usr/lib/java/bin/java -server -verbose -jar ./app.jar

There is no evidence in the log as to why it sporadically shuts down
(after which daemontools starts it again).

Obviously, when using in-memory sessions, this is not ideal, as users'
sessions terminate.

So, I ran the app using strace, without daemontools and the output can
be found here:

http://pastebin.com/ZKCMWVQM

Thanks
Dale

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

    http://xircles.codehaus.org/manage_email

Yves Schubert | 22 Jun 2011 15:25

Re: [jetty-user] Jetty unexpectedly shuts down

Hi There!

I have some data to add to the previous post (i build that
application, which is hosted on dale's server):

- The application is a standalone Application that starts an embedded
Jetty (Jetty Hightide 6.1.H.22).
- Libs uses are:

jetty-6.1.H.22-jar
jetty-naming-6.1.H.22.jar
jetty-plus-6.1.H.22.jar
jetty-util-6.1.H.22.jar

(of course plus any dependent libraries)

- The application is connected to a postresql database via hibernate.

Running on my testsystem (which is also a linux machine) all works
fine without any sudden shut downs.

There is no exception occuring, and no other output.

Perhaps one of you guys can give a hint. Thanks for that!

Best Regards,

Yves

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

    http://xircles.codehaus.org/manage_email

Pinney Colton | 22 Jun 2011 16:23
Picon

[jetty-user] ClassLoader issues

I am very new to Jetty and have been struggling with what I thought was a pretty simple proof-of-concept.  I am unable to instantiate an object of class org.apache.lucene.util.OpenBitSet in main (below), despite including it in my import statements.  I am savvy enough to know the issue is a ClassLoader problem and not an issue with my Classpath, but I have been unable to solve the problem.  I attempted to solve it using the first line of code in main():


Thread.currentThread().setContextClassLoader(WebAppClassLoader.class.getClassLoader());

Exception:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/lucene/util/OpenBitSet
        at DataWarehouse.ActionHandler.main(ActionHandler.java:52)
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.util.OpenBitSet
        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:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        ... 1 more

Full code here:

package DataWarehouse;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
import java.io.IOException;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.handler.AbstractHandler;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.apache.lucene.util.OpenBitSet;
import java.lang.ClassLoader;
import org.eclipse.jetty.webapp.WebAppClassLoader;

public class ActionHandler extends AbstractHandler
{
        public void handle( String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException
        {
                response.setContentType( "text/html;charset=utf-8" );
                response.setStatus( HttpServletResponse.SC_OK );
                baseRequest.setHandled( true );
                String resp;
                if ( request.getQueryString().equals( "execute" ) )
                {
                        resp = doExecute( request );
                }
                else
                {
                        resp = "Invalid action.";
                }
                response.getWriter().println( resp );
        }

        public String doExecute( HttpServletRequest request )
        {
                String r = "";
                Script s = new Script();
                try
                {
                        r = s.execute( request.getParameter( "content" ) );
                }
                catch( Exception e )
                {
                        r = "<pre>" + e.getMessage() + "</pre>";
                }
                return r;
        }

        public static void main( String[] args ) throws Exception
        {
                Thread.currentThread().setContextClassLoader(WebAppClassLoader.class.getClassLoader());
                OpenBitSet bs = new OpenBitSet();
                Server server = new Server( 8080 );
                ContextHandler context = new ContextHandler();
                context.setContextPath( "/" );
                context.setResourceBase( "." );
                server.setHandler( context );
                context.setHandler( new ActionHandler() );
                server.start();
                server.join();
        }
}


Cemal | 23 Jun 2011 09:52
Picon

[jetty-user] Reverse http feature

Is there anyone who can help me to configure jetty maven plugin to use reverse http feature. (Since Jetty 7.4 this feature is avaliable.)

Thanks
Arjun Panday | 23 Jun 2011 16:44
Favicon

Re: [jetty-user] Static content with authentication?

Ok, I got it.

I use a webapp context instead of the servlet context, and override the webdefault.xml to specify my security constraints.

<Configure class="org.mortbay.jetty.webapp.WebAppContext">
  <Set name="contextPath">/doc</Set>
  <Set name="war"><SystemProperty name="JETTY_HOME" default="."/>/doc</Set>
  <Set name="extractWAR">false</Set>
  <Set name="copyWebDir">false</Set>
  <Set name="overrideDescriptor">webdefault.xml</Set>
</Configure>

/Arjun


On 06/22/2011 10:25 AM, Arjun Panday wrote:
Hi all, I'm looking for way to configure the DefaultServlet used to serve static content on disk, so that it uses a form based authentication. Here's what I have: - an (embedded) jetty server, with 2 connectors: 1 private IP using regular HTTP, 1 public IP using HTTPS - some webapps are served on the public IP and require authentication - some webapps are served on the private IP and require no authentication So far so good, but my server is also used to serve static disk content (not packaged in webapps) and i need the same : - some static content is needed on the private IP without authent' - some static content is needed on the public IP with authent' I am able to serve the static content on the private IP by specifying the connector name as explained here http://docs.codehaus.org/display/JETTY/Static+Content and here http://wiki.eclipse.org/Jetty/Howto/WebappPerConnector But I can't find a way to specify the security-constraint and login-config for the public static content. Alternatively I could map the DefaultServlet from a webapp (so as to have a web.xml) but then how can I serve static content? Setting the resourceBase init-param to an absolute path doesn't seem to work (not to mention the use of an environment variable for the root path). I hope my question is clear and someone can help, Thanks, Arjun --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email


Gmane