Tuesday, 10 January 2017

2017 - a new year and new challenges in IT ahead!

Welcome back.

We've got a lot to do this year - the number of attacks is increasing again, Microsoft's new update policy will have it's full effect on the computing ecosystem and Linux will be a prominent part of this blog. Lots happening indeed....

We're at the 10th day of January and I've already had servers lose their Kerberos connectivity with active directory, our first cryptolocker infection and so much more.... I need a lot more coffee to deal with this pish.

Stay tuned - I'm hoping to get my hands on some new tech and describe, some old tech and revive it, and just generally putter around for your amusement.

So far I have learned this:
  • MacBook Pro's (2012) can and do lose their wifi capability - I think the on-board adapter and finding one that works with a Mac can be tricky. 
  • MacBook Air's have a battery problem - they turn off and won't turn back on until you remove the battery (an annoying exercise)
Plus all the stuff on fixing Kerberos etc which will be the subject of a post down the track.

Let's get to it.

Monday, 19 December 2016

Notes for installing Ubuntu 16.04.1 LTS on Hyper-V

The last couple of servers I've installed on Hyper-V with Ubuntu 16.04.1 LTS with 4.4 kernels have annoyingly hung shortly after setup.

Here is an excerpt of the errors:

info task rs main q reg 1162 blocked for more than 120 seconds not tainted

 This is a very inconvenient feature and I think I've nailed it. From Microsoft's site they have details on adding bits to your install that add functionality and (hopefully) will help avoid this issue.

The Microsoft page is here: https://technet.microsoft.com/en-us/windows-server-docs/compute/hyper-v/supported-ubuntu-virtual-machines-on-hyper-v?f=255&MSPPError=-2147217396

And the guts of it is to do the following (with 16.04):

  • # apt-get update
  • # apt-get install linux-virtual-lts-xenial
  • # apt-get install linux-tools-virtual-lts-xenial linux-cloud-tools-virtual-lts-xenial
and then reboot. It should fix it.

 The error was something like Kernel not tainted or similar. So far it's working.

Update 2016-12-22

It stopped working. Super annoying. Have tried from this site: https://www.blackmoreops.com/2014/09/22/linux-kernel-panic-issue-fix-hung_task_timeout_secs-blocked-120-seconds-problem/

See how that goes.

Have also done the stuff on this site: https://oitibs.com/hyper-v-lis-on-ubuntu-16/

Will see how that goes.

Saturday, 26 November 2016

Dell Inspiron 11 3162 Review

I bought this little 11" laptop off Dell's site after poking around and thinking it would be nice to have a little laptop again. I really missed my MacBook Air after I sold it - silly move that - so I thought why not consider this one? It's specs are underwhelming:

  • Celeron N3050 processor
  • 4GB of RAM
  • 32GB eMMC HDD
  • Bluetooth version 4
  • WiFi - 802.11ac+
For what it is, it performs quite well. It's crippled though. In fact - so crippled I couldn't get the thing to start a week ago. It would try to boot into Windows 10 and just hang and hang and hang - you get the drift. I let the power completely drain then tried again. Repair windows install was the next question.... grr. After completing this it booted. That's the only problem I've had with it.

I have had the chance to use it for a couple of presentations. The built in HDMI interface is amazingly handy and the Dell drivers work well for the system, allowing for quick and painless swaps between things. It also gets 8 hours out of the battery which is very impressive indeed. I've tested this twice, and after a full day of work it still had some go in it. 

The ergonomics aren't too bad - I find the keyboard a tad small. But to give you perspective, I'm typing this on a wireless Mac keyboard and I find that a tad small too. I'm most comfortable on an ergonomic keyboard, the Microsoft Sculpt is the current choice of weapons for that. The mousepad is responsive and I find it to work quite well.

All up, this little laptop was about $275 - this model was $300+ at JB HiFi. It's worth checking the manufacturer's site for these better deals. For the equivalent money at JB I'd have only gotten 2GB of RAM. That extra RAM can make an enormous difference! Can't remember if the disk was bigger was or not, but there is an SD card slot so I've already slammed a 64GB disk into that. Combined with network storage and the high speed wifi, I'm set to go.

