Winter Be* Gone

December 29th, 2009

Sods Law. Curse whoever gave it a name. My Be* Pro ADSL2+ connection has been running constantly without outage since July when it was installed – modem has never been powered off and the internet has never been down. 3 days after i go away for christmas – my VPN goes down. Since there has never been an issue with the connection i immediately thought my house had been flooded/on fire/broken into. The next day i drove down (7 hour round trip, in the thick heavy 15mph on the motorway kind of snow) to find that all i needed to do was reboot the modem! Shock horror this has never happened before. Few days later, it happened again, i gave up this time, since it was Christmas Eve i just took out home insurence instead (which i had been meaning to do for a while).

I got back a few days later and again, rebooted the modem. Weird. Went onto the Be* forums and it appears as of 20th December, many many people who previously it was fine, have been having issues. Could it be the cold? Maybe. Personally, i think that there has been some firmware updates on the DSLAMs/Line cards and it’s causing a problem. That said however, i did notice there was noise on my voice line when the internet went off – it’s been on and off like a yoyo for the last few days. Not had to actually reboot the modem yet though, it’s been coming back up on it’s own.

I think i’ll wait it out for a little while, given so many people are having problems which has not attributed to the usual bad filters/cables etc i’ll see how it goes. On the plus side, Be*’s customer service is faultless – on Christmas Eve i was in an IRC chat with someone who helpfully – although i’m not running their modem and couldn’t swap any plugs about, checked the connection status to see if the modem was online, re-training etc.

They have also announced that line bonding will be available starting end of January – BONDING!!! At a price of around £55/monthly, total. 44meg down 5meg up (max). Yes please!

Dissertation

December 29th, 2009

I have decided that a suitably long period of time has now elapsed since i completed my degree in Audio Technology at The University of Salford for me to publish my dissertation. I’ve also noticed that i get quite a lot of search hits on my site for people looking for dissertations. Rip it off if you want, really, go on, if you can’t be arsed to do your own work and you can sleep at night stealing someone elses work which has had literally hundreds of hours put into it then go right ahead. If you can live with that.

The focus of the project was to find a new means of creating MIDI data, i chose to use the Nintendo WiiMote and convert user movements into MIDI data – how is that different from WiiDrums/Guitar Hero etc. well i’ll tell you how – this system is spacially aware. That means that the physical position of the controller affects what data is generated, not just relative movments from the accelerometer and button presses. When i wrote the dissertation, no one else had done this. I suspect that is no longer true as both the commercial and hacker markets have exploded in development for the WiiMote. Anyway, heres the link for you to enjoy, sorry no CD-ROM but i’m not just going to give away the source code… you’ll have to ask nicely ;)

http://www.lewty.org.uk/dissertation.pdf

Fixing CD Players

November 21st, 2009

Recently i bought a CD player listed as broken on eBay, on it arriving, it read cd’s and played but the audio was broken up, distorted and the cd was skipping.

After some consideration i decided it could be the laser assembly, so i attempted to swap the transport with my other Sony CDP, alas i was foiled as the two transports are not interchangeable. However, the laser assembly is, so i did that.

Success i thought – except it wouldn’t read any cds, knowing this was a good laser, i did a bit of searching about and all i needed to do was adjust the laser focus by turning a small pot on the side of the assembly.

In the picture below under the large red letter ‘L’ is the adjustment pot, making minute adjustments to this and re-testing enabled me to fix the CDP back to full working order. Annoyingly i could have done this with the original laser assembly, and saved myself the bother of swapping them all about.

So theres your tip, if your CDP has started skipping or not reading cd’s, try adjusting the laser – if you’re resigned to getting rid of it anyway, you’ve got nothing to lose.

Linksys ‘Business’ Switches

November 8th, 2009

In short, do not buy.

We got a couple of SRW248G4′s at work for the 100meg access ports and they’ve been a lot of trouble. For somthing claiming to be a ‘Buisness Class Device’ it really isn’t.

For starters, the web configure interface only works in IWE5.5 – 7 (note not IE8), it’s also slow and buggy. There is a workaround for IE8 where you limit the number of connections it makes to the server (your browser will make multiple connections to get better performance), but that is a workaround and not a fix.

So now you’re thinking ‘so what if the web interface is rubbish, we can just use the CLI’ well, you’d think that, but the CLI doesn’t give you access to all the configuration options making it pretty useless. That’s the same for Telnet, SSH and Serial/Console.

Software update 1.2.2b fixes some of the issues with the web interface – it certainly seems more reliable.

All of this was fine as i had them configured and they just sat there, the web interface occasionally crashing (but i’ve not seen that on the new software), until recently that is. Suddenly we started getting dead ports – now a total of 8 dead ports on one switch (i’m RMA’ing it).

So i thought i’ll export the config from switch one (running sw 1.2.1b) to switch to (sw 1.2.2b) and there wouldn’t be a problem. However the software doesn’t include any version checking on the config file, so it just resets back to factory. After manually migrating the config i was able to migrate all the hosts over to the apparently working switch.

Performing factory reset on the broken switch had no effect on the problem, although i did notice these errors in the log

%ERHG-F-SEND: BOXP_perform_smi_scan_of_devices_in_slot: invalid device type is found: 4523 on device 4  ***** FATAL ERROR *****  Reporting Task: ROOT. Sof

tware Version: 1. 2. 1b (date  31-Aug-2006 time  13:47:21)  ***** END OF FATAL ERROR *****

%SYSLOG-F-OSFATAL:   FATAL ERROR: GOAH: ABORT PREFETCH exception   ***** FATAL ERROR *****  SW Version  :  1. 0. 0. 24 Version Date:  31-Aug-2006  Version

Time:  13:47:21 Instruction            0x6f743d3c Exception vector       0xc  Program state register 0×60000033 ***** END OF FATAL ERROR *****

Many many people are having problems with these switches, this switch has all the features required from a company now owned and run by Cisco, so i thought the support and quality would be up to Cisco standards. Obviously not, Cisco need to either fix these problems or they’re going to ruin their brand reputation (if they hadn’t re-branded it all as Linksys by Cisco and moved the support over they wouldn’t have this problem as it’s more clearly defined as a sub-company).

I’ll wait and see what happens with the RMA.

Redmine…field

October 20th, 2009

Redmine then.

