tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bitz <the_bitbuc...@canada.com>
Subject Re: OpenEJB 3.1.2 - "Cannot connect to server" WARNING message
Date Mon, 02 Nov 2009 23:55:49 GMT

I'm using a snapshot of Geronimo 2.2, revision 830701, downloaded on Oct 28,
2009.  As I said, I did not alter the Geronimo config at all, but I've
pasted it for you below.  On the server side, there's a single stateless
session bean, with a single remote method.  Very simple.  Thanks for your
help.


Geronimo config.xml:

I'm unable to post with the config.xml contents embedded, so I've attached
it as a file.

Geronimo config-substitutions.properties:

# Put variables and their substitution values in this file. 
# They will be used when processing the corresponding config.xml. 
# Values in this file can be overridden by environment variables and system
properties 
# by prefixing the property name with
'org.apache.geronimo.config.substitution.' 
# For example, an entry such as hostName=localhost 
# can be overridden by an environment variable or system property
org.apache.geronimo.config.substitution.hostName=foo 
# When running multiple instances of Geronimo choose a PortOffset value such
that none of the ports conflict. 
# For example, try PortOffset=10 
#Wed Oct 28 14:44:34 EDT 2009
ORBPort=6882
AJPPort=8009
MaxThreadPoolSize=500
ResourceBindingsNamePattern=
Capacity=1000
SMTPHost=localhost
StatelessPoolSize=10
StatelessTimeout=0
ResourceBindingsQuery=?\#org.apache.geronimo.naming.ResourceSource
DerbyPort=1527
BMPPoolSize=10
COSNamingPort=1050
StatefulTimeout=20
webcontainer=TomcatWebContainer
OpenEJBPort=4201
ORBSSLPort=2001
PortOffset=0
JMXPort=9999
ClusterNodeName=NODE
EndPointURI=http\://localhost\:8080
NamingPort=1099
DefaultWadiSweepInterval=36000
WebConnectorConTimeout=20000
WADIClusterName=DEFAULT_WADI_CLUSTER
BulkPassivate=100
MulticastDiscoveryPort=6142
HTTPSPort=8443
MinThreadPoolSize=200
MulticastDiscoveryAddress=239.255.3.2
ReplicaCount=2
ServerHostname=0.0.0.0
ActiveMQPort=61616
SMTPPort=25
webcontainerName=tomcat6
ResourceBindingsNameInNamespace=jca\:
StrictPooling=true
JMXSecurePort=9998
DefaultWadiNumPartitions=24
AccessTimeout=30
HTTPPort=8080
FarmName=DEFAULT_FARM
ClusterName=cluster1
ResourceBindingsFormat={groupId}/{artifactId}/{j2eeType}/{name}
RemoteDeployHostname=localhost
TmId=71,84,77,73,68




David Blevins wrote:
> 
> 
> On Oct 29, 2009, at 10:19 AM, bitz wrote:
> 
>>
>> Good question.  I haven't configured a cluster.  I have one instance  
>> of
>> Geronimo 2.2 running, and didn't make any changes to the default  
>> config.
>> The client side code is a very simple test app.  At this point, I'm  
>> only
>> doing some research and testing, nothing fancy.  Is clustering somehow
>> enabled by default?
> 
> It is enabled by default, though it is designed so that it (should)  
> have no effect unless there actually *is* a cluster.  Clearly  
> something i s not lined up correctly.  I'll have a look in the code.
> 
> Can you post your related server side config?
> 
> 
> -David
> 
>> Quintin Beukes-2 wrote:
>>>
>>> Are you using clustering?
>>>
>>> Quintin Beukes
>>>
>>>
>>>
>>> On Thu, Oct 29, 2009 at 1:05 AM, bitz <the_bitbucket@canada.com>  
>>> wrote:
>>>>
>>>> I'm using Geronimo 2.2 which uses OpenEJB 3.1.2.  I have a client
>>>> application
>>>> which retrieves a remote EJB reference and makes a remote EJB method
>>>> call.
>>>> I'm seeing the following message being logged by the OpenEJB  
>>>> client on
>>>> the
>>>> client side...
>>>>
>>>> Oct 28, 2009 3:36:03 PM
>>>> org.apache.openejb.client.StickyConnectionStrategy
>>>> connect
>>>> WARNING: 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.
>>>>
>>>> Well, the serverURL is not correct, and it's also not the one I  
>>>> provided.
>>>> Here's a snippet of the client code...
>>>>
>>>> final URI serverURI = new URI( "ejbd", null, "192.168.0.1", 4201,  
>>>> null,
>>>> null, null );
>>>> final Properties contextProperties = new Properties( );
>>>> contextProperties.put( Context.INITIAL_CONTEXT_FACTORY,
>>>> "org.apache.openejb.client.RemoteInitialContextFactory" );
>>>> contextProperties.put( Context.PROVIDER_URL,  
>>>> serverURI.toString( ) );
>>>>
>>>> final InitialContext ctx = new InitialContext( contextProperties );
>>>> final MyEjbService remote = (MyEjbService)ctx.lookup("MyEjbRemote");
>>>> final String serverTime = remote.getServerTime();
>>>>
>>>> In
>>>> org 
>>>> .apache 
>>>> .openejb.client.StickyConnectionStrategy.connect(ClusterMetaData
>>>> cluster, ServerMetaData server), the ctx.lookup("MyEjbRemote")  
>>>> call is
>>>> successful, but the next call to remote.getServerTime() produces the
>>>> error
>>>> message indicated above, yet still succeeds.  Further calls to
>>>> remote.getServerTime() work fine and do not produce any error  
>>>> messages.
>>>>
>>>> I debugged enough to find the cause.  I'll try to explain... The  
>>>> first
>>>> client-server communication involves a handshake where  
>>>> ClusterRequest and
>>>> ClusterResponse objects are exchanged.  During this handshake the  
>>>> server
>>>> returns a URI of "ejbd://0.0.0.0:4201".  On the next communication  
>>>> to the
>>>> server, for the remote.getServerTime() method call, the
>>>> org 
>>>> .apache 
>>>> .openejb.client.StickyConnectionStrategy.connect(ClusterMetaData
>>>> cluster, ServerMetaData server) code attempts to use the URI  
>>>> returned by
>>>> the
>>>> server, which obviously fails, resulting in the message, then it  
>>>> falls
>>>> back
>>>> to the original, correct URI, which is successful.
>>>>
>>>> My question:  What is the reason for the ClusterRequest/ 
>>>> ClusterResponse
>>>> handshake, and why does the OpenEJB client try to connect using an
>>>> invalid
>>>> URI provided by server?
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/OpenEJB-3.1.2---%22Cannot-connect-to-server%22-WARNING-message-tp26103713p26103713.html
>>>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/OpenEJB-3.1.2---%22Cannot-connect-to-server%22-WARNING-message-tp26103713p26117261.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/OpenEJB-3.1.2---%22Cannot-connect-to-server%22-WARNING-message-tp26103713p26159141.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message