AWS Elatic Memcache logs piling up in Application server

1.1k Views Asked by At

I am implemented Elastic Memcahce in Java and deployed on WildFly application server with the below code, When i deployed on AWS, some how getting non stop loggers as below which eating my server log size. Can some one please help me is something need do settings.

String configEndpoint = "xxxx.xxxx.xxx.xxx.cache.amazonaws.com";
Integer clusterPort = 11211;
MemcachedClient client = new MemcachedClient(new InetSocketAddress(configEndpoint, clusterPort));
client.set("key1", 1000, "test");
System.out.println("----Get From Cache-----"+client.get("key1"));
client.shutdown();

Library:

<dependency>
    <groupId>com.amazonaws</groupId>
    <artifactId>elasticache-java-cluster-client</artifactId>
    <version>1.1.1</version>  
</dependency> 

Error Log

2018-06-06 23:42:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:42:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:43:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:43:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:43:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:43:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:44:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:44:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:44:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:44:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:45:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:45:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:45:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:45:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:46:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:46:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:46:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:46:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:47:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:47:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:47:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:47:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:48:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:48:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:48:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:48:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:49:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:49:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:49:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:49:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:50:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:50:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:50:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:50:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:51:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:51:58.043 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
2018-06-06 23:51:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:51:58.044 INFO net.spy.memcached.ConfigurationPoller:  Endpoint to use for configuration access in this poll NodeEndPoint - HostName:xxx-elastic.xxx.0001.euc1.cache.amazonaws.com IpAddress:172.31.XX.XXX Port:11211
2018-06-06 23:52:58,044 ERROR [stderr] (pool-8-thread-1) 2018-06-06 23:52:58.044 INFO net.spy.memcached.ConfigurationPoller:  Starting configuration poller.
1

There are 1 best solutions below

0
Javawsdev On

I had the same issue using wildfly and elasticache on aws.
The issue is writing INFO level logs into stderr as ERROR level. You could technically just ignore all stderr logs lower than FATAL level, but I did not want to do that. So I added this under the logging subsystem under Wildfly standalone.xml (if you're running in standalone mode, otherwise use the relevant xml):

<logger category="stderr">
        <filter-spec value="match(&quot;INFO&quot;)"/>
        <level name="OFF"/>
</logger>

This way the INFO levels don't get written to stderr but you get all other stderr logs, which should be very few.