Skip to content
This repository was archived by the owner on Jun 29, 2023. It is now read-only.
This repository was archived by the owner on Jun 29, 2023. It is now read-only.

GelfREDISSender.close() does not stop Sentinel pool #200

@alejojo

Description

@alejojo

Hi @mp911de, I've been using logstash-gelf -> graylog with no issues for the last 2 or 3 years, thank you!

Now I want to add caching redundancy so I am checking redis-sentinel. So far is working fine, except when stopping tomcat.

When starting up there is no problem, but when shutting down it stays in INFO: Stopping Coyote HTTP/1.1 on http-PORT until I kill it.

libs ver:

  • tomcat-6 (yes, I know)
  • java-1.7.0 (yes, I know..)
  • commons-pool2-2.4.3.jar
  • jedis-3.0.1.jar
  • log4j-1.2.17.jar
  • logstash-gelf-1.13.0.jar

log4j.properties:

log4j.appender.gelf=biz.paluch.logging.gelf.log4j.GelfLogAppender
log4j.appender.gelf.Threshold=INFO
log4j.appender.gelf.Host=redis-sentinel://IP_REDIS_MASTER:26379/0?masterId=mymaster#list
log4j.appender.gelf.Version=1.1
log4j.appender.gelf.Facility=java-gelf
log4j.appender.gelf.ExtractStackTrace=true
log4j.appender.gelf.FilterStackTrace=true
log4j.appender.gelf.MdcProfiling=false
log4j.appender.gelf.MaximumMessageSize=8192
log4j.appender.gelf.AdditionalFields=appname=app

Logs catalina.out

...
May 20, 2019 3:51:38 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 223699 ms
...
May 20, 2019 3:53:50 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-PORT
May 20, 2019 3:53:51 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
May 20, 2019 3:53:51 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/app] appears to have started a thread named [MasterListener-mymaster-[IP_REDIS_MASTER:26379]] but has failed to stop it. This is very likely to create a memory leak.
May 20, 2019 3:53:51 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/app] appears to have started a thread named [commons-pool-evictor-thread] but has failed to stop it. This is very likely to create a memory leak.
May 20, 2019 3:53:52 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/app] created a ThreadLocal with key of type [biz.paluch.logging.gelf.GelfMessageAssembler$1] (value [biz.paluch.logging.gelf.GelfMessageAssembler$1@75cf74e]) and a value of type [biz.paluch.logging.gelf.intern.PoolingGelfMessageBuilder] (value [biz.paluch.logging.gelf.intern.PoolingGelfMessageBuilder@687025a8]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
May 20, 2019 3:53:52 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
May 20, 2019 3:53:55 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-PORT

Make sure that:

  • You have read the contribution guidelines.
  • You specify the logstash-gelf version and environment so it's obvious which version is affected
  • You provide a reproducible test case (either descriptive of as JUnit test) if it's a bug or the expected behavior differs from the actual behavior.

btw: Makefile is pointing to redis-2.8-something but latest release is 5.0.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions