Archive for May, 2010
Twitter Weekly Updates for 2010-05-30
by admin on May.30, 2010, under Tweets
Twitter Weekly Updates for 2010-05-23
by admin on May.23, 2010, under Tweets
Webmail not working in Cpanel
by admin on May.10, 2010, under Cpanel
Had a problem earlier this week, webmail couldn’t always send e-mail. It was coming back with the following error:
SMTP Error: SMTP error: Connection failed: Failed to connect socket: Connection timed out.
After reading a few things I turned on the SMTP tweak.. things appeared to work for a few hours, then it started failing again.
Searching online said to trying telnet on the command line – so did that, connected to port 25 – all fine… hmm odd – tried webmail again – failed…..
After a more indepth search I found a forum which gave me a hint – apparently other people have had the same problem when using the firewall for cpanel – CSF. CSF is definately one of the best firewalls around for linux and works really well with Cpanel – however every now and again the amount of options can cause you to miss out something obvious:
# If SMTP_BLOCK is enabled but you want to allow local connections to port 25
# on the server (e.g. for webmail or web scripts) then enable this option to
# allow outgoing SMTP connections to 127.0.0.1
SMTP_ALLOWLOCAL = 0
The SMTP_ALLOWLOCAL set to 0 stops webmail etc… not sure when this appeared (the server has been working fine for about 4 months) but change it to 1 – restart CSF and there we go it’s working fine
Can’t create or edit a file – Linux – but have diskspace?
by admin on May.04, 2010, under Server
Have you ever had a linux server or desktop which all of a sudden couldn’t create a file – running “df -h” shows you your disk partitions aren’t full?
You’ve logged in as root to check – and yup you still can’t write any files – even a “touch test.txt” fails with a message saying can’t write file – disk or partition full?
You could be out of inodes! Linux stores file address information in inodes – and if you have a lot of very small files (or quite an oddly setup filesystem) you could be out of inodes…
How do you find out though?
just type in
“df -i” – same as the normal diskfree space command except it tells you inodes, if you have none left (or very few) you may not be able to create a new file (or edit it if your editor creates temporary lockfiles).
In a future blog I’ll go through how to resize the number of inodes available (primarily aimed at your temporary dev/shm space as this can suffer from the inode problem if you allocate more to it from a small size – the number of inodes is not increased so you can run out).
Linux – Calculating Diskspace free
by admin on May.03, 2010, under Server
With linux servers a couple of things can take up disk-space unexpectedly. Log files is the usual culprit, but if your server is a rented one you might be stuck with a bit of a weird partition setup.
For some reason some hosts will give little storage to partitions which then get filled up unexpectedly.
To find out how much space you have just use the following command.
df
- want to make it more readable?
Use df-h
Also if you want to see your diskspace changing over time the you can use the watch command. For example
watch -n 1 “df”
This will run the disk space command each second and you can view it’s output on the commandline – useful if you want to monitor some specific activity in real time.