You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by arthi <Ar...@nielsen.com> on 2016/03/11 15:46:54 UTC

Client configuration - help

Hi,

I have a cluster of servers running with a few caches populated with data.
I am not able to connect another node as a client to this cluster.

Here are the configs I use-
servers -

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/util
        http://www.springframework.org/schema/util/spring-util.xsd">
		
    <bean abstract="true" id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">	
		
		<property name="cacheConfiguration">			
            <list> 				
				...			
            </list>
        </property>

        <property name="discoverySpi">
            <bean
class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                        <property name="addresses">
                            <list>                                
                                <value>127.0.0.1:47500..47509</value>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>
    </bean>
</beans>

client ---
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/util
        http://www.springframework.org/schema/util/spring-util.xsd">
    <bean id="grid.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration"> 
		<property name="clientMode" value="true"/>
        <property name="discoverySpi">
            <bean
class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">				
                <property name="ipFinder">                   
                    <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                        <property name="addresses">
                            <list>                                
                                <value>127.0.0.1:47500..47501</value>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>
    </bean>
</beans>

This is the error I get ---
[20:25:58,882][SEVERE][main][IgniteKernal] Failed to start manager:
GridManagerAdapter [enabled=true,
name=o.a.i.i.managers.discovery.GridDiscoveryManager]
class org.apache.ignite.IgniteCheckedException: Failed to start SPI:
TcpDiscoverySpi [addrRslvr=null, sockTimeout=5000, ackTimeout=5000,
reconCnt=10, maxAckTimeout
=600000, forceSrvMode=false, clientReconnectDisabled=false]
        at
org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:258)
        at
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:660)
        at
org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1505)

Please help.

Thanks,
Arthi



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Client-configuration-help-tp3454.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Client configuration - help

Posted by vkulichenko <va...@gmail.com>.
Arthi,

What is the original exception? You provided the truncated trace and it's
not clear what happened. Please show the whole log.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Client-configuration-help-tp3454p3495.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Client configuration - help

Posted by arthi <Ar...@nielsen.com>.
Thanks Bhargav.

I changed the IP to the internal IP, but the client is not able to see the
entries in the cache.

The visor gives me these details -

visor> node
Detailed statistics (y/n) [n]: n

Time of the snapshot: 03/14/16, 11:15:22
+---------------------------------------------------------------------+
| ID                       | 6485b035-5a3a-4340-945e-0a576cc94d8b     |
| ID8                      | 6485B035                                 |
| Order                    | 1                                        |
| Address (0)              | *10.91.5.139    *                          |
| Address (1)              | 192.168.1.5                              |
| Address (2)              | 127.0.0.1                                |
| OS info                  | Windows 8.1 amd64 6.3                    |
| OS user                  | kastar01                                 |
| Deployment mode          | SHARED                                   |
| Language runtime         | Java Platform API Specification ver. 1.8 |
| Ignite version           | 1.5.0-final                              |
| JRE information          | HotSpot 64-Bit Tiered Compilers          |
| Grid name                | <default>                                |
| JVM start time           | 03/14/16, 10:53:49                       |
| Node start time          | 03/14/16, 10:53:58                       |
| Up time                  | 00:21:31:692                             |
| Last metric update       | 03/14/16, 11:15:20                       |
| CPUs                     | 4                                        |
| Thread count             | 91                                       |
| Cur/avg active jobs      | 0/0.01                                   |
| Cur/avg waiting jobs     | 0/0.00                                   |
| Cur/avg rejected jobs    | 0/0.00                                   |
| Cur/avg cancelled jobs   | 0/0.00                                   |
| Cur/avg job wait time    | 0/0.00ms                                 |
| Cur/avg job execute time | 0/11486.00ms                             |
| Cur/avg CPU load %       | 0.13/0.39%                               |
| Heap memory used/max     | 125mb/4gb                                |
+---------------------------------------------------------------------+

And there is one cache on this node -
+===================================================================================================================+
|           Name(@)           |    Mode     | Nodes |    Entries    |   Hits   
|  Misses   |   Reads   |  Writes   |
+===================================================================================================================+
| MARKET_POD_ACV_CACHE(@c0)   | REPLICATED  | 1     | min: 14233    | min: 0   
| min: 0    | min: 0    | min: 0    |
|                             |             |       | avg: 14233.00 | avg:
0.00 | avg: 0.00 | avg: 0.00 | avg: 0.00 |
|                             |             |       | max: 14233    | max: 0   
| max: 0    | max: 0    | max: 0    |
+-----------------------------+-------------+-------+---------------+-----------+-----------+-----------+-----------+

There are 14233 entries.

---------------------------
I tried to connect to this cluster and derive the cache using the following
XML config for the client -
 <property name="discoverySpi">
            <bean
class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">				
                <property name="ipFinder">                   
                    <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                        <property name="addresses">
                            <list>                                
                                <value>*10.91.5.139*:47500..47501</value>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>

when I run the application, I can see 1 server and 1 client comming up, but,
when I try to print the cache metrics, I get 0 entries.

Ignite ignite = Ignition.start(IGNITE_CONFIG)
IgniteCache<Long, MarketPodAcv> cache = Ignition.ignite().cache(cacheName);
		CacheMetrics metrics = cache.metrics();
	
System.out.println("----------------------------------------------------------");
		System.out.println("Cache Name:: "+ metrics.name());
		System.out.println("Cache Size:: "+ metrics.getSize());
		System.out.println("Cache Key Size:: "+ metrics.getKeySize());
		System.out.println("Cache offheap entries cnt:: "  +
metrics.getOffHeapEntriesCount());
	
System.out.println("----------------------------------------------------------");

[11:12:37] Topology snapshot [ver=23, servers=1, clients=1, CPUs=8,
heap=7.1GB]
----------------------------------------------------------
Cache Name:: MARKET_POD_ACV_CACHE
Cache Size:: 0
Cache Key Size:: 0
Cache offheap entries cnt:: 0
----------------------------------------------------------

Please help.

Thanks,
Arthi



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Client-configuration-help-tp3454p3480.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Client configuration - help

Posted by vkulichenko <va...@gmail.com>.
Hi Arthi,

Can you please show the whole trace?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Client-configuration-help-tp3454p3462.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.