Subject: [codesprints] Help: setup on CentOS 7

From: Hongwei Li <[email-masked]>
Date: Sat, 25 Jul 2020 00:38:34 -0400

Did anybody see the issue like below?
When I ran the script ./docker/run, I got the below errors.

Why is the script trying to connect database on the host server? I don't
have mysql installed. Shouldn't it be in the docker image?

I see the permission denied for every action in the script. Confusing with
the permission thing.

Setting up a default settings_local.py ...
cp: cannot stat
'/home/vagrant/ietf/src/7.10.1.dev0/docker/settings_local.py': Permission
denied
Creating dir /home/vagrant/ietf/src/7.10.1.dev0/test/id/
mkdir: cannot create directory
'/home/vagrant/ietf/src/7.10.1.dev0/test/id/': Permission denied

[vagrant@centos7 7.10.1.dev0]$ ./docker/run
Running on Linux.
Not trying to start a virtual docker machine on Linux

Starting a docker container for '7.10.1.dev0'.

The web interface for 'runserver' should appear on

User vagrant (1000:1000)
Gathering info ...
User vagrant (1000:1000)
Checking if MySQL base data exists ...
Setting up the 'mysql' user for database file access ...
groupadd: group 'mysqldata' already exists
Checking if MySQL is running ...
[info] MariaDB is stopped..
Starting mysql ...
[FAIL] Starting MariaDB database server: mysqld . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . failed!
Checking if syslog is running ...
[FAIL] rsyslogd is not running ... failed!
Starting syslog ...
[....] Starting enhanced syslogd: rsyslogdrsyslogd: pidfile
'/run/rsyslogd.pid' and pid 514 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)
[ ok ady started.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
Checking if the IETF database exists at /var/lib/mysql/ ...
Creating group entry for GID '1000' ...
groupadd: GID '1000' already exists
Checking that there's a virtual environment for 7.10.1.dev0 ...
Using virtual environment at /opt/home/vagrant/7.10.1.dev0
Activating the virtual python environment ...
Setting up a default settings_local.py ...
cp: cannot stat
'/home/vagrant/ietf/src/7.10.1.dev0/docker/settings_local.py': Permission
denied
Creating dir /home/vagrant/ietf/src/7.10.1.dev0/test/id/
mkdir: cannot create directory
'/home/vagrant/ietf/src/7.10.1.dev0/test/id/': Permission denied

Thanks,
Hongwei

---

From: Russ Housley <[email-masked]>
Date: Sat, 25 Jul 2020 11:16:39 -0400

This looks like a problem that I was having yesterday.  Henrik released a new docker image, and it sorted out my problems,

Russ

> On Jul 25, 2020, at 12:38 AM, Hongwei Li <[email-masked]> wrote:
> 
> Why is the script trying to connect database on the host server? I don't have mysql installed. Shouldn't it be in the docker image?
> 
> I see the permission denied for every action in the script. Confusing with the permission thing.
> 
> 
> cp: cannot stat '/home/vagrant/ietf/src/7.10.1.dev0/docker/settings_local.py': Permission denied
> mkdir: cannot create directory '/home/vagrant/ietf/src/7.10.1.dev0/test/id/': Permission denied
> 
> 
> 
> [FAIL] Starting MariaDB database server: mysqld . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . failed!
> [....] Starting enhanced syslogd: rsyslogdrsyslogd: pidfile '/run/rsyslogd.pid' and pid 514 already exist.
> rsyslogd: run failed with error -3000 (see rsyslog.h or try https://www.rsyslog.com/e/3000 <https://www.rsyslog.com/e/3000> to learn what that number means)
> [ ok ady started.
> ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
> cp: cannot stat '/home/vagrant/ietf/src/7.10.1.dev0/docker/settings_local.py': Permission denied
> mkdir: cannot create directory '/home/vagrant/ietf/src/7.10.1.dev0/test/id/': Permission denied
> 
> 
> Thanks,
> Hongwei
> _______________________________________________
> codesprints mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/codesprints

---

From: Henrik Levkowetz <[email-masked]>
Date: Sat, 25 Jul 2020 17:25:23 +0200

Hi Hongwei,

The warning about syslogd can be ignored.  The container is running
mariadb (replacing mysql) internally, but expects the database content
in external mysql files.  The database content is not part of the image.

To put the database in place, please run docker/setupdb before you start
the docker image.

I'm available on xmpp:[email-masked]?join for IM.

Best regards,

	Henrik

---

From: Hongwei Li <[email-masked]>
Date: Sat, 25 Jul 2020 13:00:27 -0400

Hi Henrik,
I did run docker/setupdb before I started the docker image.
I will run it again. I will find you on chat.

Thanks for the help.
Hongwei

On Sat, Jul 25, 2020 at 11:25 AM Henrik Levkowetz <[email-masked]>
wrote:

> > This looks like a problem that I was having yesterday.  Henrik released
> a new docker image, and it sorted out my problems,
> >
> > Russ
> >
> >
> >> Why is the script trying to connect database on the host server? I
> don't have mysql installed. Shouldn't it be in the docker image?
> >>
> >> [FAIL] Starting MariaDB database server: mysqld . . . . . . . . . . . .
> . . . . . . . . . . . . . . .. . . . failed!
> https://www.rsyslog.com/e/3000 <https://www.rsyslog.com/e/3000> to learn
> what that number means)
> >> [ ok ady started.