/srv/irclogs.ubuntu.com/2012/09/10/#upstart.txt

delinquentmealllriight15:43
delinquentmesoo how do I launch mysql w upstart?15:43
delinquentmehow can I check to see that its installed16:16
delinquentmea google on " check upstart ubuntu 10.04 version " gave me nada16:16
SpamapSdelinquentme: sudo apt-get install mysql-server should be sufficient16:28
SpamapSdelinquentme: or did you mean something else?16:28
delinquentmeSpamapS, seems that doesn't configure things correctly =/   I'm trying to figure out if mysql is running ( sudo netstat -tap | grep mysql )16:29
delinquentme... this is what the manpage says to do ...and the command simply hangs16:30
SpamapSdelinquentme: service mysql status should show something like 'start/running, pid 999916:37
delinquentmeSpamapS, it gives me " mysql start/running "16:41
delinquentmeI mean thats not behaving correctly is it?16:44
SpamapSdelinquentme: no, if there is no pid listed, then something has gone wrong16:44
delinquentmeSo how do I check that im actually running on upstart?16:45
SpamapSdelinquentme: what OS are you running?16:46
delinquentmeubuntu 10.0416:47
SpamapSdelinquentme: ok, you are definitely "on upstart".. 10.04 will not work any other way.16:48
SpamapSdelinquentme: as far as mysql, have you modified /etc/init/mysql.conf in any way?16:48
delinquentmeI have, i have backups... but the issue predates the changes made16:51
SpamapSdelinquentme: and the issue is... ?16:52
SpamapSdelinquentme: has it always said "start/running" but not actually made mysqld run?16:53
delinquentmemysql.sock is not being created16:53
jopplahi, I need a little help figuring out some upstart quirks16:55
jopplaI have an upstart script that I start on networking and this works fine so far, but for some reason as soon as script is finished, it initiates stop, which should only be called on runlevel [!2345]16:56
jopplado i need to have a service running for upstart to not call stop on a script? (the job is not defined as a task)16:57
SpamapSdelinquentme: well that is likely because mysqld is not running16:59
jopplawhat the script does, basically, is this: on (networking and filesystems) mount container from network share into loopback, stop on runlevel [!2345] unmount loopback device16:59
SpamapSdelinquentme: but its also possible that you've changed the path in /etc/mysql/my.cnf or even /etc/my.cnf or (the very seldom considered ) /var/lib/mysql/my.cnf16:59
SpamapSjoppla: "start on networking" ?17:00
delinquentmeSpamapS, what is mysqld?17:00
SpamapSdelinquentme: *mysql*17:00
delinquentmeOk check17:00
SpamapSdelinquentme: what did you modify in /etc/init/mysql.conf ?17:00
SpamapSjoppla: can you pastebin your upstart job?17:01
delinquentmeexec /usr/sbin/mysqld >> exec sudo -u mysql /usr/sbin/mysqld17:01
SpamapSdelinquentme: *that* is why you are failing17:03
SpamapSdelinquentme: change it back. You must start as root. mysqld will become mysql on its own17:04
SpamapSdelinquentme: user        = mysql17:04
SpamapSdelinquentme: that should be in /etc/mysql/my.cnf , and causes the switch to that user17:05
delinquentmeSpamapS, changes outlined here: http://www.bbhart.com/848/ubuntu-and-upstart-and-mysql/17:05
delinquentmeI mean he says to modify something else in my.cnf17:05
SpamapSdelinquentme: you're just blindly trusting that, without any evidence as to why?17:06
delinquentmealso its been reverted17:06
delinquentmeand still the same issue17:06
delinquentmeno mysql17:06
SpamapSdelinquentme: once reverted, you have to do 'stop mysql' then 'start mysql'17:06
SpamapSdelinquentme: 'restart mysql' will not re-load the upstart job17:06
delinquentme$ stop mysql >> stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.90" (uid=1000 pid=18202 comm="stop) interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init"))17:07
SpamapSdelinquentme: sudo stop mysql17:07
delinquentmedamnit lol thats what that error meant?17:07
SpamapSdelinquentme: also I just checked, and the default my.cnf for 10.04 does not have skip-bdb in it17:07
delinquentmeyeah mine didn't so.. well at least thats good17:08
delinquentmenow sudo start mysql ... seems to be hanging17:08
jopplaSpamapS: http://pastebin.ubuntu.com/1197044/17:08
SpamapSjoppla: this is actually not correct, even though it sounds good.. "start on filesystem and started networking"17:09
SpamapSjoppla: runlevel [2345] is actually what you want (unless you're on pre-11.10)17:09
SpamapSdelinquentme: its likely failing because mysqld is printing errors of some kind17:10
SpamapSdelinquentme: do 'stop mysql', and then try 'sudo /usr/sbin/mysqld' and see if it prints any errors17:10
delinquentmenada from $ sudo /usr/sbin/mysqld17:11
SpamapSdelinquentme: oh, check /var/log/mysql/error.log17:11
jopplaSpamapS: the problem is not get it started, it starts fine. The problem is that it mount the container and then directly unmounts it again17:12
delinquentmetheeere we go17:12
delinquentmelooks like i need write access for mysql17:13
delinquentmethat would do it.17:13
delinquentmechmod 777?17:13
jopplaSpamapS: made the changes as you suggested, problem still exists though17:15
SpamapSjoppla: ok hm17:19
SpamapSjoppla: oh, yes, of course it does17:20
SpamapSjoppla: the main process (script or exec) is what controls whether it is running or stopped17:20
SpamapSjoppla: so the mount command exits, and upstart sees that as your job exitting normally17:20
SpamapSjoppla: you want that all to be in pre-start17:20
jopplaSpamapS: eureka :)17:23
jopplathanks a lot, I would probably spent hours on this17:23
SpamapSjoppla: glad you could get it working17:24
delinquentmehttp://pastebin.com/  so heres the error output  ... however now I'm unable to run " sudo stop mysql "17:26
SpamapSdelinquentme: /???17:38
delinquentmeSpamapS, it runs .. just only when mysql is in its semi-running state17:38
SpamapSdelinquentme: you pasted a pastebin.com link w/o output17:39
SpamapSlike, just pastebin.com/17:39
delinquentmeROFL17:40
delinquentmeohhh man17:40
* delinquentme deep breath17:40
delinquentme1 cat17:40
delinquentme2 cat 3cat .. OK http://pastebin.com/Cjarts7217:41
SpamapSdelinquentme: do you have any data in the mysql database?17:45
SpamapSdelinquentme: 120910  6:08:10  InnoDB: Operating system error number 13 in a file operation.17:46
SpamapSInnoDB: The error means mysqld does not have the access rights to17:46
SpamapSdelinquentme: Most likely because of your sudo changes and such17:46
delinquentmeSpamapS, ok so I gave my user " thrive " permissions to the DB18:15
SpamapSdelinquentme: like, you chowned the files to thrive?18:15
SpamapSdelinquentme: this is a study in "all the ways to break your mysql server"18:15
delinquentmeyeah18:15
delinquentmei should have a separate user huh?18:15
SpamapSdelinquentme: no, you should leave it alone and let it run as mysql18:17
SpamapSdelinquentme: if you need access to the data files, you're doing it wrong18:17
delinquentmeI mean the only thing that I've done which is out of the ordinary is drop in my own database files18:21
delinquentmesudo apt-get install mysql-server18:21
delinquentmeaccording to the documentation should effectively " do what its supposed to do "18:22
delinquentmehowever everything after that command ... on the official documentation (https://help.ubuntu.com/10.04/serverguide/mysql.html) is busted18:22
delinquentmelike official docs are saying to use init.d18:23
delinquentmesudo /etc/init.d/mysql restart18:23
delinquentmeO_o;18:23
SpamapSdelinquentme: thats just a backward compatibility thing18:24
SpamapSdelinquentme: it works fine actually18:24
delinquentmehow?18:24
SpamapSdelinquentme: the init.d stuff works fine I mean.18:25
SpamapSdelinquentme: it calls a compatibility layer which in turn calls the appropriate upstart actions18:25
delinquentmeyeah =[  I mean I'd love a command to find out what the heck is special about my system18:25
SpamapSdelinquentme: there's no such thing, though you can use config management to assert what you want to be true. :)18:26
delinquentmesudo apt-get install --reinstall mysql-server  18:27
SpamapSdelinquentme: note that there is a new LTS .. with more up to date instructions https://help.ubuntu.com/12.04/serverguide/mysql.html18:27
delinquentmealso it would be awesomely nice if this would reinstall the cruft which went wrong18:27
SpamapSdelinquentme: it won't because it doesn't want to disturb your data18:27
SpamapSdelinquentme: which means leaving /etc/* and /var/lib/mysql/* alone18:27
SpamapSdelinquentme: you can 'apt-get purge mysql-server-5.1' to get rid of your modified config files and (optionally) databases.18:28
delinquentmeLike i've not modified the dbs at all ... I can copy them back in 18:29
delinquentmeand then i just chown those DB files to mysql18:29
SpamapSdelinquentme: if you haven't modified them at all, you can just rm -rf /var/lib/mysql18:29
SpamapSdelinquentme: and then do the purge, and then reinstall18:29
SpamapSdelinquentme: the files will be created w/ the right perms, and all will be well18:30
delinquentmehowever I still need to get the databases in for the project18:30
delinquentmedrop them in and chown them?18:30
delinquentmeand then all will be good?18:31
delinquentmeE: Couldn't find package mysql-server-518:31
delinquentmenm18:32
delinquentmeE: Couldn't find package mysql-server18:32
delinquentmei mean it was mysql-server **18:32
delinquentmeOk now I've purged ... then re-run "sudo apt-get install mysql-server"  but it didn't prompt me to set a password .. therefore .. not all of the original settings files were removed?18:35
delinquentmeand what would cause this command: sudo netstat -tap | grep mysql  .... to hang18:38
delinquentme?18:38
delinquentmeseems to me like thats indications of bigger issues18:39
SpamapSdelinquentme: mysql-server-5.1 is the actual package to purge18:47
delinquentme_in #mysql18:52
delinquentme_Ok so trying this again ... I've just run "sudo apt-get install mysql-server"  and I have no /var/lib/mysql dir19:41
delinquentme_ok good so now the 5.1 purge worked ^_^19:42
delinquentme_" ureadahead will be reprofiled on next reboot "19:43
delinquentme_so im going to reboot19:43
* SpamapS applauds delinquentme_'s energy19:47
delinquentmeOK did fresh install .. set new password ... still socket weirdness when trying to start20:22
SpamapSdelinquentme: did mysqld actually start though?22:05
SpamapSdelinquentme: and can you show me the socket weirdness you're talking about?22:05
delinquentmeSpamapS, ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)22:45
delinquentmesame thing .. basically Im unable to start mysql22:45
SpamapSdelinquentme: 13 again22:45
SpamapSdelinquentme: ls -l /var/lib/mysql/mysql.sock22:45
SpamapSdelinquentme: also thats not the usual mysql.sock path22:45
SpamapSdelinquentme: should be /var/run/mysqld/mysqld.sock22:46
delinquentmels: cannot access /var/lib/mysql/mysql.sock: No such file or directory22:46
SpamapSdelinquentme: because thats the wrong dir22:48
delinquentmels: cannot access /var/run/mysqld/mysqld.sock: No such file or directory22:49
delinquentmenot there either22:49
delinquentme... I dont think I changed any of the default settings22:49
SpamapSdelinquentme: that socket is created when mysqld starts, so, it probably failed again22:52
delinquentme120910 16:23:19 [ERROR] Do you already d another mysqld server running on socket: /var/lib/mysql.sock ?22:56
delinquentmesudo start mysql never actually resolved22:59
delinquentmeresolves**22:59
delinquentmeit just extended hangs22:59
delinquentmemysql start/running, process 983923:03
delinquentmenice!23:03
SpamapSdelinquentme: are you absolutely required to use 10.04 btw? The upstart job is *a lot* better on 12.0423:27
delinquentmeSpamapS, I think im making progress23:28
delinquentmeand 10.04 is my go to default OS atm23:28
delinquentmeso its not just this that I have on it ... its the rest of my dev enviros23:28
SpamapSdelinquentme: ok. Well as somebody who has been actively trying to fix the mysql upstart job, and quite a few others since 10.04 was released, I have to recommend that you start looking at upgrading....23:30
SpamapSdelinquentme: plus, MySQL 5.5 is a huge improvement over 5.123:31

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!