Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main container will not start #438

Open
3 tasks done
TheCrockett opened this issue Jun 2, 2024 · 8 comments
Open
3 tasks done

Main container will not start #438

TheCrockett opened this issue Jun 2, 2024 · 8 comments

Comments

@TheCrockett
Copy link

Support guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

[cont-init.d] 07-svc-cron.sh: executing...
mkdir: cannot create directory ‘/var/spool/cron/crontabs’: Invalid argument
[cont-init.d] 07-svc-cron.sh: exited 1.

Expected behaviour

starting

Actual behaviour

[cont-init.d] 07-svc-cron.sh: executing...
mkdir: cannot create directory ‘/var/spool/cron/crontabs’: Invalid argument
[cont-init.d] 07-svc-cron.sh: exited 1.

Steps to reproduce

docker run -d --restart=always 8070:8000 -v rse-librenms:/data -e TZ=America/New_York -e DB_HOST=192.168.1.51 -e DB_NAME=librenms -e DB_PASSWORD=X librenms/librenms:latest

Docker info

Checking LibreNMS plugins...
Fixing perms...
Checking additional Monitoring plugins...
Checking alert templates...
[cont-init.d] 03-config.sh: exited 0.
[cont-init.d] 04-svc-main.sh: executing... 
Waiting 60s for database to be ready...
Database ready!
Updating database schema...

   INFO  Nothing to migrate.  


   INFO  Seeding database.  

  Database\Seeders\DefaultAlertTemplateSeeder ........................ RUNNING  
  Database\Seeders\DefaultAlertTemplateSeeder ...................... 2 ms DONE  

  Database\Seeders\ConfigSeeder ...................................... RUNNING  
  Database\Seeders\ConfigSeeder .................................... 3 ms DONE  

  Database\Seeders\RolesSeeder ....................................... RUNNING  
  Database\Seeders\RolesSeeder .................................... 34 ms DONE  

Clear cache

   INFO  Application cache cleared successfully.  


   INFO  Configuration cached successfully.  

[cont-init.d] 04-svc-main.sh: exited 0.
[cont-init.d] 05-svc-dispatcher.sh: executing... 
[cont-init.d] 05-svc-dispatcher.sh: exited 0.
[cont-init.d] 06-svc-syslogng.sh: executing... 
[cont-init.d] 06-svc-syslogng.sh: exited 0.
[cont-init.d] 07-svc-cron.sh: executing... 
mkdir: cannot create directory ‘/var/spool/cron/crontabs’: Invalid argument
[cont-init.d] 07-svc-cron.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Docker Compose config

I don't use docker compose

Logs

na

Additional info

No response

@crazy-max
Copy link
Member

Can you show the output of docker info command please?

@TheCrockett
Copy link
Author

Certainly (no updates available)

[bcrockett@docker51 ~]$ docker info
Client: Docker Engine - Community
Version: 26.1.3
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.14.0
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.27.0
Path: /usr/libexec/docker/cli-plugins/docker-compose

@crazy-max
Copy link
Member

Can you post full output please? Like:

Client: Docker Engine - Community
 Version:    24.0.9
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.24.6
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 9
  Running: 9
  Paused: 0
  Stopped: 0
 Images: 13
 Server Version: 24.0.9
 Storage Driver: overlay2
  Backing Filesystem: zfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.5.13-1-pve
 Operating System: Debian GNU/Linux 12 (bookworm)
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 62.69GiB
 Name: brain
 ID: f528cd15-42a0-4efe-8448-906f48ed38a0
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Default Address Pools:
   Base: 172.19.0.0/16, Size: 24

@TheCrockett
Copy link
Author

TheCrockett commented Jun 2, 2024

sorry

[bcrockett@docker51 ~]$ sudo docker info
Client: Docker Engine - Community
 Version:    26.1.3
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 278
  Running: 21
  Paused: 0
  Stopped: 257
 Images: 161
 Server Version: 26.1.3
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: nvidia runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8b3b7ca2e5ce38e8f31a34f35b2b68ceb8470d89
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.14.0-427.16.1.el9_4.x86_64
 Operating System: Rocky Linux 9.4 (Blue Onyx)
 OSType: linux
 Architecture: x86_64
 CPUs: 56
 Total Memory: 251.3GiB
 Name: docker51.rse.local
 ID: (OBFUSCATED)
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: thecrockett
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

@crazy-max
Copy link
Member

Operating System: Rocky Linux 9.4 (Blue Onyx)

Might be an issue with your host, this looks similar to #352

What's the output of the following commands?:

$ docker run -it alpine
/ # ls -al /var/spool
/ # rm -rf /var/spool/cron

@TheCrockett
Copy link
Author

TheCrockett commented Jun 2, 2024

Seems like it works

[root@docker51 ~]# docker run -it alpine
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
d25f557d7f31: Pull complete 
Digest: sha256:77726ef6b57ddf65bb551896826ec38bc3e53f75cdde31354fbffb4f25238ebd
Status: Downloaded newer image for alpine:latest
/ # ls -al /var/spool/
total 12
drwxr-xr-x    3 root     root          4096 May 22 09:47 .
drwxr-xr-x   12 root     root          4096 May 22 09:47 ..
drwxr-xr-x    2 root     root          4096 May 22 09:47 cron
lrwxrwxrwx    1 root     root             9 May 22 09:47 mail -> /var/mail
/ # rm -rf /var/spool/cron/
/ # 

@TheCrockett
Copy link
Author

Any update/resolution here?

@adminas8dev
Copy link

adminas8dev commented Nov 8, 2024

# ls -al /var/spool/cron/
total 2
drwxr-xr-x    2 root     root             3 Sep  6 11:34 .
drwxr-xr-x    3 root     root             4 Sep  6 11:34 ..
lrwxrwxrwx    1 root     root            13 Sep  6 11:34 crontabs -> /etc/crontabs

# cd /var/spool/cron/
# rm -fr crontabs
# mkdir crontabs
mkdir: can't create directory 'crontabs': Invalid argument

For some reason, mkdir cannot create crontabs dir, but any other dirname works fine..

Also if the "Backing Filesystem: zfs" is not zfs, then this problem goes away..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants