[JBoss JIRA] (ISPN-3224) RemoteCacheManager of HotRod client is not able connect to server because of wrong parsing IPv6 address for pure IPv6 machines and gets wrong address on dual stack machines
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-3224?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant commented on ISPN-3224:
---------------------------------------
To use IPv6 addresses with Infinispan you need to use the new Configuration builder introduced in 5.3.0.
Configuration via properties and the old deprecated constructors will be dropped in 6.0.0 anyway
> RemoteCacheManager of HotRod client is not able connect to server because of wrong parsing IPv6 address for pure IPv6 machines and gets wrong address on dual stack machines
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-3224
> URL: https://issues.jboss.org/browse/ISPN-3224
> Project: Infinispan
> Issue Type: Bug
> Components: Remote protocols
> Affects Versions: 5.2.4.Final
> Reporter: Vitalii Chepeliuk
> Assignee: Tristan Tarrant
> Priority: Critical
> Fix For: 6.0.0.Final
>
>
> ########################Run hotrod client with pure IPv6#############################################
> Hotrod client fails when want connect to server, below is exception from pure IPv6 machines it doesn't really undedstand IPv6 address it should connect."Could not connect to server: /0.0.10.60:52" Here should
> be IPv6 address but it looks like some wrong IPv4 address it want to connect to and I use complicated address 2620:52:0:105f:0:0:ffff:32%2:11222 as host variable and it is not specified in /etc/hosts
> public RemoteCacheManager(String host, int port, boolean start, ClassLoader classLoader) {
> config = new ConfigurationProperties(host + ":" + port); <<< host=2620:52:0:105f:0:0:ffff:32%2 and port=11222
> this.classLoader = classLoader;
> if (start) start();
> }
>
> then in start method
> @Override
> public void start() {
> // Workaround for JDK6 NPE: http://bugs.sun.com/view_bug.do?bug_id=6427854
> SysPropertyActions.setProperty("sun.nio.ch.bugLevel", "\"\"");
> forceReturnValueDefault = config.getForceReturnValues();
> codec = CodecFactory.getCodec(config.getProtocolVersion());
> String factory = config.getTransportFactory();
> transportFactory = (TransportFactory) getInstance(factory, classLoader);
> Collection<SocketAddress> servers = config.getServerList(); <<< we get list of servers but getServerList() method should be improved see below!
>
> transportFactory.start(codec, config, servers, topologyId, classLoader); <<< and pass to transportFactory
> if (marshaller == null) {
> String marshallerName = config.getMarshaller();
> setMarshaller((Marshaller) getInstance(marshallerName, classLoader));
> }
> if (asyncExecutorService == null) {
> String asyncExecutorClass = config.getAsyncExecutorFactory();
> ExecutorFactory executorFactory = (ExecutorFactory) getInstance(asyncExecutorClass, classLoader);
> asyncExecutorService = executorFactory.getExecutor(config.getProperties());
> }
> synchronized (cacheName2RemoteCache) {
> for (RemoteCacheHolder rcc : cacheName2RemoteCache.values()) {
> startRemoteCache(rcc);
> }
> }
> // Print version to help figure client version run
> log.version(org.infinispan.Version.printVersion());
> started = true;
> }
>
> and "servers" variable contain the same IP address 2620:52:0:105f:0:0:ffff:32%2:11222
> public Collection<SocketAddress> getServerList() {
> Set<SocketAddress> addresses = new HashSet<SocketAddress>();
> String servers = props.getProperty(SERVER_LIST, "127.0.0.1:" + DEFAULT_HOTROD_PORT); <<< got 2620:52:0:105f:0:0:ffff:32%2:11222
> for (String server : servers.split(";")) {
> String[] components = server.trim().split(":"); <<< just only here the splitting it wrong, we devide address into 9 chunks
> String host = components[0]; <<< host name shoud be 1 chunk 2620
> int port = DEFAULT_HOTROD_PORT;
> if (components.length > 1) port = Integer.parseInt(components[1]); <<< and port 52
> addresses.add(new InetSocketAddress(host, port)); <<< and again we pass wrong parameteres to this constructor with IntetSocketAddress(2620, 52)
> }
> if (addresses.isEmpty()) throw new IllegalStateException("No Hot Rod servers specified!");
> return addresses; << here we just get some strange IPv4 address as 0.0.10.60:52
> }
> and exception is the following
> Caused by: org.infinispan.client.hotrod.exceptions.TransportException:: Could not connect to server: /0.0.10.60:52
> at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport.<init>(TcpTransport.java:88)
> at org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory.makeObject(TransportObjectFactory.java:57)
> at org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory.makeObject(TransportObjectFactory.java:38)
> at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
> at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory.borrowTransportFromPool(TcpTransportFactory.java:271)
> ########################Other issue is when hotrod client connects in dual stack mode#################
> /etc/hosts file is---------------------------------------------------------
> 127.0.0.1 myhost localhost.localdomain localhost
> ::1 myhost localhost6.localdomain6 localhost6
> ---------------------------------------------------------------------------
> Then is the same problem in ConfigurationProperties.java getServerList() method we add address to addresses <<<addresses.add(new InetSocketAddress(host, port));>>>
> so InetSocketAddress constructor is called
> public InetSocketAddress(String hostname, int port) {
> checkHost(hostname);
> InetAddress addr = null;
> String host = null;
> try {
> addr = InetAddress.getByName(hostname); <<< we should get InetAddress with hostname
> } catch(UnknownHostException e) {
> host = hostname;
> }
> holder = new InetSocketAddressHolder(host, addr, checkPort(
> }
> but we have 2! different inet addresses with the same hostname one is 127.0.0.1 and other ::1 and if i run it on IPv6 there should be ::1 and not 127.0.0.1!
> And
> public static InetAddress getByName(String host)
> throws UnknownHostException {
> return InetAddress.getAllByName(host)[0]; <<< but here we get only first address in array and got always 127.0.0.1
> }
> and then other exception is thrown--------------------------------------
> Caused by: org.infinispan.client.hotrod.exceptions.TransportException:: Could not connect to server: vchepQA/127.0.0.1:11222
> at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport.<init>(TcpTransport.java:88)
> at org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory.makeObject(TransportObjectFactory.java:57)
> at org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory.makeObject(TransportObjectFactory.java:38)
> at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
> at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory.borrowTransportFromPool(TcpTransportFactory.java:271)
> ... 97 more
> ---------------------------------------------------------------------------
> and i forget to add trace log just download it here http://dropmefiles.com/en/H5wvu
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (ISPN-3224) RemoteCacheManager of HotRod client is not able connect to server because of wrong parsing IPv6 address for pure IPv6 machines and gets wrong address on dual stack machines
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-3224?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant reassigned ISPN-3224:
-------------------------------------
Assignee: Tristan Tarrant (was: Galder Zamarreño)
> RemoteCacheManager of HotRod client is not able connect to server because of wrong parsing IPv6 address for pure IPv6 machines and gets wrong address on dual stack machines
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-3224
> URL: https://issues.jboss.org/browse/ISPN-3224
> Project: Infinispan
> Issue Type: Bug
> Components: Remote protocols
> Affects Versions: 5.2.4.Final
> Reporter: Vitalii Chepeliuk
> Assignee: Tristan Tarrant
> Priority: Critical
> Fix For: 6.0.0.Final
>
>
> ########################Run hotrod client with pure IPv6#############################################
> Hotrod client fails when want connect to server, below is exception from pure IPv6 machines it doesn't really undedstand IPv6 address it should connect."Could not connect to server: /0.0.10.60:52" Here should
> be IPv6 address but it looks like some wrong IPv4 address it want to connect to and I use complicated address 2620:52:0:105f:0:0:ffff:32%2:11222 as host variable and it is not specified in /etc/hosts
> public RemoteCacheManager(String host, int port, boolean start, ClassLoader classLoader) {
> config = new ConfigurationProperties(host + ":" + port); <<< host=2620:52:0:105f:0:0:ffff:32%2 and port=11222
> this.classLoader = classLoader;
> if (start) start();
> }
>
> then in start method
> @Override
> public void start() {
> // Workaround for JDK6 NPE: http://bugs.sun.com/view_bug.do?bug_id=6427854
> SysPropertyActions.setProperty("sun.nio.ch.bugLevel", "\"\"");
> forceReturnValueDefault = config.getForceReturnValues();
> codec = CodecFactory.getCodec(config.getProtocolVersion());
> String factory = config.getTransportFactory();
> transportFactory = (TransportFactory) getInstance(factory, classLoader);
> Collection<SocketAddress> servers = config.getServerList(); <<< we get list of servers but getServerList() method should be improved see below!
>
> transportFactory.start(codec, config, servers, topologyId, classLoader); <<< and pass to transportFactory
> if (marshaller == null) {
> String marshallerName = config.getMarshaller();
> setMarshaller((Marshaller) getInstance(marshallerName, classLoader));
> }
> if (asyncExecutorService == null) {
> String asyncExecutorClass = config.getAsyncExecutorFactory();
> ExecutorFactory executorFactory = (ExecutorFactory) getInstance(asyncExecutorClass, classLoader);
> asyncExecutorService = executorFactory.getExecutor(config.getProperties());
> }
> synchronized (cacheName2RemoteCache) {
> for (RemoteCacheHolder rcc : cacheName2RemoteCache.values()) {
> startRemoteCache(rcc);
> }
> }
> // Print version to help figure client version run
> log.version(org.infinispan.Version.printVersion());
> started = true;
> }
>
> and "servers" variable contain the same IP address 2620:52:0:105f:0:0:ffff:32%2:11222
> public Collection<SocketAddress> getServerList() {
> Set<SocketAddress> addresses = new HashSet<SocketAddress>();
> String servers = props.getProperty(SERVER_LIST, "127.0.0.1:" + DEFAULT_HOTROD_PORT); <<< got 2620:52:0:105f:0:0:ffff:32%2:11222
> for (String server : servers.split(";")) {
> String[] components = server.trim().split(":"); <<< just only here the splitting it wrong, we devide address into 9 chunks
> String host = components[0]; <<< host name shoud be 1 chunk 2620
> int port = DEFAULT_HOTROD_PORT;
> if (components.length > 1) port = Integer.parseInt(components[1]); <<< and port 52
> addresses.add(new InetSocketAddress(host, port)); <<< and again we pass wrong parameteres to this constructor with IntetSocketAddress(2620, 52)
> }
> if (addresses.isEmpty()) throw new IllegalStateException("No Hot Rod servers specified!");
> return addresses; << here we just get some strange IPv4 address as 0.0.10.60:52
> }
> and exception is the following
> Caused by: org.infinispan.client.hotrod.exceptions.TransportException:: Could not connect to server: /0.0.10.60:52
> at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport.<init>(TcpTransport.java:88)
> at org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory.makeObject(TransportObjectFactory.java:57)
> at org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory.makeObject(TransportObjectFactory.java:38)
> at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
> at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory.borrowTransportFromPool(TcpTransportFactory.java:271)
> ########################Other issue is when hotrod client connects in dual stack mode#################
> /etc/hosts file is---------------------------------------------------------
> 127.0.0.1 myhost localhost.localdomain localhost
> ::1 myhost localhost6.localdomain6 localhost6
> ---------------------------------------------------------------------------
> Then is the same problem in ConfigurationProperties.java getServerList() method we add address to addresses <<<addresses.add(new InetSocketAddress(host, port));>>>
> so InetSocketAddress constructor is called
> public InetSocketAddress(String hostname, int port) {
> checkHost(hostname);
> InetAddress addr = null;
> String host = null;
> try {
> addr = InetAddress.getByName(hostname); <<< we should get InetAddress with hostname
> } catch(UnknownHostException e) {
> host = hostname;
> }
> holder = new InetSocketAddressHolder(host, addr, checkPort(
> }
> but we have 2! different inet addresses with the same hostname one is 127.0.0.1 and other ::1 and if i run it on IPv6 there should be ::1 and not 127.0.0.1!
> And
> public static InetAddress getByName(String host)
> throws UnknownHostException {
> return InetAddress.getAllByName(host)[0]; <<< but here we get only first address in array and got always 127.0.0.1
> }
> and then other exception is thrown--------------------------------------
> Caused by: org.infinispan.client.hotrod.exceptions.TransportException:: Could not connect to server: vchepQA/127.0.0.1:11222
> at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransport.<init>(TcpTransport.java:88)
> at org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory.makeObject(TransportObjectFactory.java:57)
> at org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory.makeObject(TransportObjectFactory.java:38)
> at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
> at org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory.borrowTransportFromPool(TcpTransportFactory.java:271)
> ... 97 more
> ---------------------------------------------------------------------------
> and i forget to add trace log just download it here http://dropmefiles.com/en/H5wvu
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (ISPN-3140) JMX operation to suppress state transfer
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-3140?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated ISPN-3140:
------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=974402
> JMX operation to suppress state transfer
> ----------------------------------------
>
> Key: ISPN-3140
> URL: https://issues.jboss.org/browse/ISPN-3140
> Project: Infinispan
> Issue Type: Feature Request
> Components: Distributed Cache, State transfer
> Affects Versions: 5.2.6.Final
> Reporter: Manik Surtani
> Assignee: Dan Berindei
> Fix For: 5.2.7.Final, 5.3.0.CR2, 5.3.0.Final
>
>
> This feature request is to expose a JMX operation on each node, to suppress state transfer for a period of time. This flag would be {{false}} by default.
> The use case of this flag would be to ease bringing down (and up) a cluster for maintenance work. A typical workflow would be:
> 1) Shut down application requests to the data grid
> 2) Suppress state transfer on all nodes via JMX
> 3) Bring down all nodes
> 4) Perform maintenance work
> 5) Bring up nodes, one at a time. As each node comes up, disable state transfer for the node via JMX.
> 6) Once all nodes are up, enable state transfer for each node again via JMX
> 7) Allow application requests to reach the grid again.
> The purpose of this is to allow smooth and fast shutdown and startup, remove the risk of OOM errors (when bringing a grid down).
> This is a small but useful subset of full manual state transfer as defined in ISPN-1394.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (ISPN-3140) JMX operation to suppress state transfer
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-3140?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-3140:
-------------------------------
Status: Pull Request Sent (was: Reopened)
Git Pull Request: https://github.com/infinispan/infinispan/pull/1887, https://github.com/infinispan/infinispan/pull/1900 (was: https://github.com/infinispan/infinispan/pull/1887)
> JMX operation to suppress state transfer
> ----------------------------------------
>
> Key: ISPN-3140
> URL: https://issues.jboss.org/browse/ISPN-3140
> Project: Infinispan
> Issue Type: Feature Request
> Components: Distributed Cache, State transfer
> Affects Versions: 5.2.6.Final
> Reporter: Manik Surtani
> Assignee: Dan Berindei
> Fix For: 5.2.7.Final, 5.3.0.CR2, 5.3.0.Final
>
>
> This feature request is to expose a JMX operation on each node, to suppress state transfer for a period of time. This flag would be {{false}} by default.
> The use case of this flag would be to ease bringing down (and up) a cluster for maintenance work. A typical workflow would be:
> 1) Shut down application requests to the data grid
> 2) Suppress state transfer on all nodes via JMX
> 3) Bring down all nodes
> 4) Perform maintenance work
> 5) Bring up nodes, one at a time. As each node comes up, disable state transfer for the node via JMX.
> 6) Once all nodes are up, enable state transfer for each node again via JMX
> 7) Allow application requests to reach the grid again.
> The purpose of this is to allow smooth and fast shutdown and startup, remove the risk of OOM errors (when bringing a grid down).
> This is a small but useful subset of full manual state transfer as defined in ISPN-1394.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (ISPN-3229) L1 cache entries should not be passivated
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-3229?page=com.atlassian.jira.plugin.... ]
William Burns updated ISPN-3229:
--------------------------------
Attachment: DistSyncL1PassivationFuncTest.java
Attached test file that tests behavior.
> L1 cache entries should not be passivated
> -----------------------------------------
>
> Key: ISPN-3229
> URL: https://issues.jboss.org/browse/ISPN-3229
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 5.2.6.Final
> Reporter: William Burns
> Assignee: Mircea Markus
> Attachments: DistSyncL1PassivationFuncTest.java
>
>
> L1 entries are stored in the same data container as the real entries. These can be evicted which is fine, however we don't want them to be passivated as this could be costly to write/read from the cache store. We should either prevent L1 cache entries from being passivated or have an option to allow for it.
> Currently L1 entries are not differentiated from other entries except through the fact that they are mortal, which is used for other operations as well, which means they would need a placeholder of some kind to tell the container this is a L1 entry.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months