I am running a Ignite cluster on boxes with multiple network interfaces configured. I have 3 different network interfaces with different speeds.
i see Ignite finds 3 ip addresses
INFO: Non-loopback local IPs: xxx, yyy, zzz
then
INFO: Successfully bound to TCP port [port=47100,locHost=0.0.0.0/0.0.0.0]
and
INFO: Successfully bound to TCP port [port=47500, localHost=0.0.0.0/0.0.0.0]
and
>>> Local node addresses: [Server1/xxx, Server1/yyy, Server1/zzz, /127.0.0.1]
>>> Local ports: TCP:47100 TCP:47500 TCP:48100
I want to configure Ignite cluster to use only 1 of these network interfaces for its communications.
I have this Ignite xml network configuration
<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration" parent="base-ignite.cfg">
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
<value>box1:47500</value>
<value>box2:47500</value>
<value>box3:47500</value>
<value>box4:47500</value>
....
...
..
.
</list>
</property>
</bean>
</property>
</bean>
</property>
</bean>
when a node joins I find
INFO: Added new node to topology: TcpDiscoveryNode [id=cb61c90f-6a8d-4c4a-81dc-7994b5e5fd80, addrs=[box1-xxx,box1-yyy, box1-yyy, 127.0.0.1], sockAddrs=[/box1-xxx:47500, /box1-xxx:47500, /box1-yyy:47500, /box1-yyy:47500, /box1-zzz:47500, /box1-zzz:47500, /127.0.0.1:47500], discPort=47500, order=2, intOrder=2, lastExchangeTime=1442308257191, loc=false, ver=1.5.0#20150911-sha1:b736c46f, isClient=false]
so the Ignite server bind and listens to all network interfaces on the box. and in the xml config i give only 1 address of network interface, but some how when in the node joining message, i see the ip address of all other network interfaces.
Ignite requires two ports to be available on each node: one for discovery (47500 by default) and another for communication (47100 by default). See this link for more detailed explanation: https://mail-archives.apache.org/mod_mbox/incubator-ignite-dev/201504.mbox/%3CCABuYRcqGRB2_3Y7niHShz=icHVVr5d8PVmdwug=oOwHVSXA4SA#mail.gmail.com%3E
Port 48100 is used by shared memory communication which works faster than traditional TCP communication, but only for nodes that are running on the same physical machine. This feature is optional and can be disabled by setting -1 as a shared memory communication port:
<property name="communicationSpi">
<bean class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
<property name="sharedMemoryPort" value="-1"/>
</bean>
</property>
Related
I have set my ws config property as below.
connectionTimeOut=10000
readTimeOut=10000
maxConnectionsPerHost=5
maxTotalConnections=20
userName=XXXX
password=XXX
endpoint=https://example.com/XXX.svc
I had my ws context as below:
<property name="messageSender">
<bean class="org.springframework.ws.transport.http.HttpComponentsMessageSender">
<property name="connectionTimeout" value="${connectionTimeOut}" />
<property name="readTimeout" value="${readTimeOut}"></property>
<property name="maxConnectionsPerHost"><map><entry key="${endpoint}" value="${maxConnectionsPerHost}"/></map></property>
<property name="maxTotalConnections" value="${maxTotalConnections}"/>
<property name = "credentials">
<bean class = "org.apache.http.auth.UsernamePasswordCredentials">
<constructor-arg value = "${userName}"/>
<constructor-arg value = "${password}"/>
</bean>
</property>
</bean>``
</property>
When I enter the netstat command as below
netstat -n | grep <ip of XXX.com>
I need to get 5 TCP connections as ESTABLISHED.
For my above configurations I am always getting only 2 TCP connections as ESTABLISHED.
When I tried updating my endpoint as http instead https.I could see 5 TCP connections as ESTABLISHED. However the webservice response is not retrieved and getting an WebServiceTransportException.
Can any one please help me on getting this working.
Thank you in advance.
GridGain using yardstick on using TcpDiscoverySpi on aws ec2 instances launched into a VPC cant form a cluster. what setting should i be looking at ? thanks
my xml config
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
<value>10.0.0.245</value><value>10.0.0.246</value><value>10.0.0.247</value><value>10.0.0.35</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
some important log lines
ver. 1.0.0#20150329-sha1:5fc2cd05
INFO: OS user: ec2-user
INFO: IGNITE_HOME=/home/ec2-user/yardstick-ignite
INFO: Non-loopback local IPs: 10.0.0.245
INFO: Enabled local MACs: 0A5AEFFFF957
INFO: Successfully bound to TCP port [port=47100, locHost=/127.0.0.1]
INFO: Successfully bound to TCP port [port=47500, localHost=/127.0.0.1]
WARNING: Failed to connect to any address from IP finder (make sure IP finder addresses are correct and firewalls are disabled on all host machines): [/10.0.0.246:47500, /10.0.0.245:47500, /10.0.0.247:475
00, /10.0.0.35:47500]
Jul 13, 2015 7:41:09 PM org.apache.ignite.logger.java.JavaLogger warning
WARNING: Failed to connect to any address from IP finder (make sure IP finder addresses are correct and firewalls are disabled on all host machines): [/10.0.0.247:47500, /10.0.0.245:47500, /10.0.0.35:4750
0, /10.0.0.246:47500]
I am running in an aws VPC using the default security group
where i have opened ports 47000 - 48500 for TCP
my default security group was not configured correctly
and
I also did this
Remove this configuration property.
<property name="localHost" value="127.0.0.1"/>
as this answer says
How to use gridgain with two nodes where each node on its own different host
I am working on ActiveMQ JMS Spring application. I am using ActiveMQ instance which is present in Cloud server and i trying to read message from queue. In a configuration file i have configured broker URL as
<bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<!-- brokerURL, You may have different IP or port -->
<constructor-arg index="0" value="tcp://ip address:8161" />
</bean>
but when i try to connect it gives me error
Caused by: org.apache.activemq.transport.InactivityIOException: Cannot send, channel has already failed: tcp://ip address:8161
at org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:297)
at org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:286)
at org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:85)
at org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:104)
at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68)
at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:81)
at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:86)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1409)
... 21 more
Can you please suggest me is am i missing something here?
I have a RMI client/server configuration created with Spring 3.0.
When client and server run on the same machine at the url:
rmi://localhost:1099/myService
everything is ok. When I run the client on a different machine (server run now on 192.168.1.67) and the client "points" to:
rmi://192.168.1.67:1099/myService
I can see this error message from the client:
org.spring...RmiClientInterceptor handlerRemoteConnectFailure.
Could not connect to Rmi Service [rmi://192.1681.67:1099/myService]
The server is configured in this way:
<bean id="myService" class="org.springframework.remoting.rmi.RmiServiceExporter">
<property name="service" ref="myService"/>
<property name="serviceInterface" value="org.myapp.MyService"/>
<property name="serviceName" value="myService"/>
<property name="alwaysCreateRegistry" value="true"/>
</bean>
<bean id="myService" class="org.myapp.MyServiceImpl" />
and the client:
RmiProxyFactoryBean rpfb = new RmiProxyFactoryBean();
rpfb.setServiceInterface(MyService.class);
rpfb.setLookupStubOnStartup(true);
rpfb.setRefreshStubOnConnectFailure(true);
RMICustomClientSocketFactory socketFactory = new RMICustomClientSocketFactory();
socketFactory.setTimeout(5000);
rpfb.setRegistryClientSocketFactory(socketFactory);
rpfb.setServiceUrl(getRmiUrl(address, port));
rpfb.afterPropertiesSet();
I checked with a sniffer the port 1099 of the server, and when the client starts its process I can see some data "dispatched" on the server side:
JRMI..K
...192.168.1.65..
..192.168.1.65....
P....w"..........................D.M...;.t..myService
Q....w.....e...7B+#5..s}.....5org.springframework.remoting.rmi.RmiInvocationHandlerpxr..java.lang.reflect.Proxy.'. ..C....L..ht.%Ljava/lang/reflect/InvocationHandler;pxpsr.-java.rmi.server.RemoteObjectInvocationHandler...........pxr..java.rmi.server.RemoteObject.a...a3....pxpw2.
UnicastRef..127.0.1.1..../.T~.X.....e...7B+#5...x
R
S
T...e...7B+#5..
My question is: Why if client & server run on the same machine, everything is ok but on different machines I get this problem? and how to fix it?
I run the server on windows and client on linux (ubuntu) and everything was ok.
When I run the server on linux and client on windows I get the problem.
To fix it on linux just run the server with: -Djava.rmi.server.hostname=192.168.1.67.
I am using Spring 3 and exposed an MBean through Spring, everything works fine but I see below warning message in the Log file.
WARN org.springframework.jmx.support.JmxUtils - Found more than one MBeanServer instance. Returning first from list.
Here is my configuration:
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
<property name="assembler" ref="assembler" />
<property name="namingStrategy" ref="namingStrategy" />
<property name="autodetect" value="true" />
<property name="registrationBehaviorName" value="REGISTRATION_REPLACE_EXISTING"/>
</bean>
<bean id="jmxAttributeSource"
class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource" />
<bean id="assembler"
class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler">
<property name="attributeSource" ref="jmxAttributeSource" />
</bean>
<bean id="WASAdminService" class="com.ibm.websphere.management.AdminServiceFactory"
factory-method="getAdminService" />
<bean id="namingStrategy" class="com.xxxx.WebSphereNamingStrategy">
<constructor-arg ref="WASAdminService" />
</bean>
I put a debug point and found that it is finding 'com.ibm.ws.management.PlatformMBeanServer' and 'com.sun.jmx.mbeanserver.JmxMBeanServer' objects. Any idea why it is finding more than one? When I googled, I found that I can specify the 'agent id' to find the required MBean server, but again if we are deploying this code in multiple environments, agent id may not be same (cannot be static)...
Any inputs on this is appreciated...
Thanks, Kiran
My guess is that the two MBean servers correspond to:
the "Platform" MBean server - established by the JVM. This MBean server would have all of the builtin Mbeans, like: java.lang:type=Runtime
the WebSphere provided MBean server - which has MBeans like WebSphere:name=WebContainer,process=...
I'm new to this area, but am just about to investigate further. From my perspective, I'd like to specify the Platform Mbean server - so that it's easier to access from monitoring tools, like JConsole, etc