[Clustering/JBoss] - Re: discarded message from non-member
by bmelloni
Here is cluster-service.xml for both servers.
It should be 'untouched' from the original install (although I remember having to change 'somewhere' - maybe in this file or another file - a value from 0 to 1 to avoid the nodes fighting each other for the same identity).
.103 (the first server I start):
==================
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- Sample Clustering Service Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- ==================================================================== -->
<!-- Cluster Partition: defines cluster -->
<!-- ==================================================================== -->
<!-- Name of the partition being built -->
${jboss.partition.name:DefaultPartition}
<!-- The address used to determine the node name -->
${jboss.bind.address}
<!-- Determine if deadlock detection is enabled -->
False
<!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
30000
<!-- The JGroups protocol configuration -->
<!--
The default UDP stack:
- If you have a multihomed machine, set the UDP protocol's bind_addr attribute to the
appropriate NIC IP address, e.g bind_addr="192.168.0.2".
- On Windows machines, because of the media sense feature being broken with multicast
(even after disabling media sense) set the UDP protocol's loopback attribute to true
-->
<UDP mcast_addr="${jboss.partition.udpGroup:228.1.2.3}"
mcast_port="${jboss.hapartition.mcast_port:45566}"
tos="8"
ucast_recv_buf_size="20000000"
ucast_send_buf_size="640000"
mcast_recv_buf_size="25000000"
mcast_send_buf_size="640000"
loopback="false"
discard_incompatible_packets="true"
enable_bundling="false"
max_bundle_size="64000"
max_bundle_timeout="30"
use_incoming_packet_handler="true"
use_outgoing_packet_handler="false"
ip_ttl="${jgroups.udp.ip_ttl:2}"
down_thread="false" up_thread="false"/>
<PING timeout="2000"
down_thread="false" up_thread="false" num_initial_members="3"/>
<MERGE2 max_interval="100000"
down_thread="false" up_thread="false" min_interval="20000"/>
<FD_SOCK down_thread="false" up_thread="false"/>
<FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
<VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
<pbcast.NAKACK max_xmit_size="60000"
use_mcast_xmit="false" gc_lag="0"
retransmit_timeout="300,600,1200,2400,4800"
down_thread="false" up_thread="false"
discard_delivered_msgs="true"/>
<UNICAST timeout="300,600,1200,2400,3600"
down_thread="false" up_thread="false"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
down_thread="false" up_thread="false"
max_bytes="400000"/>
<pbcast.GMS print_local_addr="true" join_timeout="3000"
down_thread="false" up_thread="false"
join_retry_timeout="2000" shun="true"
view_bundling="true"/>
<FRAG2 frag_size="60000" down_thread="false" up_thread="false"/>
<pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>
<!-- Alternate TCP stack: customize it for your environment, change bind_addr and initial_hosts -->
<!--
<TCP bind_addr="thishost" start_port="7800" loopback="true"
tcp_nodelay="true"
recv_buf_size="20000000"
send_buf_size="640000"
discard_incompatible_packets="true"
enable_bundling="false"
max_bundle_size="64000"
max_bundle_timeout="30"
use_incoming_packet_handler="true"
use_outgoing_packet_handler="false"
down_thread="false" up_thread="false"
use_send_queues="false"
sock_conn_timeout="300"
skip_suspected_members="true"/>
<TCPPING initial_hosts="thishost[7800],otherhost[7800]" port_range="3"
timeout="3000"
down_thread="false" up_thread="false"
num_initial_members="3"/>
<MERGE2 max_interval="100000"
down_thread="false" up_thread="false" min_interval="20000"/>
<FD_SOCK down_thread="false" up_thread="false"/>
<FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
<VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
<pbcast.NAKACK max_xmit_size="60000"
use_mcast_xmit="false" gc_lag="0"
retransmit_timeout="300,600,1200,2400,4800"
down_thread="false" up_thread="false"
discard_delivered_msgs="true"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
down_thread="false" up_thread="false"
max_bytes="400000"/>
<pbcast.GMS print_local_addr="true" join_timeout="3000"
down_thread="false" up_thread="false"
join_retry_timeout="2000" shun="true"
view_bundling="true"/>
<pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>
-->
jboss:service=Naming
<!-- ==================================================================== -->
<!-- HA Session State Service for SFSB -->
<!-- ==================================================================== -->
jboss:service=Naming
<!-- We now inject the partition into the HAJNDI service instead
of requiring that the partition name be passed -->
<depends optional-attribute-name="ClusterPartition"
proxy-type="attribute">jboss:service=${jboss.partition.name:DefaultPartition}
<!-- JNDI name under which the service is bound -->
/HASessionState/Default
<!-- Max delay before cleaning unreclaimed state.
Defaults to 30*60*1000 => 30 minutes -->
0
<!-- ==================================================================== -->
<!-- HA JNDI -->
<!-- ==================================================================== -->
<!-- We now inject the partition into the HAJNDI service instead
of requiring that the partition name be passed -->
<depends optional-attribute-name="ClusterPartition"
proxy-type="attribute">jboss:service=${jboss.partition.name:DefaultPartition}
<!-- Bind address of bootstrap and HA-JNDI RMI endpoints -->
${jboss.bind.address}
<!-- Port on which the HA-JNDI stub is made available -->
1100
<!-- RmiPort to be used by the HA-JNDI service once bound. 0 => auto. -->
1101
<!-- Accept backlog of the bootstrap socket -->
50
<!-- The thread pool service used to control the bootstrap and
auto discovery lookups -->
<depends optional-attribute-name="LookupPool"
proxy-type="attribute">jboss.system:service=ThreadPool
<!-- A flag to disable the auto discovery via multicast -->
false
<!-- Set the auto-discovery bootstrap multicast bind address. If not
specified and a BindAddress is specified, the BindAddress will be used. -->
${jboss.bind.address}
<!-- Multicast Address and group port used for auto-discovery -->
${jboss.partition.udpGroup:230.0.0.4}
1102
<!-- The TTL (time-to-live) for autodiscovery IP multicast packets -->
16
<!-- The load balancing policy for HA-JNDI -->
org.jboss.ha.framework.interfaces.RoundRobin
<!-- Client socket factory to be used for client-server
RMI invocations during JNDI queries
custom
-->
<!-- Server socket factory to be used for client-server
RMI invocations during JNDI queries
custom
-->
<!-- ==================================================================== -->
<!-- HA Invokers -->
<!-- ==================================================================== -->
jboss:service=TransactionManager
<depends optional-attribute-name="Connector"
proxy-type="attribute">jboss.remoting:service=Connector,transport=socket
jboss:service=${jboss.partition.name:DefaultPartition}
${jboss.bind.address}
4447
<!--
custom
custom
-->
jboss:service=Naming
<!-- the JRMPInvokerHA creates a thread per request. This implementation uses a pool of threads -->
1
300
300
60000
${jboss.bind.address}
4448
${jboss.bind.address}
0
false
<depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager
jboss:service=Naming
<!-- ==================================================================== -->
<!-- ==================================================================== -->
<!-- Distributed cache invalidation -->
<!-- ==================================================================== -->
<!-- We now inject the partition into the HAJNDI service instead
of requiring that the partition name be passed -->
<depends optional-attribute-name="ClusterPartition"
proxy-type="attribute">jboss:service=${jboss.partition.name:DefaultPartition}
jboss.cache:service=InvalidationManager
jboss.cache:service=InvalidationManager
DefaultJGBridge
.102 (the secondserver):
===============
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- Sample Clustering Service Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- ==================================================================== -->
<!-- Cluster Partition: defines cluster -->
<!-- ==================================================================== -->
<!-- Name of the partition being built -->
${jboss.partition.name:DefaultPartition}
<!-- The address used to determine the node name -->
${jboss.bind.address}
<!-- Determine if deadlock detection is enabled -->
False
<!-- Max time (in ms) to wait for state transfer to complete. Increase for large states -->
30000
<!-- The JGroups protocol configuration -->
<!--
The default UDP stack:
- If you have a multihomed machine, set the UDP protocol's bind_addr attribute to the
appropriate NIC IP address, e.g bind_addr="192.168.0.2".
- On Windows machines, because of the media sense feature being broken with multicast
(even after disabling media sense) set the UDP protocol's loopback attribute to true
-->
<UDP mcast_addr="${jboss.partition.udpGroup:228.1.2.3}"
mcast_port="${jboss.hapartition.mcast_port:45566}"
tos="8"
ucast_recv_buf_size="20000000"
ucast_send_buf_size="640000"
mcast_recv_buf_size="25000000"
mcast_send_buf_size="640000"
loopback="false"
discard_incompatible_packets="true"
enable_bundling="false"
max_bundle_size="64000"
max_bundle_timeout="30"
use_incoming_packet_handler="true"
use_outgoing_packet_handler="false"
ip_ttl="${jgroups.udp.ip_ttl:2}"
down_thread="false" up_thread="false"/>
<PING timeout="2000"
down_thread="false" up_thread="false" num_initial_members="3"/>
<MERGE2 max_interval="100000"
down_thread="false" up_thread="false" min_interval="20000"/>
<FD_SOCK down_thread="false" up_thread="false"/>
<FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
<VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
<pbcast.NAKACK max_xmit_size="60000"
use_mcast_xmit="false" gc_lag="0"
retransmit_timeout="300,600,1200,2400,4800"
down_thread="false" up_thread="false"
discard_delivered_msgs="true"/>
<UNICAST timeout="300,600,1200,2400,3600"
down_thread="false" up_thread="false"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
down_thread="false" up_thread="false"
max_bytes="400000"/>
<pbcast.GMS print_local_addr="true" join_timeout="3000"
down_thread="false" up_thread="false"
join_retry_timeout="2000" shun="true"
view_bundling="true"/>
<FRAG2 frag_size="60000" down_thread="false" up_thread="false"/>
<pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>
<!-- Alternate TCP stack: customize it for your environment, change bind_addr and initial_hosts -->
<!--
<TCP bind_addr="thishost" start_port="7800" loopback="true"
tcp_nodelay="true"
recv_buf_size="20000000"
send_buf_size="640000"
discard_incompatible_packets="true"
enable_bundling="false"
max_bundle_size="64000"
max_bundle_timeout="30"
use_incoming_packet_handler="true"
use_outgoing_packet_handler="false"
down_thread="false" up_thread="false"
use_send_queues="false"
sock_conn_timeout="300"
skip_suspected_members="true"/>
<TCPPING initial_hosts="thishost[7800],otherhost[7800]" port_range="3"
timeout="3000"
down_thread="false" up_thread="false"
num_initial_members="3"/>
<MERGE2 max_interval="100000"
down_thread="false" up_thread="false" min_interval="20000"/>
<FD_SOCK down_thread="false" up_thread="false"/>
<FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
<VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
<pbcast.NAKACK max_xmit_size="60000"
use_mcast_xmit="false" gc_lag="0"
retransmit_timeout="300,600,1200,2400,4800"
down_thread="false" up_thread="false"
discard_delivered_msgs="true"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
down_thread="false" up_thread="false"
max_bytes="400000"/>
<pbcast.GMS print_local_addr="true" join_timeout="3000"
down_thread="false" up_thread="false"
join_retry_timeout="2000" shun="true"
view_bundling="true"/>
<pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>
-->
jboss:service=Naming
<!-- ==================================================================== -->
<!-- HA Session State Service for SFSB -->
<!-- ==================================================================== -->
jboss:service=Naming
<!-- We now inject the partition into the HAJNDI service instead
of requiring that the partition name be passed -->
<depends optional-attribute-name="ClusterPartition"
proxy-type="attribute">jboss:service=${jboss.partition.name:DefaultPartition}
<!-- JNDI name under which the service is bound -->
/HASessionState/Default
<!-- Max delay before cleaning unreclaimed state.
Defaults to 30*60*1000 => 30 minutes -->
0
<!-- ==================================================================== -->
<!-- HA JNDI -->
<!-- ==================================================================== -->
<!-- We now inject the partition into the HAJNDI service instead
of requiring that the partition name be passed -->
<depends optional-attribute-name="ClusterPartition"
proxy-type="attribute">jboss:service=${jboss.partition.name:DefaultPartition}
<!-- Bind address of bootstrap and HA-JNDI RMI endpoints -->
${jboss.bind.address}
<!-- Port on which the HA-JNDI stub is made available -->
1100
<!-- RmiPort to be used by the HA-JNDI service once bound. 0 => auto. -->
1101
<!-- Accept backlog of the bootstrap socket -->
50
<!-- The thread pool service used to control the bootstrap and
auto discovery lookups -->
<depends optional-attribute-name="LookupPool"
proxy-type="attribute">jboss.system:service=ThreadPool
<!-- A flag to disable the auto discovery via multicast -->
false
<!-- Set the auto-discovery bootstrap multicast bind address. If not
specified and a BindAddress is specified, the BindAddress will be used. -->
${jboss.bind.address}
<!-- Multicast Address and group port used for auto-discovery -->
${jboss.partition.udpGroup:230.0.0.4}
1102
<!-- The TTL (time-to-live) for autodiscovery IP multicast packets -->
16
<!-- The load balancing policy for HA-JNDI -->
org.jboss.ha.framework.interfaces.RoundRobin
<!-- Client socket factory to be used for client-server
RMI invocations during JNDI queries
custom
-->
<!-- Server socket factory to be used for client-server
RMI invocations during JNDI queries
custom
-->
<!-- ==================================================================== -->
<!-- HA Invokers -->
<!-- ==================================================================== -->
jboss:service=TransactionManager
<depends optional-attribute-name="Connector"
proxy-type="attribute">jboss.remoting:service=Connector,transport=socket
jboss:service=${jboss.partition.name:DefaultPartition}
${jboss.bind.address}
4447
<!--
custom
custom
-->
jboss:service=Naming
<!-- the JRMPInvokerHA creates a thread per request. This implementation uses a pool of threads -->
1
300
300
60000
${jboss.bind.address}
4448
${jboss.bind.address}
0
false
<depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager
jboss:service=Naming
<!-- ==================================================================== -->
<!-- ==================================================================== -->
<!-- Distributed cache invalidation -->
<!-- ==================================================================== -->
<!-- We now inject the partition into the HAJNDI service instead
of requiring that the partition name be passed -->
<depends optional-attribute-name="ClusterPartition"
proxy-type="attribute">jboss:service=${jboss.partition.name:DefaultPartition}
jboss.cache:service=InvalidationManager
jboss.cache:service=InvalidationManager
DefaultJGBridge
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203386#4203386
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203386
17 years, 3 months
[EJB 3.0] - InitialContext reference and definition
by davestar
My Session EJB is successfully deployed in JBoss 4.2.2 and here's the entry in the Global JNDI Namespace from the JMX console.
+- MXIntegrationEAR (class: org.jnp.interfaces.NamingContext)
| | +- BurdenRateFacade (class: org.jnp.interfaces.NamingContext)
| | | +- local (proxy: $Proxy80 implements interface gov.usbr.data.cdw.BurdenRateFacadeLocal,interface org.jboss.ejb3.JBossProxy)
| | | +- remote (proxy: $Proxy78 implements interface gov.usbr.data.cdw.BurdenRateFacadeRemote,interface org.jboss.ejb3.JBossProxy)
In my client code where I try to get a local reference of the EJB, this runs with a main method from a java class that is not deployed in the App server.
When I do a
Context ctx = new InitialContext()
| ctx.lookup("BurdenRateFacade")
I get a
anonymous wrote : javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter
Do I need to define an ejb-jar.xml? with some entries like these?
<ejb-local-ref>
| <ejb-ref-name>ejb/Test</ejb-ref-name>
| <ejb-ref-type>Session</ejb-ref-type>
| <local>Test</local>
| </ejb-local-ref>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203371#4203371
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203371
17 years, 3 months
[Installation, Configuration & DEPLOYMENT] - Re: JBoss log4j Update Required?
by munikuntla
T 11-5 log4j:ERROR A "XYZAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
This error occurs when log4j classes are loaded into memory by two distinct class loaders. According to section 4.3.4 of the Java Language Specification, when the same class is loaded by different class loaders, the resulting runtime copies are con-sidered incompatible.
While processing configuration scripts, log4j configurators often load classes into memory. Log4j is programmed such that configurators will first attempt load a re-quired class using the thread context class loader (TCL) and if that fails, it will at-tempt to load the class using the current class loader. Thus, log4j configurators will fail to load appenders or other log4j components when the thread context class loader has a different copy of log4j classes than the copy loaded by the current class loader. For example, assuming class loaders A and B both load a copy of log4j classes and the TCL is set to point to B, then invoking the configure method of a DOMConfigurator instance loaded by class loader A will cause an error. Indeed, the method responsible for loading the appender into memory will check that the class of the appender is assignable to org.apache.log4j.Appender. The check is done against the org.apache.log4j.Appender class loaded by A but since log4j gives preference to loading classes through the thread context class loader, B in this case, the Java runtime will consider the new appender (loaded by B) incom-patible with the copy of org.apache.log4j.Appender class loaded by A.
To get around this problem it suffices to make sure that only one and only one copy of log4j.jar is available to the class loader hierarchy of your application. This is not always possible because certain servlet containers and EJB containers use log4j in-ternally for their own logging. These containers usually ship with a copy of log4j.jar which is visible by certain parts of their class loader hierarchy. However, when users deploy
log4j.jar within their web-applications or ear files, depending on the delegation model of the application-specific class loaders as well as the TCL settings, con-flicts can arise. Tracking these conflicts requires good understanding of the class loader hierarchy of the container as well as precise details about the deployment of jar files at user premises. It is not always possible to obtain accurate and timely in-formation on these matters.
When all attempts to resolve the aforementioned problem fail despite your best ef-forts, then you can set the "log4j.ignoreTCL" system property as a last ditch solu-tion. When this system property is set to any value other than "false," log4j's class loading algorithm will ignore the value of the thread context loader and will only use the current class loader in order to locate and load classes. Note that the "log4j.ignoreTCL" property is only available in log4j version 1.2.6 and later. It is a system property that cannot be specified within configuration files.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203365#4203365
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203365
17 years, 3 months
[Clustering/JBoss] - More firewall ports for cluster than in config guide?
by bmelloni
After resolving a number of issues I got a 2-node jBossEAP cluster mostly working with the Windows Firewall disabled and settings at default values except for those required post-installation.
Attempting to re-enable the firewall I opened the ports indicated in the Server Configuration Guide, tables 9.1 and 9.2. I get the errors below on other server (stayed running, first node, no firewall on it). It looks like TreeCache is using ports in the 1000-2000 range that change at each server start. As shown in the attached log snippet, the problem goes away as soon as I set the firewall back to OFF.
Is there a known range for those ports? Or is there a configuration item that will lock the ports so that they will be reused at each start? In a different post someone thought I was using TCP instead of the expected UDP multicast, even though I used defaults. If the defaults are wrong for the multicast choice or something else is causing it to fail over to TCP, where do I fix them?
Thanks.
BTW, yes I know that since I am using a commercial version I can open a support ticket... I am using the forum until I get my support credentials.
10:54:38,183 INFO [DefaultPartition] I am (192.168.11.103:1099) received membershipChanged event:
10:54:38,183 INFO [DefaultPartition] Dead members: 0 ([])
10:54:38,183 INFO [DefaultPartition] New Members : 1 ([192.168.11.102:1099])
10:54:38,183 INFO [DefaultPartition] All Members : 2 ([192.168.11.103:1099, 192.168.11.102:1099])
10:54:43,027 INFO [TreeCache] viewAccepted(): [192.168.11.103:1746|5] [192.168.11.103:1746, 192.168.11.102:2190]
10:54:48,887 WARN [NAKACK] 192.168.11.103:1742] discarded message from non-member 192.168.11.102:2171, my view is [192.168.11.1
03:1742|4] [192.168.11.103:1742]
10:54:49,199 WARN [NAKACK] 192.168.11.103:1742] discarded message from non-member 192.168.11.102:2171, my view is [192.168.11.1
03:1742|4] [192.168.11.103:1742]
10:55:27,277 WARN [NAKACK] 192.168.11.103:1742] discarded message from non-member 192.168.11.102:2171, my view is [192.168.11.1
03:1742|4] [192.168.11.103:1742]
10:55:28,308 WARN [NAKACK] 192.168.11.103:1742] discarded message from non-member 192.168.11.102:2171, my view is [192.168.11.1
03:1742|4] [192.168.11.103:1742]
10:55:56,418 WARN [NAKACK] 192.168.11.103:1742] discarded message from non-member 192.168.11.102:2171, my view is [192.168.11.1
03:1742|4] [192.168.11.103:1742]
10:55:56,418 INFO [TreeCache] viewAccepted(): MergeView::[192.168.11.102:2171|5] [192.168.11.102:2171, 192.168.11.103:1742], su
bgroups=[[192.168.11.102:2171|0] [192.168.11.102:2171], [192.168.11.103:1742|4] [192.168.11.103:1742]]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203364#4203364
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203364
17 years, 3 months