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

Bluecherry docker not running on Fedora 38 #25

Open
Ben7230 opened this issue Sep 9, 2023 · 16 comments
Open

Bluecherry docker not running on Fedora 38 #25

Ben7230 opened this issue Sep 9, 2023 · 16 comments

Comments

@Ben7230
Copy link

Ben7230 commented Sep 9, 2023

I ran the script to install the docker container and everything went just fine until it actually started the Bluecherry server container.

There is no webpage at localhost:7001 and the container keeps restarting about every minute.

These are the logs from docker log bc-server;

Update MySQL's my.cnf from environment variables passed in from docker
Writing /root/.my.cnf
Update bluecherry server's bluecherry.conf from environment variables passed in from docker
Writing /etc/bluecherry.conf
chown bluecherry:bluecherry /var/lib/bluecherry/recordings
/usr/sbin/rsyslogd
rsyslogd: pidfile '/run/rsyslogd.pid' and pid 10 already exist.
If you want to run multiple instances of rsyslog, you need to specify
different pid files for them (-i option).
rsyslogd: run failed with error -3000 (see rsyslog.h or try https://www.rsyslog.com/e/3000 to learn what that number means)

This error keeps repeating and repeating itself.

Is there a way to bypass this problem till a fix is made?

@curtishall
Copy link
Member

curtishall commented Sep 9, 2023 via email

@Ben7230
Copy link
Author

Ben7230 commented Sep 9, 2023

Not 100% for me, rsyslog process was using around 15-18% for half a minute and then it quit. but the container keeps restarting about every minute.

A few months ago I tried it before you had the install script. Then the rsyslog process would stay running at 15-18% until I stopped the container manually.

@curtishall
Copy link
Member

curtishall commented Sep 9, 2023 via email

@curtishall
Copy link
Member

Try this command:

  sed -i 's/^LimitNOFILE=infinity$/LimitNOFILE=1048576/'  /usr/lib/systemd/system/docker.service
  sed -i 's/^LimitNOFILE=infinity$/LimitNOFILE=1048576/'  /usr/lib/systemd/system/containerd.service
  systemctl start docker
  systemctl enable docker

(You may have to restart the host if this doesn't fix it...)

@Ben7230
Copy link
Author

Ben7230 commented Sep 9, 2023

cat /usr/lib/systemd/system/docker.service >>>

[benjamin@fedora ~]$ cat /usr/lib/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target docker.socket firewalld.service containerd.service time-set.target
Wants=network-online.target containerd.service
Requires=docker.socket

[Service]
Type=notify

the default is not to use systemd for cgroups because the delegate issues still

exists and systemd currently does not support the cgroup feature set required

for containers run by docker

ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutStartSec=0
RestartSec=2
Restart=always

Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.

Both the old, and new location are accepted by systemd 229 and up, so using the old location

to make them work for either version of systemd.

StartLimitBurst=3

Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.

Both the old, and new name are accepted by systemd 230 and up, so using the old name to make

this option work for either version of systemd.

StartLimitInterval=60s

Having non-zero Limit*s causes performance problems due to accounting overhead

in the kernel. We recommend using cgroups to do container-local accounting.

LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity

Comment TasksMax if your systemd version does not support it.

Only systemd 226 and above support this option.

TasksMax=infinity

set delegate yes so that systemd does not reset the cgroups of docker containers

Delegate=yes

kill only the docker process, not all processes in the cgroup

KillMode=process
OOMScoreAdjust=-500

[Install]
WantedBy=multi-user.target
[benjamin@fedora ~]$

@Ben7230
Copy link
Author

Ben7230 commented Sep 9, 2023

cat /usr/lib/systemd/system/containerd.service >>>>

[benjamin@fedora ~]$ cat /usr/lib/systemd/system/containerd.service

Copyright The containerd Authors.

Licensed under the Apache License, Version 2.0 (the "License");

you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS,

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and

limitations under the License.

[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target local-fs.target

[Service]
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/bin/containerd

Type=notify
Delegate=yes
KillMode=process
Restart=always
RestartSec=5

Having non-zero Limit*s causes performance problems due to accounting overhead

in the kernel. We recommend using cgroups to do container-local accounting.

LimitNPROC=infinity
LimitCORE=infinity
LimitNOFILE=infinity

Comment TasksMax if your systemd version does not supports it.

Only systemd 226 and above support this version.

TasksMax=infinity
OOMScoreAdjust=-999

[Install]
WantedBy=multi-user.target
[benjamin@fedora ~]$

@Ben7230
Copy link
Author

Ben7230 commented Sep 9, 2023

@curtishall After running the commands above, it is now working.

Thank you.

@curtishall
Copy link
Member

Great, thanks for the patience. I'll work on adding this fix to the Fedora part of the script next week.

@Ben7230
Copy link
Author

Ben7230 commented Dec 5, 2023

Were you able to fix this issue? How do I go about updating to the latest release?

@curtishall
Copy link
Member

These changes were introduced into the latest install script.

Which version do you have now?

docker exec bc-server dpkg -l bluecherry

@Ben7230
Copy link
Author

Ben7230 commented Dec 6, 2023

docker exec bc-server dpkg -l bluecherry
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii bluecherry 3:3.1.0-rc8 amd64 Bluecherry DVR Server

@curtishall
Copy link
Member

curtishall commented Dec 6, 2023 via email

@Ben7230
Copy link
Author

Ben7230 commented Dec 6, 2023

on running the command "docker compose start" I keep getting the error

service "mta_mailer" has no container to start
or
service "bc-mysql" has no container to start
or
service "uptime-kuma" has no container to start

@curtishall
Copy link
Member

docker compose up -d

@Ben7230
Copy link
Author

Ben7230 commented Dec 6, 2023

all the dockers start ok except for the bc-server, that one keeps restarting,

this is the error that comes up in the logs.

Update MySQL's my.cnf from environment variables passed in from docker
Writing /root/.my.cnf
Update bluecherry server's bluecherry.conf from environment variables passed in from docker
Writing /etc/bluecherry.conf
chown bluecherry:bluecherry /var/lib/bluecherry/recordings
chown: cannot access '/var/lib/bluecherry/.local/share/data/': No such file or directory

@Ben7230
Copy link
Author

Ben7230 commented Dec 6, 2023

I think this thread can be closed.

I removed/deleted everything, and then reinstalled via the install script and now its working fine.

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

No branches or pull requests

2 participants