setiseta / docker-librenms

LibreNMS Docker based on Phusion Baseimage
23 stars 23 forks source link

many files not found in docker #43

Open changchichung opened 3 years ago

changchichung commented 3 years ago

docker logs

librenms    | 
librenms    | /etc/my_init.d/init.sh: line 45: cd: /opt/librenms: No such file or directory
librenms    | mv: cannot stat '/opt/librenms/rrd/.gitignore': No such file or directory
librenms    | ln: failed to create symbolic link '/opt/librenms/rrd': No such file or directory
librenms    | ln: failed to create symbolic link '/opt/librenms/html/plugins': No such file or directory
librenms    | mv: cannot stat '/opt/librenms/logs/.gitignore': No such file or directory
librenms    | ln: failed to create symbolic link '/opt/librenms/logs': No such file or directory
librenms    | cp: cannot stat '/opt/librenms/librenms.nonroot.cron': No such file or directory
librenms    | chmod: cannot access '/etc/cron.d/librenms': No such file or directory
librenms    | cp: cannot stat '/opt/librenms/misc/librenms.logrotate': No such file or directory
librenms    | ln: failed to create symbolic link '/opt/librenms/config.php': No such file or directory
librenms    | chown: cannot access '/opt/librenms': No such file or directory
librenms    | sed: can't read /etc/cron.d/librenms: No such file or directory
librenms    | sed: can't read /etc/cron.d/librenms: No such file or directory
librenms    | sed: can't read /etc/cron.d/librenms: No such file or directory
librenms    | Waiting for database server to accept connections
librenms    | DB connection is ok
librenms    | mysql: [Warning] Using a password on the command line interface can be insecure.
librenms    | Activate master services
librenms    | chown: cannot access '/opt/librenms': No such file or directory
librenms    | setfacl: /opt/librenms/rrd: No such file or directory
librenms    | setfacl: /opt/librenms/logs: No such file or directory
librenms    | setfacl: /opt/librenms/bootstrap/cache/: No such file or directory
librenms    | setfacl: /opt/librenms/storage/: No such file or directory
librenms    | setfacl: /opt/librenms/rrd: No such file or directory
librenms    | setfacl: /opt/librenms/logs: No such file or directory
librenms    | setfacl: /opt/librenms/bootstrap/cache/: No such file or directory
librenms    | setfacl: /opt/librenms/storage/: No such file or directory
librenms    | ============================================
librenms    | Run daily to switch to update channel
librenms    | 
librenms    | On a fresh installation, the database will be set up. Please be patient
librenms    | 
librenms    | /etc/my_init.d/init.sh: line 368: /opt/librenms/daily.sh: No such file or directory
librenms    | /etc/my_init.d/init.sh: line 373: cd: /opt/librenms: No such file or directory
librenms    | warning: commands will be executed using /bin/sh
librenms    | job 1 at Wed Aug 18 16:01:00 2021
librenms    | init done
librenms    | *** Booting runit daemon...
librenms    | *** Runit started as PID 6315
librenms    | nginx: [emerg] open() "/opt/librenms/logs/access_log" failed (2: No such file or directory)
librenms    | nginx: [emerg] open() "/opt/librenms/logs/access_log" failed (2: No such file or directory)
librenms    | nginx: [emerg] open() "/opt/librenms/logs/access_log" failed (2: No such file or directory)

docker-compose.yml

version: '3'

services:
  mysql:
    image: mariadb
    container_name: librenms-db
    volumes:
      - ./mysql:/var/lib/mysql
      - ./50-server.cnf:/etc/mysql/mariadb.conf.d/50-server.cnf:ro
    environment:
      - MYSQL_ROOT_PASSWORD=pwd4librenms
      - MYSQL_DATABASE=librenms
      - TZ=Asia/Taipei
    restart: always

  librenms:
    image: seti/librenms
    container_name: librenms
    hostname: librenms
    volumes:
      - ./data:/data
    ports:
      - 8003:80
      - 514:514/tcp
      - 514:514/udp
    depends_on:
      - mysql
    environment:
      - DB_TYPE=mysql
      - DB_HOST=mysql
      - DB_NAME=librenms
      - DB_USER=root
      - DB_PASS=pwd4librenms
      - TZ=Asia/Taipei
      - POLLER=24
      - SERVICES_ENABLED=1
      - UPDATE_CHANNEL=master
      - SYSLOG_ENABLED=1
    restart: always

any suggestions ??

setiseta commented 3 years ago

Can you give the full log output? Lines before the first line from your logs, the folder /opt/librenms/ should be created by git clone.