OpenVZ Forum


Home » General » Support » Problem starting VPS services (mysql)
Problem starting VPS services (mysql) [message #13128] Mon, 21 May 2007 10:25 Go to next message
januszzz is currently offline  januszzz
Messages: 50
Registered: January 2007
Location: Opole, Poland
Member
Hello,
I've got machine wiith 4 VPS, all runs in production almost perfectly.

One thing makes me mad: After issuing:

vzctl restart 106

some VE services are still in state off (I use gentoo both on HN and VEs) even though they should be on. Some others starts properly. Example of proper service is syslog-ng and services which fail to start is mysql.

When I use vzctl exec 106 /etc/init.d/mysql start to launch the service it launches perfectly. If I try to do it from inside of the VE issuing /etc/init.d/mysql start it also starts perfectly.

When I try to write a script where I do: stop vz, then backup, then start vz still mysql is off. And even when I put vzctl exec 106 /etc/init.d/mysql start in my script after /etc/init.d/vz (or vzctl start 106) start mysql doesnt start....

So how to start this service then in other way than by hand?
Re: Problem starting VPS services (mysql) [message #13129 is a reply to message #13128] Mon, 21 May 2007 10:34 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
what does the mysql error log say after vz is started?

Quote:


when I put vzctl exec 106 /etc/init.d/mysql start in my script after /etc/init.d/vz (or vzctl start 106) start mysql doesnt start....


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: Problem starting VPS services (mysql) [message #13130 is a reply to message #13128] Mon, 21 May 2007 10:53 Go to previous message
januszzz is currently offline  januszzz
Messages: 50
Registered: January 2007
Location: Opole, Poland
Member
Excuse me, I haven't included that:

error log remains empty, so I assume VPS script are not trying launch it - or rather fails to launch it.

Script that launches ok is local. So I put /etc/init.d/mysql start inside and - surprisingly - after VPS restart local is now off... so my VPS refuses to launch mysql automagicaly Smile

I can include (siplified) script:

/etc/init.d/vz stop
/etc/init.d/vz start
/usr/sbin/vzctl exec 106 /etc/init.d/mysql restart

Output:

/etc/init.d/mysql: line 326: /var/run/svc-started-mysqld: No such file or directory
* Stopping mysql ... [ ok ]
* Starting mysql ...
* Starting mysql (/etc/mysql/my.cnf)
* MySQL NOT started (0)
[ !! ]


Like I said before: launching the third line (/usr/sbin/vzctl exec 106 /etc/init.d/mysql restart) from shell starts mysql sucessfully Smile
Previous Topic: [SOLVED] Routing problem in VE
Next Topic: *SOLVED* ip_conntrack_ftp inside VE
Goto Forum:
  


Current Time: Sun Apr 28 06:07:33 GMT 2024

Total time taken to generate the page: 0.02432 seconds