Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Failed to start server, but server is started
Failed to start server, but server is started [message #656204] Thu, 24 February 2011 14:52 Go to next message
Johan  Evelönn is currently offline Johan EvelönnFriend
Messages: 6
Registered: February 2011
Junior Member
I'm using a self developed server adapter (ant based server definition), which upon "start server" starts a OSGi platform with a Jetty server (very much like the Virgo tooling) upon which I can deploy bundles.

This has been working fine for a very long time, both with Galileo and Helios, but suddenly I get error messages every time I start the server. I can see in the console and by visiting the web that my server has actually started, but eclipse closes it down when reaching the timeout value.

How is it verified that the server is actually started? Can this somehow be modified/bypassed?

Best regards,
Johan

Re: Failed to start server, but server is started [message #656378 is a reply to message #656204] Fri, 25 February 2011 11:20 Go to previous messageGo to next message
Wolfgang Knauf is currently offline Wolfgang KnaufFriend
Messages: 63
Registered: July 2009
Member
Hi,

as far as I know, Eclipse tries to ping the server:
http://dev.eclipse.org/newslists/news.eclipse.webtools/msg11 831.html

So maybe a firewall problem? Did you modify ports in your server?

Best regards

Wolfgang

Am 24.02.2011 15:52, schrieb Johan vel:
> I'm using a self developed server adapter (ant based server definition),
> which upon "start server" starts a OSGi platform with a Jetty server
> (very much like the Virgo tooling) upon which I can deploy bundles.
>
> This has been working fine for a very long time, both with Galileo and
> Helios, but suddenly I get error messages every time I start the server.
> I can see in the console and by visiting the web that my server has
> actually started, but eclipse closes it down when reaching the timeout
> value.
>
> How is it verified that the server is actually started? Can this somehow
> be modified/bypassed?
>
> Best regards,
> Johan
>
>
Re: Failed to start server, but server is started [message #656407 is a reply to message #656378] Fri, 25 February 2011 13:10 Go to previous messageGo to next message
Johan  Evelönn is currently offline Johan EvelönnFriend
Messages: 6
Registered: February 2011
Junior Member
Hi,

I should correct my previous statement that said that it always timeouts. Lately eclipse sometimes acknowledge that my server has started. This makes me think that it is a timing issue.

I saw the test to perform in the link you gave:
telnet localhost 8080
GET / HTTP/1.0

Tried it and it works fine, a 404 (this is what always has been returned) is returned since no application is located at /. But eclipse doesn't see it as started, and it eventually timeouts.

I have tried with different proxy settings in eclipse:
manual with proxy and proxy bypass
direct
native (which uses the same proxy as given in manual)

I also saw the workaround to set initialstate to started and start it manually, but I don't think that is a good enough solution.

Best Regards
Johan
Re: Failed to start server, but server is started [message #656419 is a reply to message #656204] Fri, 25 February 2011 14:12 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 2/24/2011 9:52 AM, Johan vel wrote:
> I'm using a self developed server adapter (ant based server definition),
> which upon "start server" starts a OSGi platform with a Jetty server
> (very much like the Virgo tooling) upon which I can deploy bundles.
>
> This has been working fine for a very long time, both with Galileo and
> Helios, but suddenly I get error messages every time I start the server.
> I can see in the console and by visiting the web that my server has
> actually started, but eclipse closes it down when reaching the timeout
> value.
>
> How is it verified that the server is actually started? Can this somehow
> be modified/bypassed?
>
> Best regards,
> Johan
>
>

I've only recall seeing this happen for two reasons:

1. For some reason, the server adapter is pinging the wrong port. In
the generic server adapter support, I believe the port number specified
in WTP is the value the server is *assumed* to be using. The server
could be configured differently and WTP wouldn't know.

2. Somehow the host the server adapter is pinging isn't right. For
example, the server adapter might ping "localhost" when the server is
running against a network interface from a second NIC card that
corresponds to a host different from "localhost".

With a little more info about what you mean by "self developed server
adapter", I might be able to offer more suggestions. Is this a new
configuration for a generic server?

Cheers,
Larry
Re: Failed to start server, but server is started [message #656429 is a reply to message #656419] Fri, 25 February 2011 15:34 Go to previous messageGo to next message
Johan  Evelönn is currently offline Johan EvelönnFriend
Messages: 6
Registered: February 2011
Junior Member
Larry Isaacs wrote on Fri, 25 February 2011 09:12
On 2/24/2011 9:52 AM, Johan vel wrote:
> I'm using a self developed server adapter (ant based server definition),
> which upon "start server" starts a OSGi platform with a Jetty server
> (very much like the Virgo tooling) upon which I can deploy bundles.
>
> This has been working fine for a very long time, both with Galileo and
> Helios, but suddenly I get error messages every time I start the server.
> I can see in the console and by visiting the web that my server has
> actually started, but eclipse closes it down when reaching the timeout
> value.
>
> How is it verified that the server is actually started? Can this somehow
> be modified/bypassed?
>
> Best regards,
> Johan
>
>

I've only recall seeing this happen for two reasons:

1. For some reason, the server adapter is pinging the wrong port. In
the generic server adapter support, I believe the port number specified
in WTP is the value the server is *assumed* to be using. The server
could be configured differently and WTP wouldn't know.

2. Somehow the host the server adapter is pinging isn't right. For
example, the server adapter might ping "localhost" when the server is
running against a network interface from a second NIC card that
corresponds to a host different from "localhost".

With a little more info about what you mean by "self developed server
adapter", I might be able to offer more suggestions. Is this a new
configuration for a generic server?

Cheers,
Larry


Hi,

Since the server is starting ok on some occasions (without changing any settings in between tries), I don't think it could be the number 1 option. Possibly the second option if the server gets started on different NIC-cards on different startups, is that a possibility?.

Is there a way to enable some more tracing to view logoutput from wtp regarding the ping-action? Or is there a better way to debug?

The server adapter we use contains a servertype of org.eclipse.jst.server.generic.core.internal.GenericServer. Which uses a org.eclipse.jst.server.generic.antpublisher. I really can't say that I'm an expert on the implemented adapter, so I can't answer any better at the moment. Sadly I cannot share the code.

The strange thing is that if the server is started in debug-mode then it "never" timeouts. Is there a different way of checking if the server is started in debug-mode.

Best Regards,
Johan
Re: Failed to start server, but server is started [message #656439 is a reply to message #656429] Fri, 25 February 2011 16:08 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 2/25/2011 10:34 AM, Johan Evelönn wrote:
> Larry Isaacs wrote on Fri, 25 February 2011 09:12
>> On 2/24/2011 9:52 AM, Johan vel wrote:
>> > I'm using a self developed server adapter (ant based server
>> definition),
>> > which upon "start server" starts a OSGi platform with a Jetty server
>> > (very much like the Virgo tooling) upon which I can deploy bundles.
>> >
>> > This has been working fine for a very long time, both with Galileo and
>> > Helios, but suddenly I get error messages every time I start the
>> server.
>> > I can see in the console and by visiting the web that my server has
>> > actually started, but eclipse closes it down when reaching the timeout
>> > value.
>> >
>> > How is it verified that the server is actually started? Can this
>> somehow
>> > be modified/bypassed?
>> >
>> > Best regards,
>> > Johan
>> >
>> >
>>
>> I've only recall seeing this happen for two reasons:
>>
>> 1. For some reason, the server adapter is pinging the wrong port. In
>> the generic server adapter support, I believe the port number
>> specified in WTP is the value the server is *assumed* to be using. The
>> server could be configured differently and WTP wouldn't know.
>>
>> 2. Somehow the host the server adapter is pinging isn't right. For
>> example, the server adapter might ping "localhost" when the server is
>> running against a network interface from a second NIC card that
>> corresponds to a host different from "localhost".
>>
>> With a little more info about what you mean by "self developed server
>> adapter", I might be able to offer more suggestions. Is this a new
>> configuration for a generic server?
>>
>> Cheers,
>> Larry
>
>
> Hi,
>
> Since the server is starting ok on some occasions (without changing any
> settings in between tries), I don't think it could be the number 1
> option. Possibly the second option if the server gets started on
> different NIC-cards on different startups, is that a possibility?.
>
> Is there a way to enable some more tracing to view logoutput from wtp
> regarding the ping-action? Or is there a better way to debug?
>
> The server adapter we use contains a servertype of
> org.eclipse.jst.server.generic.core.internal.GenericServer. Which uses a
> org.eclipse.jst.server.generic.antpublisher. I really can't say that I'm
> an expert on the implemented adapter, so I can't answer any better at
> the moment. Sadly I cannot share the code.
>
> The strange thing is that if the server is started in debug-mode then it
> "never" timeouts. Is there a different way of checking if the server is
> started in debug-mode.
>
> Best Regards,
> Johan
>

I can't think of any obvious reason it would be intermittent. It would
make sense to fetch the source code for the
org.eclipse.jst.server.generic.code plug-in (File -> Import -> Plug-in
Development -> Plug-ins and Fragments). You could run WTP in debug mode
or add some extra System.out.println()s to see if you can determine what
is going wrong.

Cheers,
Larry
Re: Failed to start server, but server is started [message #656723 is a reply to message #656439] Mon, 28 February 2011 09:43 Go to previous messageGo to next message
Johan  Evelönn is currently offline Johan EvelönnFriend
Messages: 6
Registered: February 2011
Junior Member
Larry Isaacs wrote on Fri, 25 February 2011 11:08
On 2/25/2011 10:34 AM, Johan Evelönn wrote:
> Larry Isaacs wrote on Fri, 25 February 2011 09:12
>> On 2/24/2011 9:52 AM, Johan vel wrote:
>> > I'm using a self developed server adapter (ant based server
>> definition),
>> > which upon "start server" starts a OSGi platform with a Jetty server
>> > (very much like the Virgo tooling) upon which I can deploy bundles.
>> >
>> > This has been working fine for a very long time, both with Galileo and
>> > Helios, but suddenly I get error messages every time I start the
>> server.
>> > I can see in the console and by visiting the web that my server has
>> > actually started, but eclipse closes it down when reaching the timeout
>> > value.
>> >
>> > How is it verified that the server is actually started? Can this
>> somehow
>> > be modified/bypassed?
>> >
>> > Best regards,
>> > Johan
>> >
>> >
>>
>> I've only recall seeing this happen for two reasons:
>>
>> 1. For some reason, the server adapter is pinging the wrong port. In
>> the generic server adapter support, I believe the port number
>> specified in WTP is the value the server is *assumed* to be using. The
>> server could be configured differently and WTP wouldn't know.
>>
>> 2. Somehow the host the server adapter is pinging isn't right. For
>> example, the server adapter might ping "localhost" when the server is
>> running against a network interface from a second NIC card that
>> corresponds to a host different from "localhost".
>>
>> With a little more info about what you mean by "self developed server
>> adapter", I might be able to offer more suggestions. Is this a new
>> configuration for a generic server?
>>
>> Cheers,
>> Larry
>
>
> Hi,
>
> Since the server is starting ok on some occasions (without changing any
> settings in between tries), I don't think it could be the number 1
> option. Possibly the second option if the server gets started on
> different NIC-cards on different startups, is that a possibility?.
>
> Is there a way to enable some more tracing to view logoutput from wtp
> regarding the ping-action? Or is there a better way to debug?
>
> The server adapter we use contains a servertype of
> org.eclipse.jst.server.generic.core.internal.GenericServer. Which uses a
> org.eclipse.jst.server.generic.antpublisher. I really can't say that I'm
> an expert on the implemented adapter, so I can't answer any better at
> the moment. Sadly I cannot share the code.
>
> The strange thing is that if the server is started in debug-mode then it
> "never" timeouts. Is there a different way of checking if the server is
> started in debug-mode.
>
> Best Regards,
> Johan
>

I can't think of any obvious reason it would be intermittent. It would
make sense to fetch the source code for the
org.eclipse.jst.server.generic.code plug-in (File -> Import -> Plug-in
Development -> Plug-ins and Fragments). You could run WTP in debug mode
or add some extra System.out.println()s to see if you can determine what
is going wrong.

Cheers,
Larry


Hi Larry, I've now debugged and found one issue when starting our server.

The main problem is probably that the ping action starts to soon for our server, this will result in:
((HttpURLConnection) conn).getResponseCode();
hanging until the server timeout is reached and then returning with a connection refused. In this case only 1 ping is tried.

I added:
((HttpURLConnection) conn).setReadTimeout(10000);
before the:
((HttpURLConnection) conn).getResponseCode();
And this will cause the first call to give a "read timeout" and the second ping will return in a successful way.

Is the variable PING_DELAY configurable?
Maybe a ReadTimeout should be added to the code, which should be configurable.

<edit>
Another possible problem seems to be that the PingThread is actually started before the server is started. There is probably a reason for this, but maybe it could cause problems?
</edit>

Best Regards,
Johan

[Updated on: Mon, 28 February 2011 12:20]

Report message to a moderator

Re: Failed to start server, but server is started [message #657089 is a reply to message #656723] Tue, 01 March 2011 15:15 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 2/28/2011 4:43 AM, Johan Evelönn wrote:
> Larry Isaacs wrote on Fri, 25 February 2011 11:08
>> On 2/25/2011 10:34 AM, Johan Evelönn wrote:
>> > Larry Isaacs wrote on Fri, 25 February 2011 09:12
>> >> On 2/24/2011 9:52 AM, Johan vel wrote:
>> >> > I'm using a self developed server adapter (ant based server
>> >> definition),
>> >> > which upon "start server" starts a OSGi platform with a Jetty server
>> >> > (very much like the Virgo tooling) upon which I can deploy bundles.
>> >> >
>> >> > This has been working fine for a very long time, both with
>> Galileo and
>> >> > Helios, but suddenly I get error messages every time I start the
>> >> server.
>> >> > I can see in the console and by visiting the web that my server has
>> >> > actually started, but eclipse closes it down when reaching the
>> timeout
>> >> > value.
>> >> >
>> >> > How is it verified that the server is actually started? Can this
>> >> somehow
>> >> > be modified/bypassed?
>> >> >
>> >> > Best regards,
>> >> > Johan
>> >> >
>> >> >
>> >>
>> >> I've only recall seeing this happen for two reasons:
>> >>
>> >> 1. For some reason, the server adapter is pinging the wrong port. In
>> >> the generic server adapter support, I believe the port number
>> >> specified in WTP is the value the server is *assumed* to be using. The
>> >> server could be configured differently and WTP wouldn't know.
>> >>
>> >> 2. Somehow the host the server adapter is pinging isn't right. For
>> >> example, the server adapter might ping "localhost" when the server is
>> >> running against a network interface from a second NIC card that
>> >> corresponds to a host different from "localhost".
>> >>
>> >> With a little more info about what you mean by "self developed server
>> >> adapter", I might be able to offer more suggestions. Is this a new
>> >> configuration for a generic server?
>> >>
>> >> Cheers,
>> >> Larry
>> >
>> >
>> > Hi,
>> >
>> > Since the server is starting ok on some occasions (without changing any
>> > settings in between tries), I don't think it could be the number 1
>> > option. Possibly the second option if the server gets started on
>> > different NIC-cards on different startups, is that a possibility?.
>> >
>> > Is there a way to enable some more tracing to view logoutput from wtp
>> > regarding the ping-action? Or is there a better way to debug?
>> >
>> > The server adapter we use contains a servertype of
>> > org.eclipse.jst.server.generic.core.internal.GenericServer. Which
>> uses a
>> > org.eclipse.jst.server.generic.antpublisher. I really can't say that
>> I'm
>> > an expert on the implemented adapter, so I can't answer any better at
>> > the moment. Sadly I cannot share the code.
>> >
>> > The strange thing is that if the server is started in debug-mode
>> then it
>> > "never" timeouts. Is there a different way of checking if the server is
>> > started in debug-mode.
>> >
>> > Best Regards,
>> > Johan
>> >
>>
>> I can't think of any obvious reason it would be intermittent. It would
>> make sense to fetch the source code for the
>> org.eclipse.jst.server.generic.code plug-in (File -> Import -> Plug-in
>> Development -> Plug-ins and Fragments). You could run WTP in debug
>> mode or add some extra System.out.println()s to see if you can
>> determine what is going wrong.
>>
>> Cheers,
>> Larry
>
>
> Hi Larry, I've now debugged and found one issue when starting our server.
>
> The main problem is probably that the ping action starts to soon for our
> server, this will result in:
> ((HttpURLConnection) conn).getResponseCode();
> hanging until the server timeout is reached and then returning with a
> connection refused. In this case only 1 ping is tried.
>
> I added: ((HttpURLConnection) conn).setReadTimeout(10000);
> before the:
> ((HttpURLConnection) conn).getResponseCode();
> And this will cause the first call to give a "read timeout" and the
> second ping will return in a successful way.
>
> Is the variable PING_DELAY configurable?
> Maybe a ReadTimeout should be added to the code, which should be
> configurable.
>
> Best Regards,
> Johan

What does ((HttpURLConnection)conn).getReadTimeout() return prior to
calling setReadTimeout()? I haven't done a that much work with the
generic server support, but Tomcat uses basically the same code and I
haven't seen this to be a problem before. Perhaps it only needs to be
adjusted if it's longer than the server timeout.

Cheers,
Larry
Re: Failed to start server, but server is started [message #657524 is a reply to message #657089] Thu, 03 March 2011 07:49 Go to previous messageGo to next message
Johan  Evelönn is currently offline Johan EvelönnFriend
Messages: 6
Registered: February 2011
Junior Member
Larry Isaacs wrote on Tue, 01 March 2011 10:15
On 2/28/2011 4:43 AM, Johan Evelönn wrote:
> Larry Isaacs wrote on Fri, 25 February 2011 11:08
>> On 2/25/2011 10:34 AM, Johan Evelönn wrote:
>> > Larry Isaacs wrote on Fri, 25 February 2011 09:12
>> >> On 2/24/2011 9:52 AM, Johan vel wrote:
>> >> > I'm using a self developed server adapter (ant based server
>> >> definition),
>> >> > which upon "start server" starts a OSGi platform with a Jetty server
>> >> > (very much like the Virgo tooling) upon which I can deploy bundles.
>> >> >
>> >> > This has been working fine for a very long time, both with
>> Galileo and
>> >> > Helios, but suddenly I get error messages every time I start the
>> >> server.
>> >> > I can see in the console and by visiting the web that my server has
>> >> > actually started, but eclipse closes it down when reaching the
>> timeout
>> >> > value.
>> >> >
>> >> > How is it verified that the server is actually started? Can this
>> >> somehow
>> >> > be modified/bypassed?
>> >> >
>> >> > Best regards,
>> >> > Johan
>> >> >
>> >> >
>> >>
>> >> I've only recall seeing this happen for two reasons:
>> >>
>> >> 1. For some reason, the server adapter is pinging the wrong port. In
>> >> the generic server adapter support, I believe the port number
>> >> specified in WTP is the value the server is *assumed* to be using. The
>> >> server could be configured differently and WTP wouldn't know.
>> >>
>> >> 2. Somehow the host the server adapter is pinging isn't right. For
>> >> example, the server adapter might ping "localhost" when the server is
>> >> running against a network interface from a second NIC card that
>> >> corresponds to a host different from "localhost".
>> >>
>> >> With a little more info about what you mean by "self developed server
>> >> adapter", I might be able to offer more suggestions. Is this a new
>> >> configuration for a generic server?
>> >>
>> >> Cheers,
>> >> Larry
>> >
>> >
>> > Hi,
>> >
>> > Since the server is starting ok on some occasions (without changing any
>> > settings in between tries), I don't think it could be the number 1
>> > option. Possibly the second option if the server gets started on
>> > different NIC-cards on different startups, is that a possibility?.
>> >
>> > Is there a way to enable some more tracing to view logoutput from wtp
>> > regarding the ping-action? Or is there a better way to debug?
>> >
>> > The server adapter we use contains a servertype of
>> > org.eclipse.jst.server.generic.core.internal.GenericServer. Which
>> uses a
>> > org.eclipse.jst.server.generic.antpublisher. I really can't say that
>> I'm
>> > an expert on the implemented adapter, so I can't answer any better at
>> > the moment. Sadly I cannot share the code.
>> >
>> > The strange thing is that if the server is started in debug-mode
>> then it
>> > "never" timeouts. Is there a different way of checking if the server is
>> > started in debug-mode.
>> >
>> > Best Regards,
>> > Johan
>> >
>>
>> I can't think of any obvious reason it would be intermittent. It would
>> make sense to fetch the source code for the
>> org.eclipse.jst.server.generic.code plug-in (File -> Import -> Plug-in
>> Development -> Plug-ins and Fragments). You could run WTP in debug
>> mode or add some extra System.out.println()s to see if you can
>> determine what is going wrong.
>>
>> Cheers,
>> Larry
>
>
> Hi Larry, I've now debugged and found one issue when starting our server.
>
> The main problem is probably that the ping action starts to soon for our
> server, this will result in:
> ((HttpURLConnection) conn).getResponseCode();
> hanging until the server timeout is reached and then returning with a
> connection refused. In this case only 1 ping is tried.
>
> I added: ((HttpURLConnection) conn).setReadTimeout(10000);
> before the:
> ((HttpURLConnection) conn).getResponseCode();
> And this will cause the first call to give a "read timeout" and the
> second ping will return in a successful way.
>
> Is the variable PING_DELAY configurable?
> Maybe a ReadTimeout should be added to the code, which should be
> configurable.
>
> Best Regards,
> Johan

What does ((HttpURLConnection)conn).getReadTimeout() return prior to
calling setReadTimeout()? I haven't done a that much work with the
generic server support, but Tomcat uses basically the same code and I
haven't seen this to be a problem before. Perhaps it only needs to be
adjusted if it's longer than the server timeout.

Cheers,
Larry


Hi,

The initial readTimeout is set to 0 ms, which according to the javadoc in URLConnection means:
"0 return implies that the option is disabled (i.e., timeout of infinity)"

Maybe this is a problem which only occurs with our server adapter, but it would be nice if it could be fixed in the core. Otherwise we will have to modify the plugin on each release.

Best Regards,
Johan
Re: Failed to start server, but server is started [message #658266 is a reply to message #657524] Mon, 07 March 2011 15:33 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 3/3/2011 2:49 AM, Johan Evelönn wrote:
> Larry Isaacs wrote on Tue, 01 March 2011 10:15
>> On 2/28/2011 4:43 AM, Johan Evelönn wrote:
>> > Larry Isaacs wrote on Fri, 25 February 2011 11:08
>> >> On 2/25/2011 10:34 AM, Johan Evelönn wrote:
>> >> > Larry Isaacs wrote on Fri, 25 February 2011 09:12
>> >> >> On 2/24/2011 9:52 AM, Johan vel wrote:
>> >> >> > I'm using a self developed server adapter (ant based server
>> >> >> definition),
>> >> >> > which upon "start server" starts a OSGi platform with a Jetty
>> server
>> >> >> > (very much like the Virgo tooling) upon which I can deploy
>> bundles.
>> >> >> >
>> >> >> > This has been working fine for a very long time, both with
>> >> Galileo and
>> >> >> > Helios, but suddenly I get error messages every time I start the
>> >> >> server.
>> >> >> > I can see in the console and by visiting the web that my
>> server has
>> >> >> > actually started, but eclipse closes it down when reaching the
>> >> timeout
>> >> >> > value.
>> >> >> >
>> >> >> > How is it verified that the server is actually started? Can this
>> >> >> somehow
>> >> >> > be modified/bypassed?
>> >> >> >
>> >> >> > Best regards,
>> >> >> > Johan
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> I've only recall seeing this happen for two reasons:
>> >> >>
>> >> >> 1. For some reason, the server adapter is pinging the wrong
>> port. In
>> >> >> the generic server adapter support, I believe the port number
>> >> >> specified in WTP is the value the server is *assumed* to be
>> using. The
>> >> >> server could be configured differently and WTP wouldn't know.
>> >> >>
>> >> >> 2. Somehow the host the server adapter is pinging isn't right. For
>> >> >> example, the server adapter might ping "localhost" when the
>> server is
>> >> >> running against a network interface from a second NIC card that
>> >> >> corresponds to a host different from "localhost".
>> >> >>
>> >> >> With a little more info about what you mean by "self developed
>> server
>> >> >> adapter", I might be able to offer more suggestions. Is this a new
>> >> >> configuration for a generic server?
>> >> >>
>> >> >> Cheers,
>> >> >> Larry
>> >> >
>> >> >
>> >> > Hi,
>> >> >
>> >> > Since the server is starting ok on some occasions (without
>> changing any
>> >> > settings in between tries), I don't think it could be the number 1
>> >> > option. Possibly the second option if the server gets started on
>> >> > different NIC-cards on different startups, is that a possibility?.
>> >> >
>> >> > Is there a way to enable some more tracing to view logoutput from
>> wtp
>> >> > regarding the ping-action? Or is there a better way to debug?
>> >> >
>> >> > The server adapter we use contains a servertype of
>> >> > org.eclipse.jst.server.generic.core.internal.GenericServer. Which
>> >> uses a
>> >> > org.eclipse.jst.server.generic.antpublisher. I really can't say that
>> >> I'm
>> >> > an expert on the implemented adapter, so I can't answer any
>> better at
>> >> > the moment. Sadly I cannot share the code.
>> >> >
>> >> > The strange thing is that if the server is started in debug-mode
>> >> then it
>> >> > "never" timeouts. Is there a different way of checking if the
>> server is
>> >> > started in debug-mode.
>> >> >
>> >> > Best Regards,
>> >> > Johan
>> >> >
>> >>
>> >> I can't think of any obvious reason it would be intermittent. It would
>> >> make sense to fetch the source code for the
>> >> org.eclipse.jst.server.generic.code plug-in (File -> Import -> Plug-in
>> >> Development -> Plug-ins and Fragments). You could run WTP in debug
>> >> mode or add some extra System.out.println()s to see if you can
>> >> determine what is going wrong.
>> >>
>> >> Cheers,
>> >> Larry
>> >
>> >
>> > Hi Larry, I've now debugged and found one issue when starting our
>> server.
>> >
>> > The main problem is probably that the ping action starts to soon for
>> our
>> > server, this will result in:
>> > ((HttpURLConnection) conn).getResponseCode();
>> > hanging until the server timeout is reached and then returning with a
>> > connection refused. In this case only 1 ping is tried.
>> >
>> > I added: ((HttpURLConnection) conn).setReadTimeout(10000);
>> > before the:
>> > ((HttpURLConnection) conn).getResponseCode();
>> > And this will cause the first call to give a "read timeout" and the
>> > second ping will return in a successful way.
>> >
>> > Is the variable PING_DELAY configurable?
>> > Maybe a ReadTimeout should be added to the code, which should be
>> > configurable.
>> >
>> > Best Regards,
>> > Johan
>>
>> What does ((HttpURLConnection)conn).getReadTimeout() return prior to
>> calling setReadTimeout()? I haven't done a that much work with the
>> generic server support, but Tomcat uses basically the same code and I
>> haven't seen this to be a problem before. Perhaps it only needs to be
>> adjusted if it's longer than the server timeout.
>>
>> Cheers,
>> Larry
>
>
> Hi,
>
> The initial readTimeout is set to 0 ms, which according to the javadoc
> in URLConnection means:
> "0 return implies that the option is disabled (i.e., timeout of infinity)"
>
> Maybe this is a problem which only occurs with our server adapter, but
> it would be nice if it could be fixed in the core. Otherwise we will
> have to modify the plugin on each release.
>
> Best Regards,
> Johan

Testing on my system also shows the readTimeout set to 0 ms, though I
haven't encountered this issue. Also, I'm not aware of any differences
in this code relative to Galileo and Helios, so I'm confused as to why
the issue is appearing now.

Does increasing the PING_DELAY make a reliable improvement in the
behavior? Also, is this behavior occurring with no "webapps" deployed.
With Tomcat, starting up the webapps adds to the delay before
connections can be processed.

Cheers,
Larry
Re: Failed to start server, but server is started [message #659146 is a reply to message #658266] Fri, 11 March 2011 09:52 Go to previous messageGo to next message
Johan  Evelönn is currently offline Johan EvelönnFriend
Messages: 6
Registered: February 2011
Junior Member
Larry Isaacs wrote on Mon, 07 March 2011 10:33
On 3/3/2011 2:49 AM, Johan Evelönn wrote:
> Larry Isaacs wrote on Tue, 01 March 2011 10:15
>> On 2/28/2011 4:43 AM, Johan Evelönn wrote:
>> > Larry Isaacs wrote on Fri, 25 February 2011 11:08
>> >> On 2/25/2011 10:34 AM, Johan Evelönn wrote:
>> >> > Larry Isaacs wrote on Fri, 25 February 2011 09:12
>> >> >> On 2/24/2011 9:52 AM, Johan vel wrote:
>> >> >> > I'm using a self developed server adapter (ant based server
>> >> >> definition),
>> >> >> > which upon "start server" starts a OSGi platform with a Jetty
>> server
>> >> >> > (very much like the Virgo tooling) upon which I can deploy
>> bundles.
>> >> >> >
>> >> >> > This has been working fine for a very long time, both with
>> >> Galileo and
>> >> >> > Helios, but suddenly I get error messages every time I start the
>> >> >> server.
>> >> >> > I can see in the console and by visiting the web that my
>> server has
>> >> >> > actually started, but eclipse closes it down when reaching the
>> >> timeout
>> >> >> > value.
>> >> >> >
>> >> >> > How is it verified that the server is actually started? Can this
>> >> >> somehow
>> >> >> > be modified/bypassed?
>> >> >> >
>> >> >> > Best regards,
>> >> >> > Johan
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> I've only recall seeing this happen for two reasons:
>> >> >>
>> >> >> 1. For some reason, the server adapter is pinging the wrong
>> port. In
>> >> >> the generic server adapter support, I believe the port number
>> >> >> specified in WTP is the value the server is *assumed* to be
>> using. The
>> >> >> server could be configured differently and WTP wouldn't know.
>> >> >>
>> >> >> 2. Somehow the host the server adapter is pinging isn't right. For
>> >> >> example, the server adapter might ping "localhost" when the
>> server is
>> >> >> running against a network interface from a second NIC card that
>> >> >> corresponds to a host different from "localhost".
>> >> >>
>> >> >> With a little more info about what you mean by "self developed
>> server
>> >> >> adapter", I might be able to offer more suggestions. Is this a new
>> >> >> configuration for a generic server?
>> >> >>
>> >> >> Cheers,
>> >> >> Larry
>> >> >
>> >> >
>> >> > Hi,
>> >> >
>> >> > Since the server is starting ok on some occasions (without
>> changing any
>> >> > settings in between tries), I don't think it could be the number 1
>> >> > option. Possibly the second option if the server gets started on
>> >> > different NIC-cards on different startups, is that a possibility?.
>> >> >
>> >> > Is there a way to enable some more tracing to view logoutput from
>> wtp
>> >> > regarding the ping-action? Or is there a better way to debug?
>> >> >
>> >> > The server adapter we use contains a servertype of
>> >> > org.eclipse.jst.server.generic.core.internal.GenericServer. Which
>> >> uses a
>> >> > org.eclipse.jst.server.generic.antpublisher. I really can't say that
>> >> I'm
>> >> > an expert on the implemented adapter, so I can't answer any
>> better at
>> >> > the moment. Sadly I cannot share the code.
>> >> >
>> >> > The strange thing is that if the server is started in debug-mode
>> >> then it
>> >> > "never" timeouts. Is there a different way of checking if the
>> server is
>> >> > started in debug-mode.
>> >> >
>> >> > Best Regards,
>> >> > Johan
>> >> >
>> >>
>> >> I can't think of any obvious reason it would be intermittent. It would
>> >> make sense to fetch the source code for the
>> >> org.eclipse.jst.server.generic.code plug-in (File -> Import -> Plug-in
>> >> Development -> Plug-ins and Fragments). You could run WTP in debug
>> >> mode or add some extra System.out.println()s to see if you can
>> >> determine what is going wrong.
>> >>
>> >> Cheers,
>> >> Larry
>> >
>> >
>> > Hi Larry, I've now debugged and found one issue when starting our
>> server.
>> >
>> > The main problem is probably that the ping action starts to soon for
>> our
>> > server, this will result in:
>> > ((HttpURLConnection) conn).getResponseCode();
>> > hanging until the server timeout is reached and then returning with a
>> > connection refused. In this case only 1 ping is tried.
>> >
>> > I added: ((HttpURLConnection) conn).setReadTimeout(10000);
>> > before the:
>> > ((HttpURLConnection) conn).getResponseCode();
>> > And this will cause the first call to give a "read timeout" and the
>> > second ping will return in a successful way.
>> >
>> > Is the variable PING_DELAY configurable?
>> > Maybe a ReadTimeout should be added to the code, which should be
>> > configurable.
>> >
>> > Best Regards,
>> > Johan
>>
>> What does ((HttpURLConnection)conn).getReadTimeout() return prior to
>> calling setReadTimeout()? I haven't done a that much work with the
>> generic server support, but Tomcat uses basically the same code and I
>> haven't seen this to be a problem before. Perhaps it only needs to be
>> adjusted if it's longer than the server timeout.
>>
>> Cheers,
>> Larry
>
>
> Hi,
>
> The initial readTimeout is set to 0 ms, which according to the javadoc
> in URLConnection means:
> "0 return implies that the option is disabled (i.e., timeout of infinity)"
>
> Maybe this is a problem which only occurs with our server adapter, but
> it would be nice if it could be fixed in the core. Otherwise we will
> have to modify the plugin on each release.
>
> Best Regards,
> Johan

Testing on my system also shows the readTimeout set to 0 ms, though I
haven't encountered this issue. Also, I'm not aware of any differences
in this code relative to Galileo and Helios, so I'm confused as to why
the issue is appearing now.

Does increasing the PING_DELAY make a reliable improvement in the
behavior? Also, is this behavior occurring with no "webapps" deployed.
With Tomcat, starting up the webapps adds to the delay before
connections can be processed.

Cheers,
Larry


Hi Larry,

Sorry for the late reply. I have updated the plugin that we use in our Eclipse installations to set the readTimeout and that is working perfectly for us.

Since no updates have occured in the generic plugin, then I think this is a local issue for us. Something must have changed in our own server that causes the "ping" functionality to hang.

So the problem is solved for us, but the question is if the plugin should be updated with a readTimeOut. I cannot see any problems in introducing it, but then of course I only see the problem and usage from our point of view.

Best Regards,
Johan
Re: Failed to start server, but server is started [message #659201 is a reply to message #659146] Fri, 11 March 2011 14:09 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 3/11/2011 4:52 AM, Johan Evelönn wrote:
> Larry Isaacs wrote on Mon, 07 March 2011 10:33
>> On 3/3/2011 2:49 AM, Johan Evelönn wrote:
>> > Larry Isaacs wrote on Tue, 01 March 2011 10:15
>> >> On 2/28/2011 4:43 AM, Johan Evelönn wrote:
>> >> > Larry Isaacs wrote on Fri, 25 February 2011 11:08
>> >> >> On 2/25/2011 10:34 AM, Johan Evelönn wrote:
>> >> >> > Larry Isaacs wrote on Fri, 25 February 2011 09:12
>> >> >> >> On 2/24/2011 9:52 AM, Johan vel wrote:
>> >> >> >> > I'm using a self developed server adapter (ant based server
>> >> >> >> definition),
>> >> >> >> > which upon "start server" starts a OSGi platform with a Jetty
>> >> server
>> >> >> >> > (very much like the Virgo tooling) upon which I can deploy
>> >> bundles.
>> >> >> >> >
>> >> >> >> > This has been working fine for a very long time, both with
>> >> >> Galileo and
>> >> >> >> > Helios, but suddenly I get error messages every time I
>> start the
>> >> >> >> server.
>> >> >> >> > I can see in the console and by visiting the web that my
>> >> server has
>> >> >> >> > actually started, but eclipse closes it down when reaching the
>> >> >> timeout
>> >> >> >> > value.
>> >> >> >> >
>> >> >> >> > How is it verified that the server is actually started? Can
>> this
>> >> >> >> somehow
>> >> >> >> > be modified/bypassed?
>> >> >> >> >
>> >> >> >> > Best regards,
>> >> >> >> > Johan
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >> I've only recall seeing this happen for two reasons:
>> >> >> >>
>> >> >> >> 1. For some reason, the server adapter is pinging the wrong
>> >> port. In
>> >> >> >> the generic server adapter support, I believe the port number
>> >> >> >> specified in WTP is the value the server is *assumed* to be
>> >> using. The
>> >> >> >> server could be configured differently and WTP wouldn't know.
>> >> >> >>
>> >> >> >> 2. Somehow the host the server adapter is pinging isn't
>> right. For
>> >> >> >> example, the server adapter might ping "localhost" when the
>> >> server is
>> >> >> >> running against a network interface from a second NIC card that
>> >> >> >> corresponds to a host different from "localhost".
>> >> >> >>
>> >> >> >> With a little more info about what you mean by "self developed
>> >> server
>> >> >> >> adapter", I might be able to offer more suggestions. Is this
>> a new
>> >> >> >> configuration for a generic server?
>> >> >> >>
>> >> >> >> Cheers,
>> >> >> >> Larry
>> >> >> >
>> >> >> >
>> >> >> > Hi,
>> >> >> >
>> >> >> > Since the server is starting ok on some occasions (without
>> >> changing any
>> >> >> > settings in between tries), I don't think it could be the
>> number 1
>> >> >> > option. Possibly the second option if the server gets started on
>> >> >> > different NIC-cards on different startups, is that a
>> possibility?.
>> >> >> >
>> >> >> > Is there a way to enable some more tracing to view logoutput from
>> >> wtp
>> >> >> > regarding the ping-action? Or is there a better way to debug?
>> >> >> >
>> >> >> > The server adapter we use contains a servertype of
>> >> >> > org.eclipse.jst.server.generic.core.internal.GenericServer. Which
>> >> >> uses a
>> >> >> > org.eclipse.jst.server.generic.antpublisher. I really can't
>> say that
>> >> >> I'm
>> >> >> > an expert on the implemented adapter, so I can't answer any
>> >> better at
>> >> >> > the moment. Sadly I cannot share the code.
>> >> >> >
>> >> >> > The strange thing is that if the server is started in debug-mode
>> >> >> then it
>> >> >> > "never" timeouts. Is there a different way of checking if the
>> >> server is
>> >> >> > started in debug-mode.
>> >> >> >
>> >> >> > Best Regards,
>> >> >> > Johan
>> >> >> >
>> >> >>
>> >> >> I can't think of any obvious reason it would be intermittent. It
>> would
>> >> >> make sense to fetch the source code for the
>> >> >> org.eclipse.jst.server.generic.code plug-in (File -> Import ->
>> Plug-in
>> >> >> Development -> Plug-ins and Fragments). You could run WTP in debug
>> >> >> mode or add some extra System.out.println()s to see if you can
>> >> >> determine what is going wrong.
>> >> >>
>> >> >> Cheers,
>> >> >> Larry
>> >> >
>> >> >
>> >> > Hi Larry, I've now debugged and found one issue when starting our
>> >> server.
>> >> >
>> >> > The main problem is probably that the ping action starts to soon for
>> >> our
>> >> > server, this will result in:
>> >> > ((HttpURLConnection) conn).getResponseCode();
>> >> > hanging until the server timeout is reached and then returning
>> with a
>> >> > connection refused. In this case only 1 ping is tried.
>> >> >
>> >> > I added: ((HttpURLConnection) conn).setReadTimeout(10000);
>> >> > before the:
>> >> > ((HttpURLConnection) conn).getResponseCode();
>> >> > And this will cause the first call to give a "read timeout" and the
>> >> > second ping will return in a successful way.
>> >> >
>> >> > Is the variable PING_DELAY configurable?
>> >> > Maybe a ReadTimeout should be added to the code, which should be
>> >> > configurable.
>> >> >
>> >> > Best Regards,
>> >> > Johan
>> >>
>> >> What does ((HttpURLConnection)conn).getReadTimeout() return prior to
>> >> calling setReadTimeout()? I haven't done a that much work with the
>> >> generic server support, but Tomcat uses basically the same code and I
>> >> haven't seen this to be a problem before. Perhaps it only needs to be
>> >> adjusted if it's longer than the server timeout.
>> >>
>> >> Cheers,
>> >> Larry
>> >
>> >
>> > Hi,
>> >
>> > The initial readTimeout is set to 0 ms, which according to the javadoc
>> > in URLConnection means:
>> > "0 return implies that the option is disabled (i.e., timeout of
>> infinity)"
>> >
>> > Maybe this is a problem which only occurs with our server adapter, but
>> > it would be nice if it could be fixed in the core. Otherwise we will
>> > have to modify the plugin on each release.
>> >
>> > Best Regards,
>> > Johan
>>
>> Testing on my system also shows the readTimeout set to 0 ms, though I
>> haven't encountered this issue. Also, I'm not aware of any differences
>> in this code relative to Galileo and Helios, so I'm confused as to why
>> the issue is appearing now.
>>
>> Does increasing the PING_DELAY make a reliable improvement in the
>> behavior? Also, is this behavior occurring with no "webapps" deployed.
>> With Tomcat, starting up the webapps adds to the delay before
>> connections can be processed.
>>
>> Cheers,
>> Larry
>
>
> Hi Larry,
>
> Sorry for the late reply. I have updated the plugin that we use in our
> Eclipse installations to set the readTimeout and that is working
> perfectly for us.
>
> Since no updates have occured in the generic plugin, then I think this
> is a local issue for us. Something must have changed in our own server
> that causes the "ping" functionality to hang.
>
> So the problem is solved for us, but the question is if the plugin
> should be updated with a readTimeOut. I cannot see any problems in
> introducing it, but then of course I only see the problem and usage from
> our point of view.
>
> Best Regards,
> Johan


You are welcome to open up an enhancement request. Unfortunately, with
with WTP 3.3 being in feature freeze, and my severe lack of cycles for
WTP, it would be WTP 3.4 that would get the new feature. Also,
including patch would help.

Cheers,
Larry
Previous Topic:project text encoding resetted each time
Next Topic:Tomcat + Servlet + EMF
Goto Forum:
  


Current Time: Thu Mar 28 09:30:28 GMT 2024

Powered by FUDForum. Page generated in 0.04241 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top