So what’s that then i hear you cry…ok well maybe not but you’re probably still interested. Redmine is an alternative project planning, issue tracking, wiki type tool to Trac. We’ve been using Trac in the office for a few years now, i installed v0.10 about two years ago. Up until now, that’s been fine, it’s offered everything we wanted. (See http://trac.edgewall.org/)

But we’ve outgrown it, as with many things, so we’ve turned to Redmine (http://www.redmine.org/) which has many better features, such as:

  • Multi-project support
  • Cross project tickets
  • Ticket dependancy and relations
  • SVN/Wiki BLAME (puts the name of the person who edited of each line of code/wiki next to it)
  • Built in LDAP auth support – with field configuration (ie configure that uid=username etc, so it will work with AD and native LDAP)
  • Time management and planning – including worked hours, gantt chart and more.
  • Lots of good plugins – including, graphing, costing (budgets), ticket reminder (Whiner – emails a reminder to a user if they haven’t worked on an assigned ticket in a set period), code review (annotation) and more

So that’s Redmine, what about the installation. To evaluate the system i set up a basic ESXi 4.0 VM running CentOS 5.3. It was installed mostly from this guide http://blog.itsmine.co.uk/2009/01/22/howto-install-subversion-and-redmine-on-centos5-rhel5/

This went mostly smoothly, i skipped the steps of setting up SVN (but did this later on). It wasn’t all plain sailing though there were a few issues -

MySQL Sock

(unable to find /tmp/mysql.sock) To solve this simply edit redmine/config/database.yml to inset the new socket location. You need to edit this file anyway, but that’s covered by the install guide. Here’s the final config (username and password obscured for obvious reasons)

production:
 adapter: mysql
 database: redmine
 host: localhost
 username: ourdbuser
 password: ourdbpassword
 encoding: utf8
 socket: /var/lib/mysql/mysql.sock

For our system (CentOS) the location of the MySQL socket was at /var/lib/mysql/mysql.sock.

Email configuration, is in email.yml also in the config directory

production:
 delivery_method: :smtp
 smtp_settings:
 address: ourmailserver.internaldomain
 port: 25
 domain: ourdomain.co.uk
#    authentication: :none
#    user_name: daemonuser
#    password: daemonpassword

That’s for a mailserver which doesn’t require authentication, this will be the case for most people. If you do need it you can specify plain and secure as authentication types, as well as uncommenting those 3 lines obviously.

Trac Migration:

Simples!? Well, you’d think so. Firstly i had issues installing sqlite2 on the system alongside sqlite3 which apparently they will both work side-by side. Anyway, our new CentOS system was stuck with sqlite3, but our Trac DB is in sqlite (2) format on NetBSD. This means that i was unable to direclty import the sqlite2 database into Redmine as i couldn’t compile the sqlite2 ruby gem.

Trac as of v0.11 started using sqlite3 so provided upgrade instructions, which would have been fine on their own (see http://trac.edgewall.org/wiki/0.10/TracUpgrade) (Command

sqlite trac2.db .dump | sqlite3 trac.db

What i did here was instead redirect the dump to a file which i copied onto the new Redmine server and imported that way, using these commands

#Execute on trac v0.10 server
sqlite trac.db .dump > tracdump.dmp

#Execute on Redmine sqlite3 server
cat tracdump.dmp | sqlite3 trac.db

Then use the trac migration instructions here http://www.redmine.org/wiki/1/RedmineMigrate

I modified the command,

#Original command
rake redmine:migrate_from_trac RAILS_ENV="test"

#Modified
rake redmine:migrate_from_trac RAILS_ENV="production"

This imported the Trac db directly into the project, you will need to supply the location to the trac envrionment (full envrionment not just the DB so do a trac hotcopy to get a full version, but convert and overwrite the trac.db file in /tracroot/db/trac.db)

The trac backup command is

/usr/pkg/bin/trac-admin /usr/pkg/share/trac/tracproject hotcopy /root/tracbakup

That’s for NetBSD installations, on your system trac-admin is likely to be lcoated elsewhere and your trac project location will be where ever you set it up to be.

Subversion integration:

I had an issue here where it refused to load the repo properly. First of all i had created a new local repo then imported the SVN dump file from our production SVN server

#SVN Dump
svnadmin dump /path/to/reponame > /tmp/reponame.dump

#SVN Create
svnadmin create /path/to/reponame

#SVN Restore

svnadmin load /path/to/reponame < /tmp/repo1.dump

I then configured Apache with mod_dav_svn to act as the SVN server, secured against LDAP with the following config

<Location /svn>

 DAV svn
 SVNPath "/var/svn/repo/"
 AuthType Basic
 AuthName "Subversion repository"
 AuthBasicProvider ldap
 AuthzLDAPAuthoritative   On
 AuthLDAPURL              ldap://ldapserver.local:389/ou=People,dc=ourdomain,dc=co,dc=uk

 AuthLDAPBindDN cn=admin,ou=People,dc=ourdomain,dc=co,dc=uk
 AuthLDAPBindPassword adminpassword
 AuthLDAPGroupAttributeIsDN on

 Require ldap-group cn=Dev,ou=Groups,dc=ourdomain,dc=co,dc=uk
 Require group cn=Dev,ou=Groups

 </Location>

That config just lives in httpd.conf (or under ssl.conf if you wish) and states that the repository at /var/svn/repo is to be served as /svn via HTTP to anyone in the Dev group of LDAP (where Dev is a ListOfUniqueNames) It specifies the credentials to bind to LDAP with (admin).

That done we can configure Redmine, this is done through the UI, go to the web interface which should hopefully be running and log in with admin/admin. If you’ve imported Trac then you’ll already have a project set up in which case go to Settings > Repository. Fill out the obvious details, if you don’t allow public read-only access then you need to specify a user which at minimum can read-only.

This probably won’t work for you as the system won’t have permission to create the config directories in the default location /root/.subversion/  So follow the bottom of the Redmine CentOS install guide carefully. I also ran a command which fetched the commit history manually so that the credentials were saved and i could accept any certificates which were presented.

So that’s it more or less. A couple of small hints,

To enable cross-project ticket references go to global Administration > Settings > Issue Tracking and tick ‘Allow cross-project issue relations’. For LDAP auth go to Administration > Settings > Authentication  Then at the bottom right hand corner there is a small ‘LDAP Authentication’ link Click this and then ‘New Authentication Mode’ to fill out the details.

One of the neat things about Redmine is the ability to specify which LDAP fields correspond to username, firstname, lastname and email. Which is very useful as AD stores the usename in one field wheras POSIX users are stored differently.

I hope that help’s someone, i’m going to attempt to blog more of my work IT stuff like this (nothing sensitive obviously) as i know i was googling a lot to find answers to my questions!

A Mini Fetchmail Howto

September 6th, 2009

Since when i was searching on how to use fetchmail, my specific use was a little hard to find. All i wanted was somthing to collect mail from an external pop3 server then re-deliver it to my internal MS Exchange server – the only reason for this is so that i get the ‘new mail’ notification from Outlook instead of mail just appearing in my inbox as when i used another instance of Outlook to collect my mail.

In the end it’s quite easy, simply create a new file in /root/.fetchmailrc to store the data, chmod to 600 and here’s my (obviously edited) config:

set daemon        120 # sets fetchmail to run in background mode checking every 120 seconds

poll pop3.isp.co.uk proto pop3 user ‘user@isp.co.uk’ with password ‘mypassword’ to user@localserver.org.uk smtphost 192.168.7.30

# this line uses the pop3 protocol, checks my isp’s mail server with the correct credentials then forwards to the specified address at the internal IP of my mailserver

poll mail.mywebhost.co.uk  proto pop3 user ‘mywebhostuser’ with password ‘webhostpassword’ to user@localserver.org.uk smtphost 192.168.7.30 ssl

# this line is similar to the first and is for my hosted email service which comes from my webhost provider (TSOHost) and so requires ssl connectivity.

That’s all there is to it really, all i did then is run fetchmail from the command line with no arguments and away it goes. I need to add a start up script to trigger it but apart from that it’s all good. Somthing i want to look at for work is collecting all mail from a mailbox then using the ‘to’ address in each email to forward to different mailboxes.

All Things Bright and 7-iful

August 15th, 2009

Windows 7. Yay or nay?

I’ve been following the progress of 7 since the beta first launched, using the beta, some other builds, the RC and now i’ve finally moved to the RTM (thanks to MSDN). There were quite a lot of minor (but annoying) changes between RC and RTM. First of all they have turned on incompatible application checking so when i went to use acronis to image the disk over (I was using a spare 80Gb disk to test, now i’ve moved it onto the 160Gb disk which is in my HTPC) it wouldn’t install!. After a little digging i realised i didn’t need to use Acronis anymore anyway – Windows 7 includes a built in image-based backup and restore tool – even booting from a CD and restoring over the network.

That done i was faced with the problem that the restore had ledt 80Gb of unallocated space on the new drive – this too has been addressed, simply pop into disk management and select to extend the partition and it’ll dynamically resize!.

I’m impressed with Windows 7, the improvements to mediacentre are good – i now can’t go back to Vista for this, it’s been reliable and overall easy to use.

I’ll be switching to it on my desktop as soon as i can be bothered to go through the rigmarole of reinstalling all my apps. At least on the HTPC it’s easy – install OS, drivers, Win7 Codecs, some minor tweaking and config and it’s done.

Solaris and adding disks

July 28th, 2009

As many of you know i run Solaris 10 x86 on my fileserver, so i can use ZFS and RAIDZ. I recently ran out of storage space so off i went and bought three new 1Tb Samsung Spinpoint F1′s to add to the array.

I figured it would be as simple as plugged the disks in, then running the command

zpool add -f <poolname> raidz <newdisk1> <newdisk2> <newdisk3>

But alas no, the disks were not detected! Normally running ‘format’ at the command will list all the disks attached to the system but this time it did not. However, running iostat -En did, but they had mangled names – sd4, sd5 and sd6 instead of doing that the -n parameter is supposed to and show up the actual system disk name.

After some digging and researching you have to run the command ‘disks’ in order for the disks to be usable. Once i’d run this – which has no user output, running format displayed all the disks. Then it was a matter of running the zpool command above and hey presto, my usable storage space as up to 3.12Tb!

In summary:

-bash-3.00# disks

-bash-3.00# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
 0. c0d0 <DEFAULT cyl 9726 alt 2 hd 255 sec 63>
 /pci@0,0/pci-ide@2,5/ide@0/cmdk@0,0
 1. c2t0d0 <ATA-SAMSUNG HD753LJ-1107-698.64GB>
 /pci@0,0/pci11ab,11ab@d/disk@0,0
 2. c2t1d0 <ATA-SAMSUNG HD103UJ-1113-931.51GB>
 /pci@0,0/pci11ab,11ab@d/disk@1,0
 3. c2t2d0 <ATA-SAMSUNG HD753LJ-1107-698.64GB>
 /pci@0,0/pci11ab,11ab@d/disk@2,0
 4. c2t3d0 <ATA-SAMSUNG HD103UJ-1118-931.51GB>
 /pci@0,0/pci11ab,11ab@d/disk@3,0
 5. c2t4d0 <ATA-SAMSUNG HD753LJ-1107-698.64GB>
 /pci@0,0/pci11ab,11ab@d/disk@4,0
 6. c2t5d0 <ATA-SAMSUNG HD103UJ-1118-931.51GB>
 /pci@0,0/pci11ab,11ab@d/disk@5,0
Specify disk (enter its number): ^C

-bash-3.00# zpool add -f MAIN raidz c2t1d0 c2t3d0 c2t5d0
-bash-3.00# zpool list
NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
MAIN                   4.77T   1.98T   2.79T    41%  ONLINE     -

And you’re done!

I’m Baaack!

July 1st, 2009

So i am!

Back indeed. Once again i have returned to the Wirral and Be* Unlimited internet. I’m more or less settled into my new home – although i have a few DIY jobs that i need to be getting along with, i just hadn’t had my first pay cheque until last week so i couldn’t afford to spend, well, anything. Now that’s sorted i’ve spent a small fortune in Tesco and sorted out all my bills as well as the internet.

Internet wise it’s another Be* Pro package – this time achieving about 13Mb instead of 18, but it’s still pretty good, the support is still good too. How long this remains a good service for remains to be seen – it’s become far more popular than it used to be. They’ve also cheapened the modems – they look better, but lack the VOIP FXO/FXS support the old ones had. Luckily it doesn’t matter all that much for me as i use a Linksys AM200 which i just plugged in, configured my router (Linux/IPTables) and it just worked. No hassle. No fuss.

Now i have internet again, i need to get back into the habit of reading the forums, blogging and other general technical wizardry. I’ve been busy sorting out my rack and networking – see my Flickr page for pics. It all looks very professional with proper sockets in every room and no trailing wires.

I also bought a Cisco 3524XL-PWR POE Switch, unfortunatly it decided to break, i’m currently trying the latest IOS on it, in a last desperate attempt to save the £60 i shelled out on it. POE is really rather nice and works with the Cisco phones very well, just not any other kind of phones as this is a pre-802.1af Implementation by Cisco.

Anyway, that’s it for now, i’ve got all sorts to write about – MediaBrowser, Cisco Switch, Asterisk/Trixbox, Work and more. But i’ll get to all that later on, in more detail.

Why no blog?

May 1st, 2009

I feel like i should explain why i haven’t been blogging recently, why, i don’t know… Anyway, i’m in the final year of my degree at Salford University and between now and the end of May i have 3 exams, 2 presentations and a dissertation deadline. So it’s fair to say i’m quite busy. I don’t really have time for much of anything apart from work at the moment. But in June i’ll be back in a nice office job and so i will have plenty of time in the evenings to devote to interesting projects which i can then blog about.

In the meantime, i discovered an excellent project for Vista Media Centre in the form of MediaBrowser – www.mediabrowser.tv it’s essentially a plug in which manages movies, pulling metadata from local and remote sources (the open source TV and Movie DB’s). But, the big difference between this and most open source projects – it actually looks nice, with iTunes style ‘cover-flow’ browsing.

As well as metadata, it can make use of mediainfo.dll to extract technical details from the files, so will display within the UI it’s resolution, aspect ratio, sound type, codec etc. It’s also the first open source project i’ve contributed to, now that is a big thing for a developer. The first time you get annoyed with some software and your solution is to download the source code, fix and compile rather than submit a bug report feels very good. Granted it was a simple bug, but nonetheless, i worked around it.

That’s it for now, i’ll be back in June, after i’ve moved house.