HTTP Connection issue. .com.tibco.plugin.http.HTTPEventSource for process starter HTTP Receiver: End activating the HTTP service;org.apache.http.nio.reactor.IOReactorException: Failure opening selector.

HTTP Connection issue. .com.tibco.plugin.http.HTTPEventSource for process starter HTTP Receiver: End activating the HTTP service;org.apache.http.nio.reactor.IOReactorException: Failure opening selector.

book

Article ID: KB0090963

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Description:
BW engine fails to listen to the specified TCP socket port if using "HTTP Component" server type. It does work with the "Tomcat" server type.

BW.TesterWS2-2-Process_Archive Debug [BW-User]  from com.tibco.plugin.http.HTTPEventSource for process starter HTTP Receiver: End activating the HTTP service
org.apache.http.nio.reactor.IOReactorException: Failure opening selector
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.<init>(AbstractIOReactor.java:77)
        at org.apache.http.impl.nio.reactor.BaseIOReactor.<init>(BaseIOReactor.java:58)
        at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:129)
        at com.tibco.bw.service.binding.bwhttp.httpcomponents.HttpComponentNioServer.createServer(Unknown Source)
        at com.tibco.bw.service.binding.bwhttp.httpcomponents.HttpComponentNioServer$1.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Too many open files
Symptoms:
User can not start an application. It fails with the following error in the GUI or Command Line.

Error trace:

BW.TesterWS2-2-Process_Archive Debug [BW-User]  from com.tibco.plugin.http.HTTPEventSource for process starter HTTP Receiver: End activating the HTTP service
org.apache.http.nio.reactor.IOReactorException: Failure opening selector
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.<init>(AbstractIOReactor.java:77)
        at org.apache.http.impl.nio.reactor.BaseIOReactor.<init>(BaseIOReactor.java:58)
        at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:129)
        at com.tibco.bw.service.binding.bwhttp.httpcomponents.HttpComponentNioServer.createServer(Unknown Source)
        at com.tibco.bw.service.binding.bwhttp.httpcomponents.HttpComponentNioServer$1.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Too many open files
        at sun.nio.ch.EPollArrayWrapper.epollCreate(Native Method)
        at sun.nio.ch.EPollArrayWrapper.<init>(EPollArrayWrapper.java:69)
        at sun.nio.ch.EPollSelectorImpl.<init>(EPollSelectorImpl.java:52)
        at sun.nio.ch.EPollSelectorProvider.openSelector(EPollSelectorProvider.java:18)
        at java.nio.channels.Selector.open(Selector.java:209)
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.<init>(AbstractIOReactor.java:75)
        ... 5 more
I/O error: Failure opening selector
Cause:
HTTP connections running for a long period of time or the number of file descriptors on a server is exhausted. The error when using HTTP Component server type is " Too many files open". This error is not seen when the server Type is Tomcat.

Issue/Introduction

HTTP Connection issue. .com.tibco.plugin.http.HTTPEventSource for process starter HTTP Receiver: End activating the HTTP service;org.apache.http.nio.reactor.IOReactorException: Failure opening selector.

Resolution

Normally you just need to configure your Linux OS to support more file descriptors. Under Linux, file descriptors are used to abstract not only open files but also socket connections. If your application receives a lot of traffic, it may start complaining with a "Too many open files" error.

By default most Linux distributions are set to a maximum of 1024 file descriptors. Each time you open a file or a socket connection, you use one of these descriptors and when you reach the maximum, the error above is reported. You can check the value currently set in your system by typing the following ulimit command in a terminal window.

ulimit -n
example -> ulimit -n 20000