View previous topic :: View next topic |
Author |
Message |
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Sat Jul 27, 2013 9:47 pm Post subject: apache, mysqld, and shorewall not starting using systemd |
|
|
Since I don't have internet access on the machine with the problem, there is a chance some of the problems (shorewall mainly) may be due to that. The others don't seem to be getting at all their onfiguration files. (For apache, /etc/conf.d/apache2, and for mysql, /etc/mysql/my.cnf.) Below are results from running systemctl status <name> Quote: | apache2.service - The Apache HTTP Server
Loaded: loaded (/usr/lib64/systemd/system/apache2.service; enabled)
Active: failed (Result: exit-code) since Sat 2013-07-27 20:42:31 PDT; 11min ago
Process: 1588 ExecStop=/usr/sbin/apache2 $APACHE2_OPTS -k graceful-stop (code=exited, status=1/FAILURE)
Process: 1581 ExecStart=/usr/sbin/apache2 $APACHE2_OPTS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 1581 (code=exited, status=1/FAILURE)
CGroup: /system.slice/apache2.service
Jul 27 20:42:31 mon1 systemd[1]: Starting The Apache HTTP Server...
Jul 27 20:42:31 mon1 apache2[1581]: Syntax error on line 401 of /etc/apache2/httpd.conf:
Jul 27 20:42:31 mon1 systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Jul 27 20:42:31 mon1 apache2[1588]: Syntax error on line 401 of /etc/apache2/httpd.conf:
Jul 27 20:42:31 mon1 apache2[1588]: Invalid command 'FastCgiAuthenticator', perhaps misspelled or defined by a module not included in the server configuration
Jul 27 20:42:31 mon1 systemd[1]: apache2.service: control process exited, code=exited status=1
Jul 27 20:42:31 mon1 systemd[1]: Unit apache2.service entered failed state. |
Quote: | mysqld.service - mySQL Server
Loaded: loaded (/usr/lib64/systemd/system/mysqld.service; enabled)
Active: failed (Result: start-limit) since Sat 2013-07-27 20:42:32 PDT; 11min ago
Process: 1623 ExecStop=/bin/kill -15 $MAINPID (code=exited, status=1/FAILURE)
Process: 1620 ExecStart=/usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr --datadir=/var/lib/mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock (code=exited, status=1/FAILURE)
Main PID: 1620 (code=exited, status=1/FAILURE)
CGroup: /system.slice/mysqld.service
Jul 27 20:42:32 mon1 systemd[1]: mysqld.service: control process exited, code=exited status=1
Jul 27 20:42:32 mon1 systemd[1]: Unit mysqld.service entered failed state.
Jul 27 20:42:32 mon1 systemd[1]: mysqld.service holdoff time over, scheduling restart.
Jul 27 20:42:32 mon1 systemd[1]: Stopping mySQL Server...
Jul 27 20:42:32 mon1 systemd[1]: Starting mySQL Server...
Jul 27 20:42:32 mon1 systemd[1]: mysqld.service start request repeated too quickly, refusing to start.
Jul 27 20:42:32 mon1 systemd[1]: Failed to start mySQL Server.
Jul 27 20:42:32 mon1 systemd[1]: Unit mysqld.service entered failed state. |
Quote: | shorewall.service - Shorewall IPv4 firewall
Loaded: loaded (/usr/lib64/systemd/system/shorewall.service; enabled)
Active: failed (Result: resources)
Jul 27 20:42:31 mon1 systemd[1]: Starting Shorewall IPv4 firewall...
Jul 27 20:42:31 mon1 systemd[1]: Failed to load environment files: Is a directory
Jul 27 20:42:31 mon1 systemd[1]: shorewall.service failed to run 'start' task: Is a directory
Jul 27 20:42:31 mon1 systemd[1]: Failed to start Shorewall IPv4 firewall.
Jul 27 20:42:31 mon1 systemd[1]: Unit shorewall.service entered failed state. | Note that apache2 has configuration information for fastcgi, and mysqld has the wrong data directory which is defined in /etc/mysql/my.cnf. So how does systemd get the correct configuration information? Thanks,
Fred |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8935
|
Posted: Sat Jul 27, 2013 9:49 pm Post subject: |
|
|
You should check if the systemd unit files are present for these packages. If not, re-emerge them. I didn't look into your error messages, and I don't use systemd myself, so I might be wrong, but I understand the unit files where introduced without version bump and those three packages might have been emerged last time well before that. |
|
Back to top |
|
|
666threesixes666 Veteran
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Sun Jul 28, 2013 2:44 am Post subject: |
|
|
Thanks for the info. If I don't have unit files for apache and mysql I can't run with systemd. The problems I'm having with mysqld might be solved with some softlinks although so far that has not got it working. It would have been nice if this sort of issue had been publicized in a more visible way. |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 8935
|
Posted: Sun Jul 28, 2013 7:44 am Post subject: |
|
|
Well, using ~arch packages there is no guarantee of any notification or finished documentation about imminent breakage. This is one of those occasions. |
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Sun Jul 28, 2013 5:16 pm Post subject: Internet now working |
|
|
I posted another message here by mistake. I finally have an internet with my main computer. I'm not quite ready to give up on systemd, but I'm close. I can't go further without a firewall (hence this is being posted from a second machine a pitiful laptop). systemctl status shorewall is still giving me what I posted above. If I can get that working, I'll try to work on the others.[/quote] |
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Sun Jul 28, 2013 8:13 pm Post subject: |
|
|
Internet works on about 1 in 5 reboots. I'm giving up on sysstemd. It seems even if I get it to boot reliably which I don't know how to do) there are too many other things that are likely to lead to failure. |
|
Back to top |
|
|
snum n00b
Joined: 16 Jun 2012 Posts: 43
|
Posted: Mon Aug 12, 2013 6:36 am Post subject: |
|
|
Good morning, I have a similar problem!
Is the problem solved?
Is it possible to have worked openRC and systemd at the same time? |
|
Back to top |
|
|
666threesixes666 Veteran
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Mon Aug 12, 2013 6:59 am Post subject: |
|
|
i purged my systemd, it was great while it lasted. im scared of removing udev and having systemd take over udev responsibilities and keeping openrc going. i require the option to switch between the two so i can run with systemd for fun, and when i need to be serious boot openrc. |
|
Back to top |
|
|
Fred Krogh Veteran
Joined: 07 Feb 2005 Posts: 1036 Location: Tujunga, CA
|
Posted: Mon Aug 12, 2013 3:15 pm Post subject: |
|
|
I have systemd booting just fine with persistent names. But still no networking if I use persistent names with openrc. I have not tried systemd since installing a couple of updates to systemd, but I know of no reason to think that the changes will make shorewall, apache, mysql, etc. work. |
|
Back to top |
|
|
snum n00b
Joined: 16 Jun 2012 Posts: 43
|
Posted: Wed Aug 14, 2013 8:17 pm Post subject: |
|
|
I found solution with systemd-love Portage overlay(https://github.com/Sabayon/systemd-love), that allow to start current GNOME 3.8 on openrc. But I does not test it.
I do not want to switch to gnome 3.6 and systemd does not want to work with mysql. What do you do?!?! |
|
Back to top |
|
|
snum n00b
Joined: 16 Jun 2012 Posts: 43
|
Posted: Thu Aug 15, 2013 6:09 pm Post subject: |
|
|
I was wrong.Sabayon is modern and easy to use Linux distribution based on Gentoo. It is not solution.
snum wrote: | I found solution with systemd-love Portage overlay(https://github.com/Sabayon/systemd-love), that allow to start current GNOME 3.8 on openrc. But I does not test it.
I do not want to switch to gnome 3.6 and systemd does not want to work with mysql. What do you do?!?! |
|
|
Back to top |
|
|
snum n00b
Joined: 16 Jun 2012 Posts: 43
|
|
Back to top |
|
|
danielLIU n00b
Joined: 16 Apr 2009 Posts: 23 Location: Beijing
|
Posted: Fri Aug 30, 2013 3:19 pm Post subject: |
|
|
works for me too. thanks a lot
File: /etc/systemd/system/mysqld.service
[Unit]
Description=MySQL database server
After=syslog.target
After=network.target
[Service]
User=mysql
Group=mysql
ExecStart=/usr/sbin/mysqld --pid-file=/var/run/mysqld/mysqld.pid
ExecStop=/bin/kill -15 $MAINPID
PIDFile=/var/run/mysqld/mysqld.pid
# We rely on systemd, not mysqld_safe, to restart mysqld if it dies
Restart=always
# Place temp files in a secure directory, not /tmp
PrivateTmp=true
[Install]
WantedBy=multi-user.target |
|
Back to top |
|
|
heheman3000 n00b
Joined: 22 Oct 2006 Posts: 33
|
Posted: Tue Sep 17, 2013 10:44 pm Post subject: |
|
|
I had the problem with not being able to connect to the internet as well right after installing systemd; it turns out this was a problem with having both dhcpcd and networkmanager enabled.
Simply take out dhcpcd with systemctl:
https://forums.gentoo.org/viewtopic-t-960314.html |
|
Back to top |
|
|
gcyoung Apprentice
Joined: 04 Jul 2007 Posts: 170 Location: England
|
Posted: Wed Oct 02, 2013 11:54 am Post subject: mysqld.service and systemd |
|
|
Using the mysqld.service file available from portage, systemctl reports mysql as having started. However I can't enter mysql as it "can't find /var/run/mysqld/mysql.sock".
It seem as if systemd does not refer to /etc/mysql/my.cnf. The socket seems always to have been created automatically under the previous init.d system.
I'm using mysql for mythtv and hoping to continue with the current database, so if anyone can tell me how to get systemd to create the necessary socket etc., I'd be most grateful.
*********************************************
I noted after writing the above that danielLTU's script, above, executes mysqld from /usr/sbin/ and not /usr/bin/ as the portage script does. I have copied and tried his/her script with the same result; it completes, but still wants for /var/run/mysqld/mysqld.sock. I noted that /var/run/ is a simlink to /run so I created a directory "mysqld" under /run but that had no effect.
**********LATER***************
Looked at the original web page for the above service file, and noted the need for tempory file creation below beneath it. Copied this and it did the trick.
However it seems my mythtv database is no longer compatible with the "updated" mysql, so I must now attempt to sort that one out!! |
|
Back to top |
|
|
|