I think this machine is pretty good. I've got a real dislike for Windows 10 and the way privacy and updates are being handled, but I'll leave that for another post. I'm going to investigate putting Linux on this machine. I think it'll go really well with it.

For a cheap laptop, it's got some solid specs and it's reasonably good to use. 

Friday, 11 November 2016

Dell T110 Server - older tech still doing the yards

The last time I was out in Coober Pedy, I saw a lot of Toyotas running around. Landcruisers mostly - a great vehicle and out in the Red Centre with some pretty harsh conditions, they were the vehicle of choice. Solid, reliable, amazingly well built. It's a bit like the older Dell servers still kicking around.

To my case in point - the Dell T110 Server. These servers, brand new, with a Xeon Processor, 4GB of RAM and a 250GB HDD were around $1400. We got several cheap, added RAM, disk and an OS and sold them to customers. The basic spec was pretty sound:
  • Intel(R) Xeon(R) CPU X3430 @ 2.40GHz 
  • 4GB of RAM (maximum 16)
  • Dell PERC S100 onboard RAID (fake RAID but still OK)
  • space for 4 disks
  • tower configuration
 About 18 months ago I was given one of these servers by a grateful client after a particularly painful weekend migrating one server to another. After thinking about it for a bit, and knowing the S100 RAID card is Windows only (Linux won't see the arrays, just the disks - use AHCP if you're using Linux), I decided to pop Windows 2012 Server on and run a bit of the Hyper-V action for shits and giggles. In order to do this and to solve a tricky customer problem, I upgraded the server a little bit.

I added two 250GB SSD disks and made them the primary array, with the two 250GB HDDs as a data array. I installed Windows 2012, set up Hyper-V and then built a 2008R2 server as a VM. I also added more RAM to max it out at 16GB. Now, the 2008R2 server boots up in under 20 seconds! It is so quick and as I was using it to try to repair a broken SharePoint (see my previous post on this) I was very happy to have a machine that would restart in the blink (almost) of an eye.

Fast forward to about 3 months ago, I ditch the 250GB HDDs out of it and upgrade them to 2TB drives giving me a data array of 1.8TB for stuff. I've used the machine to create (and destroy) about 20 different VMs for testing and it has been reliable and solid for all the time. Suffice to say I'm very happy with it.

I was puttering around on eBay about 3 weeks ago and saw one of these for sale for $150! I grabbed it, as quick as possible. It turned up with the base spec. Using some old stuff lying around I've upgraded it to be a 2012 server, with 16GB of RAM, a 1TB HDD based primary array and a 1.8TB HDD based secondary array. This one is as solid as the other! I've since moved the bulk of the family data to it, configured some nice backups and off it goes. I've even put Hyper-V on it and run up a 2016 test server - it goes quite well.

All in all, I've spent under $1000 for these two servers and they comfortably handle everything I'm throwing at them. The original server, at one point, was running 2008R2 with SharePoint live for a client with 20 people using it, several Linux servers and a Windows 2012 based file server - all on hardware that is 5 years old. The SSDs really make the machine fly - a worthwhile upgrade indeed. In fact, as they get cheaper I can see myself upgrading the data array to SSD... it'll be pretty good!

The next gen in the T110 - the T110 II has a better Xeon processor in it, with double the RAM capability and they also came out with hardware based arrays. I'm keeping an eye out for one even as I write this.

If you're looking for a server to play with, or to manage a small workforce, then it's hard to go past something like this. Need redundancy? Buy two instead of one and set up live migrations (next on my to-do list).

