If you do regular backups of your servers, when you come to restore you nearly always find something you didn’t realise you should have backed up. One thing that can slip through the net on Linux mail servers is the spamassassin database. If you use a cron job to analyse your spam messages everyday and learn from them, spamassassinwill have created a database of identifiers and tokens which can be lost if not backed up.
To create a backup of the database simply issue the following command (ideally in a daily cron job):
sa-learn –backup /etc/spamassassin/db-backup.txt
This will create a text file called db-backup.txt which is easy to backup in your regular routine and can be restored by:
sa-learn –restore=/etc/spamassassin/db-backup.txt
A friend of mine had problems all through last week connecting to the Playstation Network with his PS3 even though he had had no problems since buying the console over a year ago. Not having a PS3 myself I know very little about them, but, assuming is was a networking problem, I offered to have a look. It turns out it is a common problem with numerous solutions which work for some and not others.
The problem presents itself by allowing your PS3 to connect to anything on the internet including browsing the Sony store and using the BBC iPlayer. If you try to connect to the Playstation Network though in order to play online, it reports that it is taking too long and you should check your network connection. If you do a network test it will report success for the IP address and internet tests and then a fail for the Playstation Network test.
To cure the problem there are a few things which have worked for one of more people:
1) Give the PS3 a static IP address and put it into the DMZ on your router.
2) Change the MTU setting in the PS3 network settings to 1492 (this appears to be the most common solution)
3) Change the DNS settings to the OpenDNS servers (208.67.222.222 and 208.67.220.220)
4) Some have reported that they cannot connect with a signal strength on their wireless connection of less than 70%
5) The most extreme fix after people got no help from Sony, their router manufacturer or their ISP? Buying a new PS3!
None of the above worked in this case, however. But after an hour of searching I found a single report where someone had tried the MTU setting of 1492 and it didn’t cure their problem but they discovered that a value of 1400 did work and this is what worked in this case as well.
I don’t know why it worked but setting the MTU to 1400 on the pS3 did the trick. I am curious as to why the Playstation Network connection is so fussy about it’s settings and what changed to make this fix necessary.
One of our servers is showing an intermittent lockup which could be caused by motherboard, PSU or hard drive so I’m configuring a replacement. The new server is and AMD64 unit so the debian installation is a different version to that installed on the current server so I was expecting a few glitches with configuration changes between package versions, but one error that came up was when I restored the MySQL databases. The procedure I followed was:
1) Move original files in /etc/mysql to a directory call ‘original_files’.
2) Restore the config files in /etc/mysql from our backup server.
3) Move original installation databases in /var/lib/mysql to a directory called ‘original files’.
3) Restore the databases by copying them directly from our backup server to /var/lib/mysql.
4) Start MySQL. This gave the error “error: ‘Access denied for user ‘debian-sys-maint’@'localhost’ (using password: YES)’”
The reason for this is that the new installation of Debian has assigned a new password to the debian-sys-maint user. The new password can be found in /etc/mysql/debian.cnf and to give the user access to mysql you need the following commands:
# mysql -u root -p
mysql> grant all privileges on *.* to ‘debian-sys-maint’@'localhost’ identified by ‘<password>” with grant option;
(Replacing <password> with the password from you /etc/mysql/debian.cnf file. )
mysql> quit
MySQL should now start correctly. One thing to watch out for is that some sources say the the syntax of the Grant statement should be “IDENTIFIED BY PASSWORD ‘<password>’” but this does not work. It should be “IDENTIFED BY ‘<password>’”.
I had a need to do some work on an old Debian server last week and hit an error message running ‘apt-get update’. It returned the following error message:
GPG error: ftp://ftp.debian.org/etch Release:
The following signatures couldn’t be verified because the public key is not available:
NO_PUBKEY 9AA38DCD55BE302B
There is no public key available for the following key IDs:
9AA38DCD55BE302B
The problem is caused by Debian now attempting to verify the authenticity of the servers for updating. The solution is to run the following two commands:
gpg - -keyserver pgpkeys.mit.edu - -recv-key 9AA38DCD55BE302B
gpg -a - -export 9AA38DCD55BE302B | sudo apt-key add -
Running an ‘apt-get update’ should now work OK.
I know it’s seen as a popular British pastime to complain about the weather, but it is the middle of our summer and I’m sitting here in the office watching it absolutely p****ing it down outside. In the spring the Met Office were forecasting a “barbecue summer” but apparently they’ve now had a rethink and it’s going to be cool and wet well into august.
If you work for the met office, here’s some advice. Quit! It is an organisation which is simply not fit for purpose. This is the third year in a row where their seasonal forecast has been substantially wide of the mark. With all the equipment and manpower they throw at their forecasting, you’d think they’d have some accuracy. Even the five day forecast changes drastically from day to day and rarely matches what they forecast five days ago. Even blind luck would probably be more accurate!
They attempt to point out that we have forgotten the “heatwave” we had in June. Some areas of the country did indeed have almost ten days of nice weather. What did we get in the Midlands? Rain. Lashings of it. Blocked drains, flooded roads and houses and plenty of thunderstorms.
My idea of a weather forecast now is to look out of the damn window!
My problems with printers over the years have regularly been documented on this blog. Huge, fussy printer drivers and strange operation seem to plague some printers.
At the office we have a Konica Minolta Magicolor 5450 which we use to print small-run sales literature. Ever since we had it it has been a complete lemon. During it’s 12 month warranty, it had a new fuser unit and two complete replacement main PCBs. It has had every firmware and driver upgrade applied and still suffers from random and regular lockups, intermittent fuser errors and bizarre operation. It can take several attempts for jobs to reach it on the network as the first couple of jobs can simply disappear into the ether.
I have complained to Konica but it has fallen on deaf ears. If it wasn’t a £1000 printer it would take a trip out of the office window. It is without doubt the most useless and infuriating piece of hardware I’ve ever had the misfortune to use.
In the last few days I had a problem printing from Publisher 2007 to the mc5450. It started printing a dotted line around most, but not all of the page outline. It’s not a subtle dotted line but a very prominent black dashed line. Upgrading the printer driver appeared to cure it for a while but then it returned. It’s not a crop mark and it doesn’t appear if I print the same document to my local Brother HL-4040CN. I’ve tried resetting the driver back to defaults and switching every crop/bleed setting I can find but it’s still there. It also doesn’t happen on all documents although it did happen on one other but then started printing it correctly again.
I have cured the problem and since I tend to post fixes to these irritations here on A Mind Lost for both my future use when I forget how I did it or for the maybe one other person in the world who might come across the same problem, here it is:
Install the PCL6 driver alongside the default Postscript driver and use it should you have this problem. The fault may reside with Publisher 2007 and not the printer but since I can’t pin down a setting which is causing it I can’t narrow it down any further.
Following on from my earlier post, I had a problem getting my tape backup working with the latest stable release of Debian on the new backup server. I use flexbackup to run my tape backup and on the older Debian installation, flexbackup would correctly set the block size of the tape and run the backup. On the latest installation, running flexbackup gave an error message running the following commands:
mt -f /dev/nst0 setblk 0
mt -f /dev/nst0 defblksize 0
Running the commands manually gave the response
mt: invalid argument `setblk’ for `tape operation’
A little research uncovered the fact that installing the mt-st package (apt-get install mt-st) fixed the problem and should be installed alongside flexbackup for proper operation on later Debian installations.
I run a dedicated backup server who’s job it is to suck up all the data files from the other servers on a nightly basis to a hard drive and then transfer the lot to tape. It’s been a little flakey lately so I’ve built a replacement which is, in line with other recent changes, a smaller, quieter and altogether greener machine.
I needed to transfer some scripts from the old server to the new and discovered that the old server was not very happy that I had yanked it’s SCSI card and DAT drive. It now failed to boot and gave me a segmentation fault instead. Selecting the recovery option from the Debian GRUB prompt didn’t help so I resorted to a trusted method using SystemRescueCD which allowed me to boot from the CD then issue the following commands:
mkdir /mnt/hd
mount /dev/sda1 /mnt/hd
This created a mount point and mounted the root hard drive partition to it. This enabled me to get at the module config files in the server’s /etc directory.
vi /mnt/hd/etc/modules
This loaded up the modules list for boot-up and I simply deleted the aic**** line to remove the SCSI module.
A reboot later after removing the CD and everything is fine again.
I could complain that the aic**** module should handle such a simple error without segmenting and locking up the system and if I hadn’t figured out a work-around I probably would but since I use linux for free, it seems harsh to moan!
When we relocated to newly refurbished offices in 2005, I had a large server cupboard built into my new office to house the network hardware and servers. The office had air conditioning and the cupboard had a number of vents for airflow. Unfortunately, our array of servers and hardware kick out a substantial amount of heat and the office air-con doesn’t result in sufficient airflow to keep the temperature in the cupboard down. It’s 9:00am at the moment and the outside temperature is about 14 degrees but the cupboard temperature is already 31.2 degrees. I’ve already had to replace two hard drives this year and we have a hot summer predicted in the UK .
The other problem with the server and network hardware is the noise. The network switch has fans which make a ridiculous amount of noise and the server PSU and CPU fans mean that the cupboard doors have to be kept closed.
Now, we are not a large company, about 20 active users at once and apart from our main file server we have an old NT server keeping a legacy SQL server application running and we have an email server and an intranet server. It could be argued that we don’t need our own mail server, particularly now that provider-supplied email services now include more services and options. However, I like the flexibility having our own email server provides.
All of our servers are standard PC kit running Debian (except for the NT server obviously!). Since there is little CPU or graphics load, it is possible to reduce the hardware requirements and be a little greener at the same time.
Continue reading ‘Green IT’
The UK votes today in European and local elections and just like every other election since 1992, I won’t be voting. More than ever now, I believe that our political system is broken. We basically have two parties (ok there’s a third but they are so far behind they are almost irrelevant) who will do absolutely anything to score points against each other and gain power for themselves and that’s all it’s about, gaining power. We have a 4-5 year cycle in general elections and the purpose of each party is to make sure that they win the next election. The public good comes a very distant second.
The recent response to the economic downturn has been a prime example. It is a case where the best solutions have to be debated and put into practice for the good of the nation and it’s people. Instead we’ve had our two main parties bickering and sniping at each other trying to knock each others ideas and score power points. As I’ve said so many times in the past, recession is more about confidence and public psychology than anything else. The Conservatives in opposition have publicy talked down the economy because “it’s all Labour’s fault” and the more damage they can do to Labour the closer the Conservatives are to power at the next election, an election which they might even be able to force the country into early even though that might not be the best thing for the economy or the country. For their part Labour have shouted down any decent ideas or policies the Conservatives have had to improve our economic situation.
What I want, and it’s for more qualified people than me to speculate as to how it could be brought to be, is for a system of consensual politics whereby the best solution is the target, not power. People need to have confidence that their elected officials are working for them, making their lives better and safer, and not simply giving platitudes while chasing power and wealth (do i need to mention MP expenses!?) for themselves and their colleagues.
What it ultimately boils down to is that I don’t belive my vote means anything, it is a means to the politicians end, not mine.
Recent Comments