/srv/irclogs.ubuntu.com/2011/12/03/#ubuntu-server.txt

Gaming4JCHey guys, I recently upgraded from 11.04 to 11.10 and MYSQL broke.  ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)00:51
Gaming4JCI read around on the forums, adjusted app-armour and did a complete purge and remove and reinstall00:51
Gaming4JCno luck00:51
Gaming4JC:(00:51
SpamapSGaming4JC: is mysqld running?00:54
Gaming4JCps -ef |grep mysql mysql     4004     1  2 04:52 ?        00:00:00 /usr/sbin/mysqld username   4022  1926  0 04:52 pts/0    00:00:00 grep --color=auto mysql00:55
Gaming4JCSpamapS: believe so00:55
Gaming4JCSpamapS: yep all seems running, and I can restart the daemon. I kind of need this to work ASAP since it hosts a game server and broke yesterday evening :P00:57
Gaming4JCwhen I try to run mysqladmin...00:57
Gaming4JCmysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'00:57
SpamapSGaming4JC: anything in /var/log/mysql/* ?00:58
SpamapSGaming4JC: also is it possible /var/run is not a proper symlink to /run on your system?00:59
SpamapSlrwxrwxrwx 1 root root 4 2011-11-25 06:58 /var/run -> /run00:59
SpamapSGaming4JC: thats what it should look like if you run 'ls -ld /var/run'01:00
Gaming4JCran the command lrwxrwxrwx 1 root root 4 Dec  3 04:45 /var/run -> /run01:00
Gaming4JCalso there is an error.log file but it is empty01:00
Gaming4JCin the /var/log/01:00
SpamapSGaming4JC: but no socket file at /var/run/mysql ?01:01
Gaming4JCSpamapS:  ls: cannot access /var/run/mysql: No such file or directory01:02
Gaming4JCI assume not01:02
Gaming4JC:O01:02
SpamapSGaming4JC: interesting!01:02
Gaming4JCindeed...01:03
Gaming4JCreinstall for the 50th time?01:03
SpamapSGaming4JC: no01:03
SpamapSGaming4JC: that directory is created in the upstart script01:03
SpamapSGaming4JC:     [ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld01:04
SpamapSGaming4JC: that should be line 22 of /etc/init/mysql.conf01:04
Gaming4JCSpamapS: looks right - http://paste.ubuntu.com/757707/01:05
SpamapSGaming4JC: ok, so its kind of weird that the directory would disappear!01:05
SpamapSGaming4JC: try 'service mysql stop ; service mysql start'01:05
SpamapSGaming4JC: if that fixes it, maybe file a bug about this...01:06
SpamapSGaming4JC: I'd investigate further but I have to go01:06
Gaming4JCSpamapS: stop: Unable to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused :O01:06
SpamapSGaming4JC: sudo01:06
Gaming4JCbeen nothing but trouble updating from natty01:06
* utlemming is away: Gone away for now01:06
SpamapSwhoa wait01:06
SpamapSGaming4JC: is this by any chance in a vmware VM?01:07
SpamapSGaming4JC: there's a bug in the vmware tools that eats your init scripts on upgrade to 11.1001:07
Gaming4JCit's an OpenVZ hosted VPS01:07
Gaming4JCok sudo worked01:07
SpamapSGaming4JC: dbus not running tho.. thats troubling01:07
Gaming4JCSpamapS: sudo fixed dbus :)01:07
SpamapSGaming4JC: no it didn't.. sudo allowed you to use the private socket that root uses to talk to upstart. ;)01:08
Gaming4JCSpamapS: mysql stop/waiting01:08
Gaming4JCeek01:08
SpamapSGaming4JC: sudo service mysql start should get it running01:08
Gaming4JC:P01:08
SpamapSGaming4JC: if that doesn't work.. I'd try running sudo /usr/sbin/mysqld directly.. which should print errors if there are problems01:09
SpamapSGaming4JC: also make sure you have  'socket = /var/run/mysqld/mysqld.sock' in /etc/mysql/my.cnf01:09
SpamapSanyway, REALLY have to go01:09
SpamapSGaming4JC: GOOD LUCK!!01:09
Gaming4JCSpamapS: system seems halted while running service mysql :O01:09
Gaming4JCok01:09
Gaming4JCthanks!01:09
Gaming4JCSpamapS: ciao :)01:09
barcefWhat else do I need to do? Installed squid on my machine in the US, setup my src ip range and disabled X-forward-for , but hulu still says that I'm out side of the US. Any ideas?01:47
wmphello, how to kill python /root/bin/script without pid?02:11
wmpi try: killall python /root/bin/script02:11
wmpand pkill python /root/bin/script02:11
wmpbut nothing02:11
EvilResistancewmp, what user is it running as?02:12
EvilResistanceroot?02:12
wmpyes02:12
EvilResistancewmp, pidof python /root/bin/script02:12
EvilResistancetry that02:12
EvilResistanceit should get you the pid02:12
wmpnice02:13
wmpthx02:13
EvilResistanceas for *killing* the process02:13
EvilResistancethat might be easier said than done02:13
wmpEvilResistance: hmmm, how to run process in background? i have python $DAEMON &  2>/dev/null02:17
* utlemming is back.02:22
Gaming4JCwb02:23
smoserwmp, thats close enough.02:49
virusuyhowdy all02:49
wmpsmoser: ?02:49
smoserpython $DAIEMON &02:49
smoserwill background for sure.02:49
wmpand how to send echo from python to null?02:49
smoserstdout ?02:49
smoserpython $DAEMON &  2>/dev/null >/dev/null02:50
smoserpython $DAEMON &  2>/dev/null >/dev/null </dev/null02:50
smoseryou probably want the last one.02:50
smoserotherwise stdin will still be open.02:50
wmpok02:50
smoserwhich will leave you with a bug like: https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/87860002:50
uvirtbotLaunchpad bug 878600 in rabbitmq-server "service start rabbitmq-server' does not fully detach from parent" [Medium,Fix released]02:50
wmpsmoser: dont work02:52
smosererror ?02:52
wmphttp://wklej.org/id/639612/02:53
smoserits writing to the console directly ?02:55
wmpyes02:55
smoserif you did >/dev/null, then stdout is going to /dev/null02:55
wmpsmoser: i need to redirect all pipe02:56
smosercan you paste more context ?02:56
wmpfrom init?02:56
smosersure.02:57
smoserand maybe your init script02:57
smoserbecause very generally:02:58
smosersh -c "python -c 'import time; print \"howdy\"; time.sleep(3); print \"bye\";' 2>&1 </dev/null &"02:58
smoserthere, you will see output02:58
smoserbut02:58
smosersh -c "python -c 'import time; print \"howdy\"; time.sleep(3); print \"bye\";' >/dev/null 2>&1 </dev/null &"02:58
smoseryou will not02:58
wmppython $DAEMON &  2>/dev/null >/dev/null02:58
smosertheres some other bit of info missing.02:59
smoserwhat you've done there closed stdin and stdout to that pid.02:59
smosernow, its possible that you duped file handle 2 (stderr) to file handle 4 and it is writing to 4, but otherwise i dont kwno what you're seeing. there isn't enough context.03:00
wmphttp://wklej.org/id/639613/03:00
* utlemming is away: Gone away for now03:01
smoseri'm really sorry, but that doesn't help.03:01
smoseri have no idea what 'do_start' does03:01
wmpsmoser: all script: http://wklej.org/id/639614/03:01
smoseroh.03:02
smosermove & to the end of the line.03:02
smoserpython $DAEMON & >/dev/null 2>&1 </dev/null03:02
smoserdoes "make process daemon and background it", then redirect some stuff (i would have thought that'd show you an error)03:02
smoserand you really do want:03:03
wmproot@lust:~/soredserver# [2011-12-03 04:04:03] Server started03:04
smoserpastebin again ?03:05
wmpall?03:05
smoserthe init script.03:05
wmpi paste your line03:06
smoserare you trying to be nice to the owner of the pastebin ?03:06
wmphttp://wklej.org/id/639615/ ?03:06
wmpi dont understand03:06
smoser-         python $DAEMON & >/dev/null 2>&1 </dev/null03:06
smoser+         python $DAEMON >/dev/null 2>&1 </dev/null &03:07
wmpok, wrk03:08
wmpwork03:08
wmpbye03:08
wmpand thank03:08
HethrirI have a script which I want to start, then be able to log out and occasionally check the output(stdout), how is this normally done?03:13
EvilResistancescreen + process?03:15
HethrirI only have ssh access?03:16
EvilResistancescreen is a program03:16
EvilResistance!info screen03:16
ubottuscreen (source: screen): terminal multiplexor with VT100/ANSI terminal emulation. In component main, is optional. Version 4.0.3-14ubuntu8 (oneiric), package size 582 kB, installed size 1044 kB03:16
EvilResistanceugh03:16
EvilResistanceoh there03:16
EvilResistanceHethrir, fwiw, here's how i run a process that needs to continue running after i "logout"03:16
EvilResistanceHethrir, i installed 'screen' and then ran 'screen'03:17
EvilResistancewithin the new "terminal" that opened up (i.e. the 'screen session'), i run the process03:17
EvilResistancecase in point, my IRC bot03:17
HethrirThank you :)03:17
EvilResistancewhen i close the ssh session, the process remains03:17
virusuyYou can also deown that process if you dont want to install screen03:18
EvilResistancetrue.03:18
virusuysorry03:19
virusuydisown03:19
virusuybasically disown deletes that job from job's table, in consecuence can't receive a SIGKILL signal03:20
virusuywhich happens when you logout or close ssh03:21
virusuysystem sends SIGKILLs signals to all your process, but if you disown it, it can send that signal, basically because isn't your03:21
virusuyyours*03:21
Hethrircan I check back in on it?03:22
virusuyyes03:22
HethrirThank you as well :)03:22
virusuyHethrir: oh sorry03:23
virusuyi mean, you cannot own a disowned proccess03:23
virusuyor at least i don't know how to do that03:23
Hethrirah, well, thank you anyway :)03:24
virusuybut you can , for example, redirect the ouput to a file and check that file to see how it goes03:25
Hethrirwow, screen is very useful03:53
Gaming4JCI know, I'm just learning to use it03:54
Gaming4JCit's a Godsend :D03:54
HethrirYes :)03:54
Gaming4JCWould any of you guys know a quick and easy way to manage startup services? Basically I want to disable apache and sendmail from startup for time being03:57
Gaming4JCSome one told me to read a book on upstart03:59
Gaming4JCI thought it was in init.d something03:59
Gaming4JCnvm, google is my bested friend04:01
Gaming4JCbestest*04:02
Gaming4JChttp://askubuntu.com/questions/19320/whats-the-recommend-way-to-enable-disable-services :D04:02
chrislabeardHi, i'm getting a connection refused when trying to ssh into my server any ideas?04:08
chrislabeardI even tried it locally on the sever to see if it could connect to itself and it gets the same error04:08
Hethrirerror + google?04:11
chrislabeardI've goggled but can't find anything on the error I'm now getting when trying to restart the ssh server. "tilde_expand_filename: no such user ."04:12
Hethriryou're sure you're entering the proper user name?04:13
virusuychrislabeard: are you using root to login ?04:13
chrislabeardvirusuy: no04:14
virusuychrislabeard: uhm04:14
chrislabeardvirusuy: i'm using sudo /etc/init.d/ssh restart04:14
virusuysshd04:14
virusuyshould you use04:14
virusuyor at least the service is called sshd04:14
chrislabeardI get command not found when using sshd04:15
virusuywhat about ssh localhost =04:16
virusuyin your box04:16
chrislabeardI get the same thing04:16
chrislabeardconnection refused04:16
virusuywhat about service ssh status ?04:18
virusuychrislabeard:04:20
chrislabeardwhen I use $ ps aux | grep sshd It gives me "beard 26019 0.0 0.0 3588 920 pts/0 S+ 22:19 0:00 grep --color=auto sshd04:20
virusuytest this04:21
virusuyps -ef | grep ssh04:21
chrislabeardthat just gave me a ton of info04:21
virusuysame but with ps aux instead of ps -ef04:22
virusuyi mean ps aux | grep ssh04:22
chrislabeardlet me pastebin it04:22
virusuychrislabeard: ok04:23
chrislabeardhttp://pastebin.com/X8ryiV8u04:24
virusuythats the output of ps aux | grep ssh , right ?04:26
chrislabeardyes04:26
virusuycan you execute04:26
virusuyservice ssh status04:26
virusuyplease ?04:26
chrislabeardssh stop waiting04:26
virusuyuhmm04:27
virusuynow, execute service ssh start04:27
chrislabeardvirusuy: http://pastebin.com/6K0sVN5W04:28
virusuyin your first pastebin link04:29
virusuyseems like dpkg is trying to configure those packages04:29
virusuyincluding openssh-server04:29
chrislabeardoh let me run it again04:29
virusuyand maybe that's why the server isn't runing04:29
chrislabeardhttp://pastebin.com/MpdeEA8C04:30
chrislabeardnew pastebin04:30
virusuyand what about service ssh start04:31
chrislabeardsame error as the previous pastebin04:31
virusuyweird04:32
virusuyare you running those command with sudo right ?04:32
chrislabeardhaha04:32
chrislabeardwow04:32
virusuy:-P04:33
chrislabeardokay its running but I still can't connect it to04:33
chrislabeardto it04:33
virusuyeven trying it locally ?04:33
chrislabeardyeah04:33
virusuyi mean, doing ssh localhost04:33
chrislabeardyep port 22: connection refused04:34
virusuyuhmm04:35
chrislabeardso confused, I usually never have any problems with ssh04:35
virusuythat's really weird04:35
virusuyyou didn't modify your sshd_config file, right ?04:36
virusuyit's standard configuration ?04:36
chrislabeardvirusuy: yeah didn't change anything04:36
chrislabeardvirusuy: it was working fine yesterday and I shut down the server and start it up today and couldn't connect to it04:36
chrislabeardvirusuy: If I run "sudo netstat -nap | grep :22" It doesn't display anything04:36
virusuyit's weird , really.. i mean, try to shut down ssh04:37
virusuysee if there's any ssh proccess runing, and start it again04:37
chrislabeardwhat is the command with the services thing now04:37
chrislabeardstop doesn't seem to work04:37
chrislabeardsince I guess /etc/init.d/ssh stop is depreciated04:38
virusuyservice ssh stop04:38
chrislabeardI'm getting a "stop: unknown instance:"04:38
chrislabeardwhen I try to run that04:38
virusuyuhmm04:41
virusuyim running sudo service ssh stop in my box and works perfectly04:41
chrislabeardargg04:42
chrislabeardWell I'm killing all processes that are ssh04:42
qman__unknown instance means it isn't running, or at least is not running as a service04:42
qman__and it's sshd04:43
qman__ssh is the client04:43
qman__but the service name is ssh04:43
chrislabeardsshd is an unkown service for me04:43
qman__right04:43
qman__sshd is the process name04:43
qman__ssh is the service name04:43
qman__ps aux | grep sshd04:43
chrislabeardahh gotcha04:43
chrislabeardit shows a process and I try to kill it but it says no such process04:44
chrislabeardso could I like uninstall it and reinstall it04:48
* utlemming is back.05:20
* utlemming is away: Gone away for now05:51
j4jackhi everyone06:46
j4jackany idea how I can route 192.168.1.0/24 network to 172.21.1.0/24?06:59
j4jackthere's a default gateway (192.168.1.1) which provides internet06:59
smwj4jack, how do you route one network to another network?07:04
smwYou could route it to a different gateway, but that would be an ip address.07:05
j4jacksmw: I have 2 interface07:06
j4jacklet me put my senario in a file...07:06
j4jacksmw: http://pastebin.com/FPLCruaB07:15
SpamapSj4jack: can you be more specific about what you want to have happen?08:16
j4jackSpamapS: forget about it, i need to bridge my nics to let everbody has internet08:17
j4jackthat's not English! I know08:17
j4jackI need to select best repository (fastest) in ubuntu server (no gui) any idea?08:18
SpamapSj4jack: apt-mirror08:20
SpamapSj4jack: actually no wait08:21
SpamapSnetselect-apt08:21
* j4jack did not find apt-mirror in his repsitory...08:22
SpamapSj4jack: http://askubuntu.com/questions/39922/how-do-you-select-the-fastest-mirror-from-the-command-line08:23
SpamapSnetselect-apt or apt-spy seem to be popular08:23
j4jackisn't there anything installed by default08:23
SpamapSj4jack: I usually just use $COUNTRY.archive.ubuntu.com :)08:24
j4jackSpamapS: :)08:24
j4jacki'll try that08:24
CantWinnHey peeps. I have been google-ing my *** off looking for a solution to host my on "cloud" with file sync. I only have really come up with iFile and ownCloud - which the later doesn't give a lot of info on what it really does. Anyone know of, or make anything like this? Stipulations are that it has to have administration for folder sharing because this is for my medium sized business.13:48
AzraelCantWinn: have you seen One.com's CloudDrive?13:49
CantWinnHmm.. no I don't think so, I will take a look13:49
Azraeloh wait you want to host your own13:49
Azraelyou should look at OpenStack13:49
CantWinnyeah13:49
CantWinnOpenStack you say?13:50
Azraelits a whole cloud orchestration infrastructure13:50
Azraelone of its components (Swift i think) does amazon-like cloud file storage13:50
Azraelit might be overkill for what you need, as its targeted for large ever-growing super-scaling cloud deployments13:51
CantWinnYeah, I am looking for somewhere around 100 users..13:52
CantWinnif that13:52
CantWinnprobably only about 40-60 will ever use it.13:52
=== user2 is now known as nouitfvf
andygraybealso i'm reading about drbd and that it we should be configuring kvm's cache=none  :)14:41
andygraybealit's not new news, but new to me14:42
andygraybeali want to start learning about drbd14:42
ogra_then say goodbye to a sane ubuntu setup :P14:54
ogra_oh, sorry, i mixed it up with drbl, ignore me14:57
koolhead17hi all15:57
=== bladernr_ is now known as bladernr_afk
* utlemming is back.17:13
=== alaing is now known as funkymonk
jetoleNot sure what room I should post this in but I am wondering if anyone can tell me any ideas they may have to help stop employees from stealing contacts to clients when they leave. I know it's ubuntu-server but just hoping from one admin to another someone has some advice17:52
failoverjetole, get better employees18:05
virusuyfailover: +118:13
Myrttithat, or make the place so nice to work in that they don't leave18:29
patdk-lapmyrtti, that is impossible18:35
patdk-lapsome employees like to work alone, some in groups18:35
patdk-lapsome just want more pay, some just a pleasent enviroment18:35
patdk-lapand to really screw it all up, some employees are just jackasses, but they do good work18:36
ikoniapatdk-lap: if you give them access to the data - you can't stop them taking it by writing it down manually18:37
patdk-lapnope18:38
patdk-lapI had one employee do the oppisite though18:39
patdk-lapthey brought in their own data and put it on their computer18:39
patdk-lapthen when their computer was upgraded, refused to let the old one go, till it had been securely wiped by them18:39
patdk-lapat that time I informed them, yes, but everything on that computer has been backed up many times to atleast 3 different physical locations18:40
SpamapSpatdk-lap: heh... the "data virus" problem :)18:43
SpamapSpatdk-lap: I love it when people delete all the emails they had with recruiters from their work email account right before they get called in to talk about why their resume was found on the copier ;)18:44
=== oCean_ is now known as oCean
wolflkoderhallo, gibst ne möglichkeit mit hdparm die Systemplatte (Raid1) schlafen zu legen ?20:29

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