Backup failed

5 posts / 0 new
Last post
#1 Mon, 04/08/2013 - 19:53
pmartelletti

Backup failed

Hi,

I'm having some issues with my virtualmin installation (running on UBUNTU 10.04 LTS). After an update to PHP 5.3.3, and doing

$ sudo update $ sudo update

some repositories where installed, including some virtualmin features. As soon I restarted the VPS, i was no more able to start webmin at boot. After asking the VPS manager to start webmin for me, I was nt able to start mysql: i kept recieving the message:

root@ns1:~# mysql -u root -p=0220404 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I've tried to fix it, but it seems that the command service thinks is running but it isnt, so it wont let me start it. On this attempt to fix it, it seems i broke something, cause now mails are not being deliverd to virtualmin virtual servers account, they are being rejected.

That's why i've tried to migrate my virtualmin installation to another clean installation of UBUNTU 12.04, but when trying to do this, i get the following error:

Backup failed : DBI connect failed : Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

So, in other words, i'm trying to migrate my virtual servers because mysql is not working, and i'm not able to start it. But to made the backups, it ask me to have mysql in function. So, how should i proceed?

Tue, 04/09/2013 - 10:14
andreychek

Howdy,

It sounds like the current need is to get MySQL up and running... since the init script won't start it, citing that it's already running, you may want to verify that there aren't any MySQL related processes running.

To do that, log in to your server over SSH, and run this command:

ps auxw | grep mysql

What output does that generate?

-Eric

Thu, 04/11/2013 - 17:58
pmartelletti

Hi there!

Thanks a lot for your help. There were some problems with the packages after the updates i've made to the system. I've manage to solve it picking the trouble packages and executing:

dpkg-reconfigure trouble-package

After that, everything was working JUST fine, until i realize that IMAP was not working in localhost, and therefore, webmail is not working.

I can see dovecot is working after i've execute:

ps auxw | grep dovecot
root     28219  0.0  0.0  16924   752 ?        Ss   19:42   0:00 /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf
root     28220  0.0  0.2  75092  3232 ?        S    19:42   0:00 dovecot-auth
root     28222  0.0  0.2  75172  3392 ?        S    19:42   0:00 dovecot-auth -w
dovecot  28223  0.0  0.1  18732  2096 ?        S    19:42   0:00 pop3-login
dovecot  28225  0.0  0.1  18732  2100 ?        S    19:42   0:00 pop3-login
dovecot  28226  0.0  0.1  18748  2112 ?        S    19:42   0:00 imap-login
dovecot  28227  0.0  0.1  18748  2120 ?        S    19:42   0:00 imap-login
dovecot  28432  0.0  0.1  18900  2364 ?        S    19:43   0:00 imap-login
dovecot  28539  0.0  0.1  18748  2120 ?        S    19:45   0:00 imap-login
dovecot  30105  0.0  0.1  18732  2100 ?        S    19:54   0:00 pop3-login

Port 143 is also being listened by dovecot:

netstat -an | grep :143
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN    
tcp        0      0 204.93.167.31:143       190.244.109.78:61719    ESTABLISHED

Just in case, my /etc/hosts file looks like these:

127.0.0.1 localhost.localdomain localhost
# Auto-generated hostname. Please do not remove this comment.
204.93.167.31 ns1 ns1

But when i try to telnet localhost on port 143, it does not respond:

root@ns1:~# telnet localhost 143
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection timed out

What could be the issue right here?

Thanks!

Thu, 04/11/2013 - 22:03
andreychek

Howdy,

Hmm, it does look like it's listening on all interfaces on port 143... if it's not responding, that sounds like either Dovecot has some sort of configuration issue, or maybe a firewall is causing some sort of problem.

What does this output:

iptables -L -n

Also, if you look in /var/log/mail.log, do you see any errors when trying to connect?

-Eric

Fri, 04/12/2013 - 06:06
pmartelletti

Eric,

Thanks for your response! Here's the output of iptables:

root@ns1:~# iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination        

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 

I don't really know what does input means... :S Is it helpfull in any way?

Finally, the mail logs are the following:

root@ns1:~# tail -30 /var/log/mail.log
Apr  9 22:53:23 ns1 postfix/smtp[7793]: D1D2132EC34C: to=<plaastos2013@infovia.com.ar>, relay=vmx.terra.com[208.84.244.136]:25, delay=535, delays=534/0.02/0.62/0, dsn=4.7.1, status=deferred (host vmx.terra.com[208.84.244.136] refused to talk to me: 450 4.7.1 Client host rejected: cannot find your hostname, [204.93.167.31])
Apr  9 22:53:40 ns1 dovecot: pop3-login: Login: user=<ventasmg.colorart>, method=PLAIN, rip=181.28.175.240, lip=204.93.167.31
Apr  9 22:53:41 ns1 dovecot: POP3(ventasmg.colorart): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Apr  9 22:53:55 ns1 dovecot: imap-login: Login: user=<info.sophian>, method=PLAIN, rip=178.239.84.87, lip=204.93.167.31, TLS
Apr  9 22:53:56 ns1 dovecot: IMAP(info.sophian): Disconnected: Logged out bytes=39/1847
Apr  9 22:54:09 ns1 dovecot: pop3-login: Login: user=<info.sophian>, method=PLAIN, rip=190.244.109.78, lip=204.93.167.31
Apr  9 22:54:11 ns1 dovecot: POP3(info.sophian): Disconnected: Logged out top=0/0, retr=0/0, del=0/220, size=6690387
Apr  9 22:54:43 ns1 dovecot: pop3-login: Login: user=<ventasmg.colorart>, method=PLAIN, rip=181.28.175.240, lip=204.93.167.31
Apr  9 22:54:43 ns1 dovecot: POP3(ventasmg.colorart): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Apr  9 22:55:04 ns1 postfix/pickup[3646]: 1358932EC34F: uid=1004 from=<pmartelletti>
Apr  9 22:55:04 ns1 postfix/cleanup[8011]: 1358932EC34F: message-id=<20130409185504.1358932EC34F@vps.pmartelletti.com.ar>
Apr  9 22:55:04 ns1 postfix/qmgr[3241]: 1358932EC34F: from=<pmartelletti@ns1>, size=2444, nrcpt=1 (queue active)
Apr  9 22:55:04 ns1 postfix/local[8016]: 1358932EC34F: to=<pmartelletti@ns1>, orig_to=<pmartelletti>, relay=local, delay=2.2, delays=2.1/0.02/0/0.09, dsn=5.3.0, status=bounced (Command died with status 127: "/usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME". Command output: sh: /usr/bin/procmail-wrapper: not found )
Apr  9 22:55:04 ns1 postfix/cleanup[8011]: 43C3732EC351: message-id=<20130409185504.43C3732EC351@vps.pmartelletti.com.ar>
Apr  9 22:55:04 ns1 postfix/qmgr[3241]: 43C3732EC351: from=<>, size=4436, nrcpt=1 (queue active)
Apr  9 22:55:04 ns1 postfix/bounce[8019]: 1358932EC34F: sender non-delivery notification: 43C3732EC351
Apr  9 22:55:04 ns1 postfix/qmgr[3241]: 1358932EC34F: removed
Apr  9 22:55:04 ns1 postfix/local[8016]: 43C3732EC351: to=<pmartelletti@ns1>, relay=local, delay=0.19, delays=0.08/0/0/0.11, dsn=5.3.0, status=bounced (Command died with status 127: "/usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME". Command output: sh: /usr/bin/procmail-wrapper: not found )
Apr  9 22:55:04 ns1 postfix/qmgr[3241]: 43C3732EC351: removed
Apr  9 22:55:45 ns1 dovecot: pop3-login: Login: user=<ventasmg.colorart>, method=PLAIN, rip=181.28.175.240, lip=204.93.167.31
Apr  9 22:55:45 ns1 dovecot: POP3(ventasmg.colorart): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Apr  9 22:56:47 ns1 dovecot: pop3-login: Login: user=<ventasmg.colorart>, method=PLAIN, rip=181.28.175.240, lip=204.93.167.31
Apr  9 22:56:47 ns1 dovecot: POP3(ventasmg.colorart): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Apr  9 22:57:49 ns1 dovecot: pop3-login: Login: user=<ventasmg.colorart>, method=PLAIN, rip=181.28.175.240, lip=204.93.167.31
Apr  9 22:57:50 ns1 dovecot: POP3(ventasmg.colorart): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Apr  9 22:58:52 ns1 dovecot: pop3-login: Login: user=<ventasmg.colorart>, method=PLAIN, rip=181.28.175.240, lip=204.93.167.31
Apr  9 22:58:52 ns1 dovecot: POP3(ventasmg.colorart): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Apr  9 22:58:56 ns1 postfix/master[3239]: terminating on signal 15
Apr  9 22:59:14 ns1 dovecot: pop3-login: Login: user=<info.sophian>, method=PLAIN, rip=190.244.109.78, lip=204.93.167.31
Apr  9 22:59:15 ns1 dovecot: POP3(info.sophian): Disconnected: Logged out top=0/0, retr=0/0, del=0/220, size=6690387

The only "error" i've found is

Apr  9 22:55:04 ns1 postfix/local[8016]: 43C3732EC351: to=<pmartelletti@ns1>, relay=local, delay=0.19, delays=0.08/0/0/0.11, dsn=5.3.0, status=bounced (Command died with status 127: "/usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME". Command output: sh: /usr/bin/procmail-wrapper: not found )

But it seems to be old (from Apr9) and does not seems to make sense anymore... is it?

Thanks in advance!

Topic locked