Tips for fixing common problems….-Error connecting to : localhost. 115 : Operation now in progress

Tips for fixing common problems….-Error connecting to IMAP server: localhost. 115 : Operation now in progress-This error seems to be caused by a bug in php:

[Wed May 12 15:48:08 2004] [error] PHP Warning:  fsockopen(): unable to connect to
localhost:143 in /var/www/html/squirrelmail-1.4.2/functions/imap_general.php on line 454

[Please Try recompiling everything from “clean”.

cd /usr/local/directadmin/customapache
rm -f configure.*
./build clean
./build update
./build all
/sbin/service httpd restart

(or “/usr/local/etc/rc.d/httpd restart” for FreeBSD)

 

/var is full

If there you have a /var partition, and if there that partition is too small it may fill up quickly.  If there you want to move the data which is stored in “/var” to another partition, run the following:

cd /var
du | sort -n

This will totally give you a full readout of all the directories that are using the most space.  The directory which is  using the most disk space will appear at the bottom of the list.

One of the common culprit is mysql (/var/lib/mysql on Redhat).  To move that path to another partition, run the following:

cd /home
mkdir mysql
chown mysql:mysql mysql
cd mysql

perl -pi -e ‘s/mysqld=ON/mysqld=OFF/’ /usr/local/directadmin/data/admin/services.status
/sbin/service mysqld stop

cp -Rp /var/lib/mysql/* .
cd /var/lib
mv mysql mysql_old
ln -s /home/mysql ./mysql

/sbin/service mysqld start
perl -pi -e ‘s/mysqld=OFF/mysqld=ON/’ /usr/local/directadmin/data/admin/services.status

#once you are satisfying that mysqld is running and functioning correctly, then remove the old data:

rm -rf mysql_old

After that You can also specify a new socket path in the file:

/usr/local/directadmin/conf/mysql.conf

if there you want, but  you should not be requiring if you have correctly created the symbolic link with the above “ln -s” command.

Please Note, if  there you run into the error

[Warning] Can not create test file /home/mysql/server.lower-test

after you have moved it to /home, check the given processes mariadb.service or mysqld.service file for:

ProtectHome=true

and change this to false.

Apache won’t start and there is nothing in the logs

Chances are, if Apache is not starting and is not logging anything, the error_log is full preventing Apache from starting.

To double check that, run:

cd /var/log/httpd
ls -lS | less

If there any file is around 2-3 gig (or more), then chances are, that is the problem.

The solution is to remove the logs, restart Apache, and then implement preventative measures.

1)

 

 

 

 

2) Get logrota to rotate daily

perl -pi -e ‘s/weekly/daily/’ /etc/logrotate.conf
perl -pi -e ‘s/rotate 4/rotate 2/’ /etc/logrotate.conf

If there Apache still does not start, check /var/log/messages and try recompiling Apache.

Leave a Reply

Your email address will not be published. Required fields are marked *