[ 
https://issues.apache.org/jira/browse/GEODE-6047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Udo Kohlmeyer updated GEODE-6047:
---------------------------------
    Affects Version/s: 1.5.0
                       1.6.0
                       1.7.0

> GatewayTransportFilters break when you use GZIP or Cipher streams
> -----------------------------------------------------------------
>
>                 Key: GEODE-6047
>                 URL: https://issues.apache.org/jira/browse/GEODE-6047
>             Project: Geode
>          Issue Type: Bug
>          Components: wan
>    Affects Versions: 1.5.0, 1.6.0, 1.7.0
>            Reporter: Udo Kohlmeyer
>            Priority: Major
>
> When configuring a GatewayTransportFilter to use either GZIP or Cipher 
> streams, the wan gateways cannot connect any more.
> When configuring a Server with GatewayTransportFilter using:
> {code:java}
> public class WanTransportEncryptionListener implements GatewayTransportFilter 
> {
>     private Cipher cipherEnc = null;
>     private Cipher cipherDec = null;
>     @PostConstruct
>     private void init() throws NoSuchAlgorithmException, 
> NoSuchPaddingException, InvalidKeyException, 
> InvalidAlgorithmParameterException {
>         String algorithm = "AES";
>         KeyGenerator keyGenerator = KeyGenerator.getInstance(algorithm);
>         int keySize = 128;
>         keyGenerator.init(keySize);
>         Key key = keyGenerator.generateKey();
>         String transformation = "AES/CBC/PKCS5Padding";
>         cipherEnc = Cipher.getInstance(transformation);
>         cipherDec = Cipher.getInstance(transformation);
>         cipherEnc.init(Cipher.ENCRYPT_MODE, key);
>         cipherDec.init(Cipher.DECRYPT_MODE, key, new 
> IvParameterSpec(cipherEnc.getIV()));
>     }
>     @Override
>     public InputStream getInputStream(InputStream stream) {
>         return new BufferedInputStream(new CipherInputStream(stream, 
> cipherDec));
>     }
>     @Override
>     public OutputStream getOutputStream(OutputStream stream) {
>         return new BufferedOutputStream(new CipherOutputStream(stream, 
> cipherEnc));
>     }
> }{code}
> The following exception is thrown
> {code:java}
> [warn 2018/11/13 15:08:09.602 PST <Handshaker 0.0.0.0/0.0.0.0:15000 Thread 0> 
> tid=99] Error processing client connection
> java.lang.IllegalArgumentException: unknown communications mode: -74
>     at 
> org.apache.geode.internal.cache.tier.CommunicationMode.fromModeNumber(CommunicationMode.java:164)
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.getCommunicationModeForNonSelector(AcceptorImpl.java:1558)
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.handleNewClientConnection(AcceptorImpl.java:1422)
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl$6.run(AcceptorImpl.java:1334)
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>     at java.lang.Thread.run(Thread.java:748)
> [warn 2018/11/13 15:08:09.602 PST <Handshaker 0.0.0.0/0.0.0.0:15000 Thread 0> 
> tid=99] Cache server: failed accepting client connection  {0}
> java.io.EOFException
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.handleNewClientConnection(AcceptorImpl.java:1430)
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl$6.run(AcceptorImpl.java:1334)
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>     at java.lang.Thread.run(Thread.java:748)
> [warn 2018/11/13 15:08:09.617 PST <Handshaker 0.0.0.0/0.0.0.0:15000 Thread 0> 
> tid=99] Error processing client connection
> java.lang.IllegalArgumentException: unknown communications mode: 26
>     at 
> org.apache.geode.internal.cache.tier.CommunicationMode.fromModeNumber(CommunicationMode.java:164)
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.getCommunicationModeForNonSelector(AcceptorImpl.java:1558)
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.handleNewClientConnection(AcceptorImpl.java:1422)
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl$6.run(AcceptorImpl.java:1334)
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>     at java.lang.Thread.run(Thread.java:748)
> [warn 2018/11/13 15:08:09.618 PST <Handshaker 0.0.0.0/0.0.0.0:15000 Thread 0> 
> tid=99] Cache server: failed accepting client connection  {0}
> java.io.EOFException
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.handleNewClientConnection(AcceptorImpl.java:1430)
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl$6.run(AcceptorImpl.java:1334)
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>     at java.lang.Thread.run(Thread.java:748)
> [warn 2018/11/13 15:08:09.624 PST <Handshaker 0.0.0.0/0.0.0.0:15000 Thread 0> 
> tid=99] Error processing client connection
> java.lang.IllegalArgumentException: unknown communications mode: 84
>     at 
> org.apache.geode.internal.cache.tier.CommunicationMode.fromModeNumber(CommunicationMode.java:164)
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.getCommunicationModeForNonSelector(AcceptorImpl.java:1558)
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.handleNewClientConnection(AcceptorImpl.java:1422)
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl$6.run(AcceptorImpl.java:1334)
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>     at java.lang.Thread.run(Thread.java:748)
> [warn 2018/11/13 15:08:09.624 PST <Handshaker 0.0.0.0/0.0.0.0:15000 Thread 0> 
> tid=99] Cache server: failed accepting client connection  {0}
> java.io.EOFException
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.handleNewClientConnection(AcceptorImpl.java:1430)
>     at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl$6.run(AcceptorImpl.java:1334)
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>     at java.lang.Thread.run(Thread.java:748)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to