hi,
Did you try to start thriftserver in a separate thread rather than start it
directly in the init method. because i think execution on current thread is
blocked due to start listening on perticular port .try it by creating  a
Runnable class and start Serversocket in run method and start thread by
giving that runnable class as target in the init method.

thanks
isuru





On Thu, May 16, 2013 at 5:18 PM, Denuwanthi Hasanthika <
denuwanthi.hasanth...@gmail.com> wrote:

> Hi,
>
> I am using tomcat 6.0.29.
> I want to run a Thrift Server ,when Tomcat start up.
> So,
> I created a Thrift Server and called it inside a HttpServlets
> init(ServletConfig) method of a servlet deployed in tomcat server.
>
>
> *Server Tomcat v6.0 Server at localhost was unable to start within 45
> seconds. If the server requires more time, try increasing the timeout in
> the server editor*
>
>
> I Start the Thrift Server using
>
> *TServerSocket serverTransport = new TServerSocket(7911);*
>
> I believe its due to some conflict with ports.
> I even tried creating a 'connector' in tomcat Server.xml for port 7911, so
> that it won't conflict with 8080.
>
> I cant see where the problem is after all things I tried.
> I use Eclipse IDE in development, and create a Tomcat server in Eclipse,
> and run my dynamic web project containing Thrift Server in it.
>
> Some help/ advice would be greatly appreciated.
>
> Thanks,
> Denuwanthi.
>

Reply via email to