I love this older tech - I can still get brand new replacement parts (like PSU's) and the original gear is running happily. It's cheap and it works - get around it!

Tuesday, 11 October 2016

Fixing Windows 7 update problems

Everyone knows that newish install of Windows 7 will have problems updating. CPU usage and Memory usage climbs, and nothing ends up happening. No updates are applied and your computer becomes basically unusable. Here is the procedure we've found to be useful when working on this problem:

Start run, services.msc
Stop windows update service


KB3102810
32bit: https://download.microsoft.com/download/A/0/9/A09BC0FD-747C-4B97-8371-1A7F5AC417E9/Windows6.1-KB3102810-x86.msu
64bit: https://download.microsoft.com/download/F/A/A/FAABD5C2-4600-45F8-96F1-B25B137E3C87/Windows6.1-KB3102810-x64.msu

Stop Windows update service

KB3135445
32bit: https://download.microsoft.com/download/2/E/D/2ED368A8-9967-4829-9CD5-9037AD48FF72/Windows6.1-KB3135445-x86.msu
64bit: https://download.microsoft.com/download/9/C/8/9C855F85-08B1-47B4-97DF-B6A7D187F0B7/Windows6.1-KB3135445-x64.msu

Stop Windows update service

KB3138612
32bit: https://download.microsoft.com/download/E/4/7/E47FB37E-7443-4047-91F7-16DDDCF2955C/Windows6.1-KB3138612-x86.msu
64bit: https://download.microsoft.com/download/B/7/C/B7CD3A70-1EA7-486A-9585-F6814663F1A9/Windows6.1-KB3138612-x64.msu

Stop Windows update service


You are now going to download and install either one or two updates manually.  In most cases only the first (KB3172605) of these is needed.  If that produces a result that says the update is not appropriate for you computer, you need to first install the 2nd of these (KB3020369), then install the first (KB3172605).


KB3172605
32bit: http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/09/windows6.1-kb3172605-x86_ae03ccbd299e434ea2239f1ad86f164e5f4deeda.msu
64bit: http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/09/windows6.1-kb3172605-x64_2bb9bc55f347eee34b1454b50c436eb6fd9301fc.msu

KB3172605
32bit: https://download.microsoft.com/download/C/0/8/C0823F43-BFE9-4147-9B0A-35769CBBE6B0/Windows6.1-KB3020369-x86.msu
64bit: https://download.microsoft.com/download/5/D/0/5D0821EB-A92D-4CA2-9020-EC41D56B074F/Windows6.1-KB3020369-x64.msu

Reboot and then full updates from there.

Monday, 10 October 2016

OTRS and HTTPS

Following the recent upgrade of OTRS on our servers to the latest version, I went one step further and decided to deploy https to wrap it all up. There is no significantly important data shared or entered in our OTRS configuration, but I think it a worthwhile exercise to put encryption in place. I've only really touched on SSL once or twice before with server configurations, and I started out by looking for a cheap certificate. The thing is, this is a commercial application of the system and I didn't want to use a non-profit or education SSL cert for something that is part of our money making enterprise.

Enter "Let's Encrypt". I read about this somewhere - probably one of the many *almost* spam newsletter type emails I get during the week from a vendor. A Google search brought up a DigitalOcean write up on how to apply this to the particular version of Linux I'm running.

I'm just going to say that I love the DigitalOcean walk through's. They're clear and easy to follow. I tend to have bits of extra complexity in my installs, but I'm usually able to extrapolate from the D/O information to get want I want. Here is the link to the walk through that I used:

https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04

Get around it - it's great. So now we have an encrypted OTRS site and it works well.

Apart from just having an encrypted site, we have also noticed a pleasing uptick in the responsiveness of the site and a removal of an ongoing issue we were having access it from external. When my techs would try to connect to the page from outside the office and then enter data into it, they would have to continuously re-authenticate. This was completely unusable and also one of those problems I just never seemed to have time to get around to fixing. Now, with https:// in front of the address, this problem has disappeared! The site responsiveness isn't to be ignored - no matter where it's being accessed from, the page is significantly faster, a fact which pleases all of us.

To summarise - spend the time and get the encryption happening for OTRS - it's worth it!

Tuesday, 27 September 2016

OTRS Upgrade Notes



First things first, we need to download the latest and that’s usually from the public FTP site on OTRS’ site. Here is a good place to start: https://www.otrs.com/download-open-source-help-desk-software-otrs-free/ I always grab the source .tar.gz file and usually with this command:

# wget -c http://ftp.otrs.org/pub/otrs/otrs-5.0.13.tar.gz (for the latest one anyway – which at time of writing I 5.0.13)

The upgrade direction is here: http://otrs.github.io/doc/manual/admin/5.0/en/html/upgrading.html and I want this to be my summarized version of this for ease of use both for myself and for you, gentle reader.

I have a script that starts off the upgrade process with some of the basic stuff (note – run this as root):


#!/bin/bash
service cron stop
service apache2 stop
service postfix stop
NOW=`date +%F`
mkdir /root/backup/$NOW
BDIR=/root/backup/$NOW
cp -R /opt/otrs/Kernel/Config.pm $BDIR
cp -R /opt/otrs/Kernel/Config/GenericAgent.pm $BDIR
cp -R /opt/otrs/Kernel/Config/Files/ZZZAuto.pm $BDIR
cp -R /opt/otrs/var/ $BDIR
/opt/otrs/scripts/backup.pl -d $BDIR


Now what this does is to stop the services in Step 1 of the upgrade documentation.
Then we set the “date” variable and create a backup folder for it and instantiate a variable to make the script shorter – the “BDIR” variable.
Now I simply step through the guide and backup what I need to in Step 2 and then run a full backup into the backup directory with the backup.pl -d $BDIR command.
Now it’s time for the command line work to begin. I typically download the source file into an OTRS folder in my root home directory (yes I do this all as root) so I will run:

# tar -zxf otrs-5.0.13.tar.gz

Once the tarball is extracted I copy the resultant directory to the /opt/ folder:

# cp -R otrs-5.0.13 /opt/

In the directory are all the other OTRS installs I’ve done but haven’t cleaned up. An ls of the /opt/ directory usually looks like this:

root@otrs:/opt# ls
otrs        otrs-4.0.11  otrs-5.0.1   otrs-5.0.13
otrs-4.0.1  otrs-4.0.7   otrs-5.0.10  otrs-5.0.5
root@otrs:/opt#


The bolded otrs is a logical link. I delete that:

# rm otrs

And create a new one:

# ln -s /opt/otrs-5.0.13 otrs

We need to copy stuff back now and I have a bit of a script that will do it:

#!/bin/bash
BDIR=/root/backup/`date +%F`
cp -R $BDIR/Config.pm /opt/otrs/Kernel/
cp -R $BDIR/ZZZAuto.pm /opt/otrs/Kernel/Config/Files/


It copies back the files we need to and moves us through Step 4.
Now to set permissions on the new OTRS directory:

# /opt/otrs/bin/otrs.SetPermissions.pl –web-group=www-data (for Ubuntu)

And this sorts out the permissions. I also find it very useful to change the ownership of files at a more macro level too, so I will also run:

# chown -R otrs:www-data /opt/otrs*
# chmod -R g+w /opt/otrs*

This has solved some issues in the past and seems like a handy thing to do.
Step 4 is finished and Step 5 has us checking Perl modules out:

# /opt/otrs/bin/otrs.CheckModules.pl

We can skip to Step 7 now and we have to change to the OTRS user:

# su otrs

As OTRS, Step 7 gets us to refresh the config cache and then delete the other caches:

$ /opt/otrs/bin/otrs.Console.pl Maint::Config::Rebuild
$ /opt/otrs/bin/otrs.Console.pl Maint::Cache::Delete

Annoyingly we have to change back to root and restart services. I just CTRL-D out of otrs and then run:

# services apache2 start
# services cron start
# services postfix start

And then su back to OTRS

# su otrs
$

Step 12 – restart the OTRS Daemon (as otrs – don’t forget!)

$ /opt/otrs/bin/otrs.Daemon.pl start

And then Step 13 which updates cron for the OTRS user:

$ cd /opt/otrs/var/cron
$ for foo in *.dist; do cp $foo `basename $foo .dist`; done
$ /opt/otrs/bin/Cron.sh start

And that’s it for the command line stuff.

Log into the website and go to Admin and then Package Manager. I usually find that at least three packages need to be either re-installed or updated. While these are not right, the website will run terribly slowly. Fixing the problem here will give you back some performance and set it on the right track.

That’s pretty much it. Done!

AppleTV and Jellyfin

 I like the AppleTV - what a great little bit of kit. The sad thing is, the application that connects to my Jellyfin server has been very hi...