You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Blevins <da...@visi.com> on 2009/11/19 00:39:11 UTC

Fwd: Odd OpenEJB Remote Connection Behaviour

I added some configuration options to the Geronimo plan and related  
gbean:   http://svn.apache.org/viewvc?view=revision&revision=881988

You can actually set the two properties I added in that commit as -D  
vm properties.

I think the use of 0.0.0.0 is the issue. It should be fine to do that  
on the server side, but we may just need to work around it for now and  
fix it later.  Try setting your ${PlanServerHostname} to a "real"  
address that is addressable by the client.  You may need to update the  
"ejbd.discovery" property as well to use the same address, but I think  
it might just pick it up.

-David

Begin forwarded message:

> Resent-From: <db...@visi.com>
> From: Quintin Beukes <qu...@last.za.net>
> Date: November 16, 2009 1:14:42 AM PST
> To: OpenEJB Users List <us...@openejb.apache.org>
> Subject: Odd OpenEJB Remote Connection Behaviour
> Reply-To: users@openejb.apache.org
>
> Hey,
>
> I have noticed something odd, not sure what is causing this.
>
> When I have a client on machine A connecting to a remote OpenEJB
> server on machine B everything works well. If I take the exact same
> setup but I have another server running on machine A as well (so there
> is a client+server  on machineA and a server on machineB), OpenEJB
> successfully authenticated against machine B but then immediately
> switches over all it's following connections to it's own machine (ie.
> localhost).
>
> I've noticed if there is no server on machineA with the client, then I
> receive the following error on stdout:
>
> WARNING [OpenEJB.client]: Failover: Cannot connect to server(s):
> ejbd://0.0.0.0:4201 Exception: Cannot connect to server
> 'ejbd://0.0.0.0:4201'.  Check that the server is started and that the
> specified serverURL is correct..  Trying next.
>
> When the server is running, then this doesn't happen. I first noticed
> this as follows:
> 1. I created a user on serverB
> 2. Authenticated the client against it which worked, so it obviously
> connected to the server
> 3. Started capturing data. The client was showing the data is there,
> but the server's database doesn't reflect it.
> 4. When I did a netstat I noticed a localhost :4201 connection.
> 5. I removed ALL users from the local machine, but it kept  
> authenticating.
> 6. So I restarted the client and did a netstat, there was both a
> localhost and 10.0.0.200 :4201 connection. The latter being in
> TIME_WAIT.
> 7. Whenever I stop the server on the local machine all works well as  
> intended.
>
> Quintin Beukes
>


Re: Odd OpenEJB Remote Connection Behaviour

Posted by chi runhua <ch...@gmail.com>.
might be -Dorg.apache.geronimo.openejb.EjbDaemonGBean.host=${PlanServerHostname}
 by
replacing ${PlanServerHostname}  with actual IP address?

Jeff C

On Fri, Nov 20, 2009 at 2:13 AM, Quintin Beukes <qu...@skywalk.co.za>wrote:

> Thanks for the quick turnaround :>
>
> Where do I set ${PlanServerHostname} ? You mentioned I can set the 2
> new properties as -D arguments when starting Geronimo, but this
> variable isn't a property. At least it doesn't look like one.
>
> Q
>
> On Thu, Nov 19, 2009 at 1:39 AM, David Blevins <da...@visi.com>
> wrote:
> > I added some configuration options to the Geronimo plan and related
> gbean:
> > http://svn.apache.org/viewvc?view=revision&revision=881988
> >
> > You can actually set the two properties I added in that commit as -D vm
> > properties.
> >
> > I think the use of 0.0.0.0 is the issue. It should be fine to do that on
> the
> > server side, but we may just need to work around it for now and fix it
> > later.  Try setting your ${PlanServerHostname} to a "real" address that
> is
> > addressable by the client.  You may need to update the "ejbd.discovery"
> > property as well to use the same address, but I think it might just pick
> it
> > up.
> >
> > -David
> >
> > Begin forwarded message:
> >
> >> Resent-From: <db...@visi.com>
> >> From: Quintin Beukes <qu...@last.za.net>
> >> Date: November 16, 2009 1:14:42 AM PST
> >> To: OpenEJB Users List <us...@openejb.apache.org>
> >> Subject: Odd OpenEJB Remote Connection Behaviour
> >> Reply-To: users@openejb.apache.org
> >>
> >> Hey,
> >>
> >> I have noticed something odd, not sure what is causing this.
> >>
> >> When I have a client on machine A connecting to a remote OpenEJB
> >> server on machine B everything works well. If I take the exact same
> >> setup but I have another server running on machine A as well (so there
> >> is a client+server  on machineA and a server on machineB), OpenEJB
> >> successfully authenticated against machine B but then immediately
> >> switches over all it's following connections to it's own machine (ie.
> >> localhost).
> >>
> >> I've noticed if there is no server on machineA with the client, then I
> >> receive the following error on stdout:
> >>
> >> WARNING [OpenEJB.client]: Failover: Cannot connect to server(s):
> >> ejbd://0.0.0.0:4201 Exception: Cannot connect to server
> >> 'ejbd://0.0.0.0:4201'.  Check that the server is started and that the
> >> specified serverURL is correct..  Trying next.
> >>
> >> When the server is running, then this doesn't happen. I first noticed
> >> this as follows:
> >> 1. I created a user on serverB
> >> 2. Authenticated the client against it which worked, so it obviously
> >> connected to the server
> >> 3. Started capturing data. The client was showing the data is there,
> >> but the server's database doesn't reflect it.
> >> 4. When I did a netstat I noticed a localhost :4201 connection.
> >> 5. I removed ALL users from the local machine, but it kept
> authenticating.
> >> 6. So I restarted the client and did a netstat, there was both a
> >> localhost and 10.0.0.200 :4201 connection. The latter being in
> >> TIME_WAIT.
> >> 7. Whenever I stop the server on the local machine all works well as
> >> intended.
> >>
> >> Quintin Beukes
> >>
> >
> >
>

