Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache, mysqld, and shorewall not starting using systemd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Fred Krogh
l33t
l33t


Joined: 07 Feb 2005
Posts: 776
Location: Tujunga, CA

PostPosted: Sat Jul 27, 2013 9:47 pm    Post subject: apache, mysqld, and shorewall not starting using systemd Reply with quote

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
View user's profile Send private message
genstorm
Advocate
Advocate


Joined: 05 Apr 2007
Posts: 2352
Location: Austria

PostPosted: Sat Jul 27, 2013 9:49 pm    Post subject: Reply with quote

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.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1223
Location: 42.68n 85.41w

PostPosted: Sat Jul 27, 2013 9:59 pm    Post subject: Reply with quote

last i seen there was no apache unit file working. that was a while ago though.

https://forums.gentoo.org/viewtopic-t-949752-start-0.html
_________________
cat /etc/*-release
Funtoo Linux - baselayout 2.2.0
consider this warning no. 1
http://ecx.images-amazon.com/images/I/81Ku-vxIb3L._SL1500_.jpg
http://wiki.gentoo.org/wiki/Special:Contributions/666threesixes666


Last edited by 666threesixes666 on Sun Jul 28, 2013 2:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
Fred Krogh
l33t
l33t


Joined: 07 Feb 2005
Posts: 776
Location: Tujunga, CA

PostPosted: Sun Jul 28, 2013 2:44 am    Post subject: Reply with quote

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
View user's profile Send private message
genstorm
Advocate
Advocate


Joined: 05 Apr 2007
Posts: 2352
Location: Austria

PostPosted: Sun Jul 28, 2013 7:44 am    Post subject: Reply with quote

Well, using ~arch packages there is no guarantee of any notification or finished documentation about imminent breakage. This is one of those occasions. :)
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
Fred Krogh
l33t
l33t


Joined: 07 Feb 2005
Posts: 776
Location: Tujunga, CA

PostPosted: Sun Jul 28, 2013 5:16 pm    Post subject: Internet now working Reply with quote

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
View user's profile Send private message
Fred Krogh
l33t
l33t


Joined: 07 Feb 2005
Posts: 776
Location: Tujunga, CA

PostPosted: Sun Jul 28, 2013 8:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
snum
n00b
n00b


Joined: 16 Jun 2012
Posts: 35

PostPosted: Mon Aug 12, 2013 6:36 am    Post subject: Reply with quote

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
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1223
Location: 42.68n 85.41w

PostPosted: Mon Aug 12, 2013 6:59 am    Post subject: Reply with quote

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.
_________________
cat /etc/*-release
Funtoo Linux - baselayout 2.2.0
consider this warning no. 1
http://ecx.images-amazon.com/images/I/81Ku-vxIb3L._SL1500_.jpg
http://wiki.gentoo.org/wiki/Special:Contributions/666threesixes666
Back to top
View user's profile Send private message
Fred Krogh
l33t
l33t


Joined: 07 Feb 2005
Posts: 776
Location: Tujunga, CA

PostPosted: Mon Aug 12, 2013 3:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
snum
n00b
n00b


Joined: 16 Jun 2012
Posts: 35

PostPosted: Wed Aug 14, 2013 8:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
snum
n00b
n00b


Joined: 16 Jun 2012
Posts: 35

PostPosted: Thu Aug 15, 2013 6:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
snum
n00b
n00b


Joined: 16 Jun 2012
Posts: 35

PostPosted: Thu Aug 15, 2013 7:48 pm    Post subject: Reply with quote

Works for me.
http://gentoo-en.vfose.ru/wiki/Systemd#MySQL
Back to top
View user's profile Send private message
danielLIU
n00b
n00b


Joined: 16 Apr 2009
Posts: 12

PostPosted: Fri Aug 30, 2013 3:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
heheman3000
n00b
n00b


Joined: 22 Oct 2006
Posts: 15

PostPosted: Tue Sep 17, 2013 10:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
gcyoung
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2007
Posts: 79
Location: England

PostPosted: Wed Oct 02, 2013 11:54 am    Post subject: mysqld.service and systemd Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum