Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting up gzip compression to optimize text throughtput

883451Aug 19 2011 — edited Aug 22 2011
Hello,

I struggled to setup my dev cluster with gzip but it's running okay. However I cannot connect to it from .Net client. The server complains with Not in GZIP format

What do I miss?

Thanks,
Michal

BTW: The for doc .Net is not very great (since when one put's documentation in a dtd file?!? see [Network Filters |http://coherence.oracle.com/display/COH35UG/Network+Filters#]... ).


On client I have

app.config

<coherence>
<coherence-config>Config\coherence.xml</coherence-config>
<cache-config>Config\cache-config.xml</cache-config>
<pof-config>Config\pof-config.xml</pof-config>
</coherence>

cache-config.xls

<cache-config xmlns="http://schemas.tangosol.com/cache">
<caching-scheme-mapping>
<cache-mapping>
<cache-name>dist-contact-cache</cache-name>
<scheme-name>extend-direct</scheme-name>
</cache-mapping>
</caching-scheme-mapping>
<caching-schemes>
<remote-cache-scheme>
<scheme-name>extend-direct</scheme-name>
<service-name>ExtendTcpCacheService</service-name>
<initiator-config>
<tcp-initiator>
<remote-addresses>
<socket-address>
<address>[name of my machine]</address>
<port>9099</port>
</socket-address>
</remote-addresses>
</tcp-initiator>
<outgoing-message-handler>
<request-timeout>30s</request-timeout>
</outgoing-message-handler>
*<use-filters><filter-name>gzip</filter-name></use-filters>*
</initiator-config>
</remote-cache-scheme>
</caching-schemes>
</cache-config>

msg from the client:

Oracle Coherence for .NET Version 3.7.0.0 Build 23256
RTC Release Build
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

2011-08-19 13:39:26.714 <D5> (thread=System.Threading.Thread): Loaded operational configuration from "FileResource(Uri = file://Config\coherence.xml, AbsolutePath = O:\bin\Debug\Config\coherence.xml)"
2011-08-19 13:39:26.714 <D5> (thread=System.Threading.Thread): Loaded cache configuration from "FileResource(Uri = file://Config\cache-config.xml, AbsolutePath = O:\bin\Debug\Config\cache-config.xml)"
2011-08-19 13:39:26.855 <D5> (thread=ExtendTcpCacheService:TcpInitiator): Started: TcpInitiator{Name=ExtendTcpCacheService:TcpInitiator, State=(Started), Codec=Tangosol.Net.Messaging.Impl.Codec, PingInterval=0, PingTimeout=30000, RequestTimeout=30000, ConnectTimeout=30000, RemoteAddresses=[10.166.110.67:9099], KeepAliveEnabled=True, TcpDelayEnabled=False, ReceiveBufferSize=0, SendBufferSize=0, LingerTimeout=-1}
2011-08-19 13:39:26.870 <D5> (thread=System.Threading.Thread): Connecting Socket to 10.166.110.67:9099
2011-08-19 13:39:26.870 <Info> (thread=System.Threading.Thread): Connected TcpClient to 10.166.110.67:9099
2011-08-19 13:39:26.917 <D5> (thread=ExtendTcpCacheService:TcpInitiator): Loaded POF configuration from "FileResource(Uri = file://Config\pof-config.xml, AbsolutePath = O:\bin\Debug\Config\pof-config.xml)"
2011-08-19 13:39:26.933 <D5> (thread=ExtendTcpCacheService:TcpInitiator): Loaded included POF configuration from "EmbeddedResource(Uri = assembly://Coherence/Tangosol.Config/coherence-pof-config.xml, AbsolutePath = assembly://Coherence/Tangosol.Config/coherence-pof-config.xml)"
2011-08-19 13:39:27.011 <Info> (thread=System.Threading.Thread): Error establishing a connection with 10.166.110.67:9099: Tangosol.Net.Messaging.ConnectionException: TcpConnection(Id=, Open=True, LocalAddress=0.0.0.0:3551, RemoteAddress=10.166.110.67:9099)
2011-08-19 13:39:27.011 <Error> (thread=System.Threading.Thread): Error while starting service "ExtendTcpCacheService": Tangosol.Net.Messaging.ConnectionException: could not establish a connection to one of the following addresses: [10.166.110.67:9099]; make sure the "remote-addresses" configuration element contains an address and port of a running TcpAcceptor
2011-08-19 13:39:27.026 <D5> (thread=ExtendTcpCacheService:TcpInitiator): Stopped: TcpInitiator{Name=ExtendTcpCacheService:TcpInitiator, State=(Stopped), Codec=Tangosol.Net.Messaging.Impl.Codec, PingInterval=0, PingTimeout=30000, RequestTimeout=30000, ConnectTimeout=30000, RemoteAddresses=[10.166.110.67:9099], KeepAliveEnabled=True, TcpDelayEnabled=False, ReceiveBufferSize=0, SendBufferSize=0, LingerTimeout=-1}

Unhandled Exception: Tangosol.Net.Messaging.ConnectionException: could not establish a connection to one of the following addresses: [10.166.110.67:9099]; make sure the "remote-addresses" configuration element contains an address and port of a running TcpAcceptor


My server config is

config\tangosol-coherence-override.xml

<?xml version="1.0"?>
<!DOCTYPE coherence SYSTEM "coherence.dtd">
<coherence>
<cluster-config>
*<filter>*
*<filter-name>gzip</filter-name>*
*<filter-class>com.tangosol.net.CompressionFilter</filter-class>*
*<init-params>*
*<init-param>*
*<param-name>strategy</param-name>*
*<param-value>gzip</param-value>*
*</init-param>*
*<init-param>*
*<param-name>level</param-name>*
*<param-value>speed</param-value>*
*</init-param>*
*</init-params>*
*</filter>*
</cluster-config>
</coherence>

and config/contact-cache-config.xml


<cache-config>
<defaults>
<serializer>pof</serializer>
</defaults>

<caching-scheme-mapping>
<cache-mapping>
<cache-name>dist-*</cache-name>
<scheme-name>dist-default</scheme-name>
</cache-mapping>
<cache-mapping>
<cache-name>repl-*</cache-name>
<scheme-name>repl-default</scheme-name>
</cache-mapping>
<cache-mapping>
<cache-name>aspnet-session-storage</cache-name>
<scheme-name>aspnet-session-scheme</scheme-name>
</cache-mapping>
<cache-mapping>
<cache-name>aspnet-session-overflow</cache-name>
<scheme-name>aspnet-session-overflow-scheme</scheme-name>
</cache-mapping>
</caching-scheme-mapping>

<caching-schemes>
<distributed-scheme>
<scheme-name>aspnet-session-scheme</scheme-name>
<scheme-ref>dist-default</scheme-ref>
<service-name>AspNetSessionCache</service-name>

<backing-map-scheme>
<local-scheme>
<class-name>com.tangosol.net.cache.LocalCache</class-name>
<listener>
<class-scheme>
<class-name>
com.tangosol.net.internal.AspNetSessionStoreProvider$SessionCleanupListener
</class-name>
<init-params>
<init-param>
<param-type>com.tangosol.net.BackingMapManagerContext</param-type>
<param-value>{manager-context}</param-value>
</init-param>
</init-params>
</class-scheme>
</listener>
</local-scheme>
</backing-map-scheme>

<autostart>true</autostart>
</distributed-scheme>

<distributed-scheme>
<scheme-name>aspnet-session-overflow-scheme</scheme-name>
<scheme-ref>dist-default</scheme-ref>
<service-name>AspNetSessionCache</service-name>
<autostart>true</autostart>
</distributed-scheme>

<distributed-scheme>
<scheme-name>dist-default</scheme-name>


<backing-map-scheme>
<local-scheme/>
</backing-map-scheme>

<autostart>true</autostart>
</distributed-scheme>

<replicated-scheme>
<scheme-name>repl-default</scheme-name>
<backing-map-scheme>
<local-scheme/>
</backing-map-scheme>

<autostart>true</autostart>
</replicated-scheme>

<proxy-scheme>
<service-name>ExtendTcpProxyService</service-name>
<thread-count>5</thread-count>
<acceptor-config>
<tcp-acceptor>
<local-address>
<address>localhost</address>
<port>9099</port>
</local-address>
</tcp-acceptor>
*<use-filters><filter-name>gzip</filter-name></use-filters>*
</acceptor-config>

<autostart>true</autostart>
</proxy-scheme>
</caching-schemes>
</cache-config>


And I get

2011-08-19 13:39:27.008/7012.815 Oracle Coherence GE 3.7.0.0 <Error> (thread=Proxy:ExtendTcpProxyService:TcpAcceptor, me
mber=2): An exception occurred while decoding a Message for Service=Proxy:ExtendTcpProxyService:TcpAcceptor received fro
m: TcpConnection(Id=null, Open=true, LocalAddress=10.166.110.67:9099, RemoteAddress=10.166.110.54:3551): java.io.IOExcep
tion: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:143)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:67)
at com.tangosol.net.CompressionFilter.getInputStream(CompressionFilter.java:57)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.onNotify(Peer.CDB:54)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
at java.lang.Thread.run(Thread.java:662)

Edited by: 880448 on Aug 19, 2011 10:58 AM

Edited by: 880448 on Aug 19, 2011 11:07 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 19 2011
Added on Aug 19 2011
5 comments
401 views