Re: Odd OpenEJB Remote Connection Behaviour

Posted by Quintin Beukes <qu...@skywalk.co.za>.
Thanks for the quick turnaround :>

Where do I set ${PlanServerHostname} ? You mentioned I can set the 2
new properties as -D arguments when starting Geronimo, but this
variable isn't a property. At least it doesn't look like one.

Q

On Thu, Nov 19, 2009 at 1:39 AM, David Blevins <da...@visi.com> wrote:
> I added some configuration options to the Geronimo plan and related gbean:
> http://svn.apache.org/viewvc?view=revision&revision=881988
>
> You can actually set the two properties I added in that commit as -D vm
> properties.
>
> I think the use of 0.0.0.0 is the issue. It should be fine to do that on the
> server side, but we may just need to work around it for now and fix it
> later.  Try setting your ${PlanServerHostname} to a "real" address that is
> addressable by the client.  You may need to update the "ejbd.discovery"
> property as well to use the same address, but I think it might just pick it
> up.
>
> -David
>
> Begin forwarded message:
>
>> Resent-From: <db...@visi.com>
>> From: Quintin Beukes <qu...@last.za.net>
>> Date: November 16, 2009 1:14:42 AM PST
>> To: OpenEJB Users List <us...@openejb.apache.org>
>> Subject: Odd OpenEJB Remote Connection Behaviour
>> Reply-To: users@openejb.apache.org
>>
>> Hey,
>>
>> I have noticed something odd, not sure what is causing this.
>>
>> When I have a client on machine A connecting to a remote OpenEJB
>> server on machine B everything works well. If I take the exact same
>> setup but I have another server running on machine A as well (so there
>> is a client+server  on machineA and a server on machineB), OpenEJB
>> successfully authenticated against machine B but then immediately
>> switches over all it's following connections to it's own machine (ie.
>> localhost).
>>
>> I've noticed if there is no server on machineA with the client, then I
>> receive the following error on stdout:
>>
>> WARNING [OpenEJB.client]: Failover: Cannot connect to server(s):
>> ejbd://0.0.0.0:4201 Exception: Cannot connect to server
>> 'ejbd://0.0.0.0:4201'.  Check that the server is started and that the
>> specified serverURL is correct..  Trying next.
>>
>> When the server is running, then this doesn't happen. I first noticed
>> this as follows:
>> 1. I created a user on serverB
>> 2. Authenticated the client against it which worked, so it obviously
>> connected to the server
>> 3. Started capturing data. The client was showing the data is there,
>> but the server's database doesn't reflect it.
>> 4. When I did a netstat I noticed a localhost :4201 connection.
>> 5. I removed ALL users from the local machine, but it kept authenticating.
>> 6. So I restarted the client and did a netstat, there was both a
>> localhost and 10.0.0.200 :4201 connection. The latter being in
>> TIME_WAIT.
>> 7. Whenever I stop the server on the local machine all works well as
>> intended.
>>
>> Quintin Beukes
>>
>
>