0
votes

[SOLVED]
In my case, the logtrail.json was in the wrong directory. It should be in /usr/share/kibana/plugins/logtrail not in /usr/share/kibana/plugins


Docker version: 1.10.3, build 9e83765
OS: SUSE Linux (x86_64)
Docker compose version: 1.7.1, build 0a9ab35
Elastic/Logstash/Kibana/Filebeat version: 7.6.1
Logtrail version: 7.6.1-0.1.31

I have docker-compose.yml file for all of ELK+FB (filebeat) services. For Kibana it's:

kibana:
    container_name: kibana
    hostname: kibana
    build:
        context: .
        dockerfile: kibanaWithLogtrail.Dockerfile
    logging:
        driver: "json-file"
        options:
            max-file: "5"
            max-size: "100m"
    ports:
     - "5601:5601"
    networks:
     - elk_stack_net
    depends_on:
     - elasticsearch
     - logstash
     - filebeat

And kibanaWithLogtrail.Dockerfile is:

FROM docker.elastic.co/kibana/kibana:7.6.1

RUN cd /usr/share/kibana && ./bin/kibana-plugin install https://github.com/sivasamyk/logtrail/releases/download/v0.1.31/logtrail-7.6.1-0.1.31.zip
COPY logtrail.json /usr/share/kibana/plugins/

When I do docker-compose up -d it does:

Creating network "elk_elk_stack_net" with driver "bridge"
Building kibana
Step 1 : FROM docker.elastic.co/kibana/kibana:7.6.1
 ---> f9ca33465ce3
Step 2 : RUN cd /usr/share/kibana && ./bin/kibana-plugin install https://github.com/sivasamyk/logtrail/releases/download/v0.1.31/logtrail-7.6.1-0.1.31.zip
 ---> Running in 21143bdfdab7
Attempting to transfer from https://github.com/sivasamyk/logtrail/releases/download/v0.1.31/logtrail-7.6.1-0.1.31.zip
Transferring 4715586 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin installation complete
 ---> 42fbfd43f29c
Removing intermediate container 21143bdfdab7
Step 3 : COPY logtrail.json /usr/share/kibana/plugins/
 ---> ad684aaad73e
Removing intermediate container 6fce376b8719
Successfully built ad684aaad73e
Creating elasticsearch
Creating logstash
Creating filebeat
Creating kibana

The only problem I have is that kibana can't start. It tries to perform "optimizie" step:

["info","optimize"],"pid":7,"message":"Optimizing and caching bundles for core, graph, monitoring, space_selector, login, overwritten_session, logout, logged_out, ml, dashboardViewer, apm, maps, canvas, infra, siem, uptime and lens. This may take a few minutes"}

But after a minute or two it fails with: very long message that start with:

"message": "{ Error: Optimizations failure.\n 6589 modules\n \n ERROR in ./x-pack/legacy/plugins/canvas/public/components/app/index.js\n
Module not found: Error: Can't resolve 'plugins/interpreter/canvas/load_legacy_server_function_wrappers' in '/usr/share/kibana/x-pack/legacy/plugins/canvas/public/components/app'\n \n ERROR in ./x-pack/legacy/plugins/canvas/public/lib/run_interpreter.js\n
Module not found: Error: Can't resolve 'plugins/interpreter/canvas/load_legacy_server_function_wrappers' in '/usr/share/kibana/x-pack/legacy/plugins/canvas/public/lib'\n \n
ERROR in ./x-pack/legacy/plugins/canvas/public/legacy_start.js\n
Module not found: Error: Can't resolve 'plugins/interpreter/interpreter' in '/usr/share/kibana/x-pack/legacy/plugins/canvas/public'\n \n
ERROR in ./x-pack/legacy/plugins/canvas/public/components/app/index.js\n
Module not found: Error: Can't resolve 'plugins/interpreter/interpreter' in '/usr/share/kibana/x-pack/legacy/plugins/canvas/public/components/app'\n \n ERROR in ./x-pack/legacy/plugins/canvas/public/components/datasource/datasource_preview/index.js\n Module not found: Error: Can't resolve 'plugins/interpreter/interpreter' in '/usr/share/kibana/x-pack/legacy/plugins/canvas/public/components/datasource/datasource_preview'\n \n ERROR in ./x-pack/legacy/plugins/canvas/public/components/function_form_list/index.js\n Module not found: Error: Can't resolve 'plugins/interpreter/interpreter' in '/usr/share/kibana/x-pack/legacy/plugins/canvas/public/components/function_form_list'\n \n ERROR in ./x-pack/legacy/plugins/canvas/public/functions/filters.js\n Module not found: Error: Can't resolve 'plugins/interpreter/interpreter' in '/usr/share/kibana/x-pack/legacy/plugins/canvas/public/functions'\

and the errors like this:

FATAL Error: Optimizations failure. 6589 modules

ERROR in. / x - pack / legacy / plugins / canvas / public / components / app / index.js Module not found: Error: Can 't resolve ' plugins / interpreter / canvas / load_legacy_server_function_wrappers ' in ' / usr / share / kibana / x - pack / legacy / plugins / canvas / public / components / app '

ERROR in ./x-pack/legacy/plugins/canvas/public/lib/run_interpreter.js Module not found: Error: Can' t resolve 'plugins/interpreter/canvas/load_legacy_server_function_wrappers' in '/usr/share/kibana/x-pack/legacy/plugins/canvas/public/lib'

ERROR in. / x - pack / legacy / plugins / canvas / public / legacy_start.js Module not found: Error: Can 't resolve ' plugins / interpreter / interpreter ' in ' / usr / share / kibana / x - pack / legacy / plugins / canvas / public '

ERROR in ./x-pack/legacy/plugins/canvas/public/components/app/index.js Module not found: Error: Can' t resolve 'plugins/interpreter/interpreter' in '/usr/share/kibana/x-pack/legacy/plugins/canvas/public/components/app'

  • The weird part is that it works fine when I delete COPY logtrail.json /usr/share/kibana/plugins from dockerfile. But it worked before and I didn't change anything, so I truly doubt that logtrail.json file is wrong or have incorrect configuration
  • The seconds thing is that I am not low on resources. There is enough storage and RAM.
  • Other services start properly
1
I’m voting to close this question because it was solved by the authoruser3529850

1 Answers

0
votes

Try use different path

COPY logtrail.json /usr/share/kibana/plugins/logtrail/logtrail.json