elk地址在docker里配置无效?

Blade 未结 3 1439
28723476@qq.com
28723476@qq.com 2020-11-16 19:14

一、该问题的重现步骤是什么?

1. 启动elk;

2. 在docker中增加配置:

blade-admin:

    image: "${REGISTER}/blade/blade-admin:${TAG}"

    environment:

      - TZ=Asia/Shanghai

      - JVM_OPTS=-Xmx256m -Xms256m -XX:MaxPermSize=256m

    ports:

    - 7002:7002

    privileged: true

    command:

      - --spring.profiles.active=test

      - --blade.log.elk.destination=192.168.6.97:9000

3.docker里显示配置已经存在:

"Cmd": [

                "--spring.profiles.active=test",

                "--blade.log.elk.destination=192.168.6.97:9000"

4.docker里显示连接还是默认的配置:

-WARN in net.logstash.logback.appender.LogstashTcpSocketAppender[INFO_LOGSTASH] - Log destination 172.30.0.72:9000: connection failed. java.net.NoRouteToHostException: No route to host (Host unreachable)

        at java.net.NoRouteToHostException: No route to host (Host unreachable)

        at      at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)

        at      at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)

        at      at java.net.AbstractPlainSocketImpl.connect(Unknown Source)

        at      at java.net.SocksSocketImpl.connect(Unknown Source)

        at      at java.net.Socket.connect(Unknown Source)

        at      at net.logstash.logback.appender.AbstractLogstashTcpSocketAppender$TcpSendingEventHandler.openSocket(AbstractLogstashTcpSocketAppender.java:719)

        at      at net.logstash.logback.appender.AbstractLogstashTcpSocketAppender$TcpSendingEventHandler.onStart(AbstractLogstashTcpSocketAppender.java:639)

        at      at net.logstash.logback.appender.AsyncDisruptorAppender$EventClearingEventHandler.onStart(AsyncDisruptorAppender.java:351)

        at      at net.logstash.logback.encoder.com.lmax.disruptor.BatchEventProcessor.notifyStart(BatchEventProcessor.java:224)

        at      at net.logstash.logback.encoder.com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:120)

        at      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

        at      at java.util.concurrent.FutureTask.run(Unknown Source)

        at      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)

        at      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

        at      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

        at      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)


二、你期待的结果是什么?实际看到的又是什么?

能够连上:192.168.6.97:9000


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

2.7.0,Linux


四、请提供详细的错误堆栈信息,这很重要。

-WARN in net.logstash.logback.appender.LogstashTcpSocketAppender[INFO_LOGSTASH] - Log destination 172.30.0.72:9000: connection failed. java.net.NoRouteToHostException: No route to host (Host unreachable)

        at java.net.NoRouteToHostException: No route to host (Host unreachable)

        at      at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)

        at      at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)

        at      at java.net.AbstractPlainSocketImpl.connect(Unknown Source)

        at      at java.net.SocksSocketImpl.connect(Unknown Source)

        at      at java.net.Socket.connect(Unknown Source)

        at      at net.logstash.logback.appender.AbstractLogstashTcpSocketAppender$TcpSendingEventHandler.openSocket(AbstractLogstashTcpSocketAppender.java:719)

        at      at net.logstash.logback.appender.AbstractLogstashTcpSocketAppender$TcpSendingEventHandler.onStart(AbstractLogstashTcpSocketAppender.java:639)

        at      at net.logstash.logback.appender.AsyncDisruptorAppender$EventClearingEventHandler.onStart(AsyncDisruptorAppender.java:351)

        at      at net.logstash.logback.encoder.com.lmax.disruptor.BatchEventProcessor.notifyStart(BatchEventProcessor.java:224)

        at      at net.logstash.logback.encoder.com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:120)

        at      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

        at      at java.util.concurrent.FutureTask.run(Unknown Source)

        at      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)

        at      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

        at      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

        at      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

五、若有更多详细信息,请在下面提供。

3条回答
提交回复