This blog isn't maintained anymore. Check out my current project, an agile/scrum management tool.

Thursday, September 27, 2007

Red5, 1&1, and epoll

If you're trying to run red5 on a 1&1 managed server, you have to turn epoll support off because their linux distribution chokes on it. To do that, add this command paramater:

-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider


The error looks something like this:

Exception in thread "main" java.lang.InternalError: unable to get address of epoll functions, pre-2.6 kernel?
at sun.nio.ch.EPollArrayWrapper
.init(Native Method)
at sun.nio.ch.EPollArrayWrapper.(EPollArrayWrapper.java:227)
at sun.nio.ch.EPollSelectorImpl.( EPollSelectorImpl.java:52)
at sun.nio.ch.EPollSelectorProvider.openSelector(EPollSelectorProvider.java:18)
at java.nio.channels.Selector.open(Selector.java:209)
at org.apache.mina.transport.socket.nio.SocketAcceptor.startupWorker (SocketAcceptor.java:162)
at org.apache.mina.transport.socket.nio.SocketAcceptor.bind(SocketAcceptor.java:141)
at org.apache.mina.common.support.BaseIoAcceptor.bind(BaseIoAcceptor.java:42)
at org.red5.server.net.rtmp.RTMPMinaTransport.start(RTMPMinaTransport.java:218)
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:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod (AbstractAutowireCapableBeanFactory.java:1240)

Labels:

6 Comments:

  • Hello where you add this comman parameter?

    -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider

    By Anonymous Anonymous, At 10/27/2007 3:12 AM  

  • did you have any problems running amfphp on 1and1? ... I just tried putting it on my server space, and tried to access the gateway, and I'm getting 500 internal server errors... any ideas?

    By Anonymous Anonymous, At 11/18/2007 6:59 PM  

  • Anonymous #1:

    The parameter gets added to the startup script.

    Anonymous #2:

    I think the only problem I had with AMFPHP was 1&1 was using php4 instead of php5. Just rename the main php file you call from whatever.php to whatever.php5 and it'll run under the correct runtime. I forget the actual filename.

    By Blogger Marc, At 11/18/2007 7:02 PM  

  • hi marc,

    thanks for your quick reply. I actually did try changing my extensions from php to php5... still seem to be getting the 500 errors.

    i'm on the linux shared-hosting plan... is that what you had been using?

    very frustrating.... so any other tips you can offer would be greatly appreciated!

    thanks,
    -john.

    By Anonymous Anonymous, At 11/18/2007 7:25 PM  

  • I was on the shared linux plan too. Sorry, but that's the only thing I can remember being weird. I'm not with 1&1 anymore so I can't check how it's set up.

    By Blogger Marc, At 11/18/2007 7:29 PM  

  • no problem, thanks for the effort! :)

    By Anonymous Anonymous, At 11/18/2007 7:31 PM  

Post a Comment

Subscribe to Post Comments [Atom]



<< Home