Graylog fail to run on centos when transfering images to another machine

Hi, I tried to run graylog on CentOS Linux release 7.6.1810 (Core) machine A and everything works well.
Then I copyied docker images and docker-compose.yml to another CentOS Linux release 7.6.1810 (Core) machine B, repeat same but failed

docker-compose.yml:

version: '3'
services:
    # MongoDB: https://hub.docker.com/_/mongo/
    mongo:
      image: mongo:4.2
      networks:
        - graylog
    # Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/docker.html
    elasticsearch:
      image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
      environment:
        - http.host=0.0.0.0
        - transport.host=localhost
        - network.host=0.0.0.0
        - "ES_JAVA_OPTS=-Dlog4j2.formatMsgNoLookups=true -Xms512m -Xmx512m"
      ulimits:
        memlock:
          soft: -1
          hard: -1
      deploy:
        resources:
          limits:
            memory: 1g
      networks:
        - graylog
     # Graylog: https://hub.docker.com/r/graylog/graylog/
    graylog:
      image: graylog/graylog:4.3
      environment:
        # CHANGE ME (must be at least 16 characters)!
        - GRAYLOG_PASSWORD_SECRET=somepasswordpepper
        # Password: admin
        - GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
        - GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9005
        - GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9005/
      entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 --  /docker-entrypoint.sh
      networks:
        - graylog
      restart: always
      depends_on:
        - mongo
        - elasticsearch
      ports:
        # Graylog web interface and REST API
        - 9005:9005
        # Syslog TCP
        - 1515:1515
        # Syslog UDP
        - 1515:1515/udp
        # GELF TCP
        - 12202:12202
        # GELF UDP
        - 12202:12202/udp
networks:
    graylog:
      driver: bridge

I tried to load saved image and run another centos machine with commands below:

docker load -i es.tar
docker load -i graylog.tar
docker load -i mongo.tar

docker-compose up

startup log shows:

I saved images by command docker save -o.

docker ps shows:

Hello @hel

Hard to read the screen shots over here. from what I can see it looks like you maybe missing
Plugin _dir and something called realpath: operand which I’m not sure of.

Is it possible to show full log for graylog?

@gsmith
docker graylog logs:

graylog_1    | realpath: missing operand
graylog_1    | Try 'realpath --help' for more information.
graylog_1    | wait-for-it: waiting 15 seconds for elasticsearch:9200
graylog_1    | wait-for-it: elasticsearch:9200 is available after 11 seconds 
graylog_1    | find '/plugins-default/': No such file or directory
cp_graylog_1   exited with code 1

graylog_1    | realpath: missing operand
graylog_1    | Try 'realpath --help' for more information.
graylog_1    | wait-for-it: waiting 15 seconds for elasticsearch:9200
graylog_1    | wait-for-it: elasticsearch:9200 is available after 0 seconds 
graylog_1    | find '/plugins-default/': No such file or directory
cp_graylog_1   exited with code 1

process of elasticsearch and mongo seems works well

hello,

I see these two, have you check the plugin directory?

The container of graylog doesn’t startup successfully, so I can’t enter the container to check that directory. That container is always in restarting.

Hey,

What does it show in the logs why Docker cant start your container?
I know I had to reference my journalctl -x. Are you able to check the rest of the logs to find out why Graylog container will not start?

@hel

This is my compose file, not sure if it will help but You can see I have a plugin directory

graylog:
    #image: graylog/graylog-enterprise:4.3.3-jre11
    image: graylog/graylog-enterprise:4.3.8-jre11
    network_mode: bridge
    dns:
      - 8.8.8.8
      - 8.8.4.4
   # journal and config directories in local NFS share for persistence
    volumes:
       - graylog_journal:/usr/share/graylog/data/journal     
       - graylog_bin:/usr/share/graylog-server/bin/
       - graylog_data:/usr/share/graylog/data/config
       - graylog_log:/usr/share/graylog/data/log
       - graylog_plugin:/usr/share/graylog/data/plugin
       - graylog_content:/usr/share/graylog/data/contentpacks
      # Mount local configuration directory into Docker container
       - graylog_scripts:/usr/share/graylog/scripts      
    environment:
      # Container time Zone
      - TZ=America/Chicago
      # CHANGE ME (must be at least 16 characters)!
      - GRAYLOG_PASSWORD_SECRET=pJod1TRZAckHmqM2oQPqX1qnLV

I have posted docker logs above. The log repeats
graylog_1 | realpath: missing operand graylog_1 | Try 'realpath --help' for more information. graylog_1 | wait-for-it: waiting 15 seconds for elasticsearch:9200 graylog_1 | wait-for-it: elasticsearch:9200 is available after 11 seconds graylog_1 | find '/plugins-default/': No such file or directory cp_graylog_1 exited with code 1

I run graylog with docker-compose. docker-compose.yml is the same with Docker and Example Version 3 section.

version of docker is : 1.13.1

hey,

I understand , Hence why I was suggesting and defining the logs for you.

EDIT:

Unfortunately those logs don’t help as much as other logs would have to troubleshoot this issue.
Posting them would or might have helped. Sorry I cant be further assistance.

@hel So…Docker 1.13.1 is 5 years old (see Docker Engine release notes | Docker Documentation). Is there a reason you’re running such an old version and not running something that’s more recent (FWIW, the current docker version is 20.10.1 Docker Engine release notes | Docker Documentation). I think you’d find that running a more recent version of Docker that’s supported would give you a better result.

1 Like

@aaronsachs Yes. I upgrade docker to v20.10.9 and graylog startup successfully. The Welcome page of graylog is shown. The /api/system/sessions returns 200 and session_id is returned./api/users/admin returns 401. /api/users/admin is sent without cookie by browser. There is no proxy.

Username and password is correct.

How can I find log file to solve this 401 problem. Thanks.

And api/system/sessions also returns valid_util. Its value is very near to the time the reponse is received. It seems to affect Response’s Set-Cookie Expires value. I don’t whether it’s related to the 401 response.

It’s my local network issue. After upgrading docker, graylog works well. Thanks.

Ah! Good to know. Thanks for the update!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.