Posted on — Leave a comment

Recovering from a failed Unifi Cloudkey (CK) update

It’s really not uncommon to ‘do everything right’, yet end up with a unifi CloudKey that is messed up after clicking update in the web ui/app.

Various things can cause this, from out of sequence updates, to the base software getting downgraded when the firmware is updated etc. If you are here, you already know what I mean.

Symptoms can include, but are not limited to:

Connection refused when trying to open the cloudkey on its management port (usually 8443)
Being able to get to the cloudkey options, but trying to manage the network results in a blank page
Being able to get to the cloudkey options, but logging into the cloudkey never gets past the login screen
The CloudKey favicon showing in browser, but just a blank page displayed

The CK light might be flashing or solid on.

This guide is targeted at the CloudKey Gen1, it ‘may’ help with other versions. You will need to be able to connect to the CK and SSH onto it. If you can’t, see the emergency recovery note at the bottom of this post.

So, for these steps you will need the credentials for the key and for it to not be totally corrupted (i.e. you can SSH to it). these are the same you normally login with (admin/[password]). This guide is for windows, but should be translatable if you are on another platform. DISCLAIMER: This guide is for reference. If you connect to any device via SSH, then the responsibility is on you to ensure you don’t make things worse.

Dont ever try to restart these by pulling the power/PoE connection. That will likely make things a lot worse if you can at the moment still SSH into the key. A lot worse means emergency recovery and backup restores.

Step 1: try to get the backups off the Cloudkey using WinSCP. Login to the CK IP, accept any certificates and browse to data/autobackup. Copy everything off the key just in case. If you have no backups here, put that in your notes to turn on when you have a working CK. You’ll need these if you have to do the emergency recovery later.

Step 2: Login to the key via SSH, I like to use SolarPutty, but anything that works will do. Try issuing a reboot command. Wait at least 15 minutes to

Step 3: Get yourself some information about the software on the key (this may or may not match what you see in network.unifi.ui.com before if went offline, and may be a lesser number). The command is: dpkg -l | grep unifi

Step 4: Grab the latest firmware and software URLS from https://www.ui.com/download/unifi/unifi-cloud-key. You’ll be able to see them once you accept the EULA. These are for using over SSH on the CK.

Step 5: (This may or may not be required). Run the 2 shell commands from https://community.ui.com/releases/UniFi-Cloud-Key-Firmware-1-1-6/525efb47-ce23-434c-ae73-49f4d44251bc#comment/42e00042-fc58-455b-9a53-fc09a70ffd1a
referenced here:
unifi_version=$(grep -io “We do not support upgrading from 5.” /usr/lib/unifi/logs/server.log | grep -io “5.” | cut -d’.’ -f1-3 | sort -V | tail -n 1)
if [[ -n “${unifi_version}” ]]; then rm unifi_sysvinit_all.deb 2> /dev/null; wget https://dl.ui.com/unifi/${unifi_version}/unifi_sysvinit_all.deb && dpkg -i unifi_sysvinit_all.deb && rm unifi_sysvinit_all.deb; fi

Step 6: Ensure ubnt tools are up to date with: apt-get update && apt-get install –only-upgrade ubnt-tools (This is refernced here https://automatica.com.au/2018/06/solution-to-failed-firmware-updates-in-a-unifi-cloud-key/ )
I saw that the version here was lower than I expected, but ran the command, let it complete and moved onto next steps.

Step 7: Firmware update. Using the URL and latest firmware you found above, issue the firmware update command: ubnt-systool fwupdate https://dl.ui.com/unifi/cloudkey/firmware/…… (an example would be ubnt-systool fwupdate https://dl.ui.com/unifi/cloudkey/firmware/UCK/UCK.mtk7623.v1.1.13.818cc5f.200430.0950.bin ). Wait for it to complete. Give it plenty of time after completing, i.e. go make a drink.

Step 8: Software update preparation. Using the software URL you found above, issue the commands:
cd /tmp (to move to temp dir.)
ls – l (To check if there are any previous software update files there (none in my case). If you do have them, issue ” rm unifi_sysvinit_all.deb ” to remove them.

Step 9: Software update download. Issue the command wget https://dl.ui.com/unifi/x.xx.xx_version/unifi_sysvinit_all.deb but substitute the URL you found for the latest software earlier (an example would be wget https://dl.ui.com/unifi/6.1.71/unifi_sysvinit_all.deb ). Wait for it to complete.
(referenced here https://help.ui.com/hc/en-us/articles/216655518-UniFi-How-to-manually-change-the-controller-version-on-Cloud-Key-via-SSH )

Step 10: Install the software with: sudo dpkg -i unifi_sysvinit_all.deb

Hopefully after this completes, you’ll have the latest firmware and software. Your current config will be able to load and you’ll then be able to get back onto the management of the CloudKey/network.

If you cannot SSH, or this doesn’t work, then recovery may be the next steps. See here for that: https://help.ui.com/hc/en-us/articles/220334168-UniFi-Cloud-Key-Emergency-Recovery-UI#2
You’ll need a backup from somewhere for this.

Posted on — 1 Comment

Windows 10 – Don’t panic

Windows 10 is here!

Windows 10 is a great OS, so don’t be afraid to upgrade. It is fast and really simple to use. Don’t be daunted by the start menu, just begin typing what you are looking for (after you click start). Instant search is great, and much quicker than looking for the apps/settings/programs manually.

If you do upgrade and have any issues, just give WCS a call. We are here to help. We have been testing the developer release of Windows 10 for months, and can help with everything from installation to backup.

If you have registered for Windows 10, but not yet been given the option to upgrade (and can’t wait), just head here –> https://www.microsoft.com/en-us/software-download/windows10

  1. Download Microsoft’s Media Creation Tool, then Launch it when it finishes downloading.
  2. Select the “Upgrade This PC” option and click Next.
  3. Let the Creation Tool run through its process. It should walk you everything needed to get your shiny new OS.

We think Windows 10 is a great step forward (and they brought Solitaire back too). Best of all it is free.

 

Posted on — 1 Comment

Domain server network connections unauthenticated or on “Public” network

Picture this:

Everything on your network is running fine, multiple sites, multiple VPNs, multiple domains. The site may or may not be virtualized.

Something dramatic happens (lets say a power cut to the head office). All the equipment comes back up in a strange order (servers before SAN, Exchange before AD etc).

You get the servers back online but strange things are happening. There are lots of errors in the event logs, relating to Active Directory and DNS. Failure to find domain, replication, zone transfer failures etc. All the fun stuff.

After a little investigation (and waiting for very unhappy exchange servers that cannot find AD to respond), you may find some strange behaviour.

Servers might have dropped onto the public network and are unable to replicate or communicate properly with the domain. I say properly, because some things will work and some things wont.

Exchange might have most of its services still starting, and it will be a total pain, and take a very long time to open ncpa.cpl (network control panel). If you manage to change the DNS servers on exchange to a non problematic DC, exchange will come up – or so it seems. Mail should flow and members of the domain that exchange is on will be able to login and get mail. Members of other (parent/child) domain who have mailboxes on the server may not be able to login to webmail though, and will get authentication errors on mobile devices.

Rebooting the servers or flushing DNS doesn’t resolve these odd issues. Closer investigation reveals that the servers (possibly AD) are on the public network, and other servers (possibly Exchange) are on the domain network with “(unauthenticated)” showing on the network connections.

Before you try removing and re-adding the vNic (this will take ages/forever for the server to recognise, don’t bother!) try this simple fix:

Open device manager (devmgmt.msc) and disable the network connection on the AD servers first. Re-enable it and it should drop back on to the domain profile. If not change the primary DNS of the server to a known good DC, ipconfig /flushdns and try again. Once you get all the DC’s in the domain (or at least the ones exchange is looking for for DNS), try the same with Exchange.

It should also then drop back onto the domain profile without “(unauthenticated)” after the NIC name. Once it has, restart the Exchange Active Directory Topology Service (check all the other exchange services restart OK), and after a little while mail should flow. Child/Parent domain users should be able to access their mailboxes too.

 

 

 

Posted on — Leave a comment

Warning – NICE Blood Results Email Scam

If you haven’t heard already, you should be aware of the latest variant of email scam that is circulating.

Traditionally scammers offer a financial reward, or attempt to convince you that there is a problem with online banking in order to get victims to reveal confidential information.

The latest sick attempt to entice people into visiting fraudulent sites/infect computers with malware involves sending an email apparently from NICE (National Institute for Health and Care Excellence). This email advises that there is a problem with blood results and that the victim may have cancer. Unfortunately this is enough to scare some into hurriedly following the links in the email, and unwittingly becoming victims.

As always, please be very cautious clicking any links in any emails. It always pays to open an internet browser and visit the real site directly, or contact the sender to verify the content of any email that is out of the ordinary.

More information here –> http://www.actionfraud.police.uk/alert-scam-emails-suggest-you-have-cancer-mar14 

If you have any doubt about the itegrity of your computers or network, please don’t hesitate to contact us so that we may assist you. Failure to act early could lead to further disclosure of your private information.

Regards,

WCS

Posted on — Leave a comment

Considerations and risks when choosing a managed IT service

Welcome to our first post of the new year!

Fully managed (or outsourced) IT is a very large part of the IT industry nowadays. More and more companies are seeing outsourcing the IT as an option. Price, convenience and offloading of the complexity of IT can seem very attractive.

In a lot of ways this can make sense. WCS offer this kind of infrastructure management, and have experience in many of the options available today. Some of these options are:

  • Contract phone support
  • Call-out to site, based on agreed SLA’s
  • Remote support (VPN to network or individual PC dial-in)
  • Remote (automated) monitoring and alerting

As you may understand, some of these options give far more or less control (and as such, quicker response/resolution times) to the managing parties.

Sounds great? It can be. But,  what happens when you don’t choose the right support company?

By handing control of your IT (and likely most critical) systems to a third-party, you are also outsourcing the risk. It is for this reason that it is incredibly important that you choose a company that can not only provide references for the type of support you require, but also for the complexity of the network that you need supporting. IT can be very complex in some cases. Legacy systems, non standard configurations & unusual hardware configurations are all things that the supporting company must consider when providing support.

Did you know that the recent catastrophic RBS Bank IT failure has been attributed (by ex-employees) to outsourcing IT  to a foreign country and in turn less experienced (and likely over-committed) engineers?

It is important that the right people are there (with the right experience in problem solving) to support you. Almost as important is that if an unknown arises, this is discussed with the client and all things considered before network changes are implemented.

WCS pride ourselves as working with our valued customers on as much as a personal and close level as is required. This not only delivers the best value possible to you, but keeps your confidence in us and allows us to do the best for you. Most importantly though, it ensures that the resources that we have been contracted to look after are protected.

Beware of companies who do not have the required level of experience when considering your individual business needs. We have all heard the great sales pitches, but does the IT support company completely understand your needs?

As with most of our posts on choice and advice, this one came about after being made aware of another major issue that had arisen (from another IT provider) which resulted in loss of access to critical business services due to a general lack of care, not following best practice and also not following the customers direct requests.

Please contact WCS to discuss your IT management and support needs. It won’t cost you anything for our free advice, but it could save you or your business money.

 

Posted on — Leave a comment

All hosting is not equal – beware of the risks of free hosting

 

Over the years, we have tried and tested many different types of VPS/Web hosting. It greatly depends what you are looking to host when it comes to deciding on the price you should pay.

For quite a while we have referred 000webhost to clients who really are on a budget. Having used this host for test/dev. sites in the past, we could say they were OK.

In recent times our uptime monitors have noticed more and more time-outs on these totally free providers. Recently one of our test sites disappeared totally (due to ‘inactivity’, despite the site being accessed near daily). Fortunately we had no content that was important or not backed up on that site. There are many stories online stating similar occurrences with free hosting. One unfortunate individual had three years of blogging and photographs removed without warning. The response from the host was “it has all been lost”. Free hosting comes with no warranty or SLA to fall back on when things don’t go as expected.

For this reason we must advise that if you want to host a site storing any important content, and especially business content, don’t even consider free hosting in any case. At WCS we have very competitive arrangements with robust, reliable and fast UK hosting that you can take advantage of, complete with full control panel and email access, should you require it.

If you choose to use free hosting for your project, please take our advice: Back the content up elsewhere & often. Please contact us if you have any concerns about your existing website hosting. We will be happy to help and offer advice.

WCS Computers

Posted on — Leave a comment

All pages except the home page broken after moving WordPress or 500 Server Error misconfiguration problems

Recently, I moved a whole WordPress installation from one host to another. The domain name stayed the same (Although during test, moving to a subdomain was pretty simple too).

The Official documentaion  (http://codex.wordpress.org/Moving_WordPress ) is some help, but there are some gotchas along the way too.

The result of this was initially the site didn’t load at all. The error was :

The server encountered an internal error or misconfiguration and was unable to complete your request.

This I believe was due to the way I exported the SQL database from the old server. Here are the steps I followed that worked in the end.

You should select:

  1. Add DROP TABLE/VIEW/PROCEDURE/FUNCTION
  2. Add AUTO_INCREMENT value
  3. Enclose table and field names with backquotes
  4. Complete Inserts (This isn’t always documented and I had issues without this option selected)
  5. Use hexadecimal for BLOB

    Export SQL for WordPress move and migration

 

Once you click “Go” you should have a full backup of your WordPress database.

After that, I copied all the files via FTP to the new host.

The next thing is to update the wp-config.php file with the Database Name, Username, DB password and host information for the MySQL Database on the new host.

That should be it. You should have access to the site again now. If you don’t, you may want to try removing the .htaccess file and trying again.

If you find that the homepage now loads but all the other pages are broken, things should be pretty easy to resolve. Head into WP Admin and go to the Settings/Permalinks section.

Hit save and the permalinks settings should now be updated in the .htaccess file which was created.

 

Once that was done, everything was working as it should again. I hope this helps you and saves some time troubleshooting WordPress migration issues..

 

 

Posted on — Leave a comment

Removing a child domain that no-longer exists

 

Rarely, a situation may arise where a child domain has been created in Active Directory, and the DC in that domain is no longer available. You are then left with a situation where you can’t contact the domain to either remove the objects, or the domain itself.

  1. Remove all the DNS entries for the missing DCs and the child domain. Make sure you get the GUID entries too.
  2. Fire up ntdsutil and connect to the operations master:

ntdsutil: metadata cleanup
 metadata cleanup:
 metadata cleanup: connections
 server connections:
 server connections: connect to server yourdomain.local
 Binding to london …
 Connected to london using credentials of locally logged on user
 server connections:
 server connections: quit
 metadata cleanup:
 metadata cleanup: select operation target
 select operation target:
 select operation target: list domains
 Found 2 domain(s)
 0 – DC=yourdomain,DC=local
 1 – DC=child,DC=yourdomain,DC=local
 select operation target:
 select operation target: select domain 1
 No current site
 Domain – DC=child,DC=yourdomain,DC=local
 No current server
 No current Naming Context
 select operation target:
 select operation target: quit
 metadata cleanup:
 metadata cleanup: remove selected domain

You may find that you cannot delete the child because servers still exist.

In that case:

ntdsutil: metadata cleanup
metadata cleanup:
metadata cleanup: connections
server connections:
server connections: connect to server yourserver.yourdomain.local
Binding to london …
Connected to yourserver using credentials of locally logged on user
server connections:
server connections: quit
metadata cleanup:
metadata cleanup: select operation target
select operation target:
select operation target: list sites
Found 1 site(s)
0 – CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=yourdomain,DC=local
select operation target:
select operation target: select site
Site – CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=yourdomain,DC=local
No current domain
No current server
No current Naming Context
select operation target:
select operation target: list servers in site
Found 1 server(s)
0 – CN=rogueserver,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=yourdomain,DC=local
select operation target: select server 0

 

You should then be able to back out (quit) and remove the server  (remove selected server). If you get a warning about a domain not being selected, then list them (list domains), and select the domain (select domain x).

 

Posted on — 3 Comments

Server 2012 Remote Desktop Services VDI Installation Fails

There are a few articles explaining how easy it is to set up RDS or VDI in Server 2012.

Well it may not be so easy, depending if you have installed windows updates (specifically KB2821895 ) or you have chosen VMware to host the RDS server.

As of today, if you cannot install RDS on Server 2012 and you have installed windows updates including KB2821895, you will find that you cannot remove it, and have to rebuild the server to get Remote Desktop Services and VDI to install.

Rebuild the VM and install the RDS roles you need before updating the server!

If after that, you still get a failure, and you are running ESX 5.1 as a host for this server, you may get this error: “Hyper-V cannot be installed: A hypervisor is already running“. You must enable nested VM’s by editing the VMX file

Shut down the host and add these lines:

hypervisor.cpuid.v0 = “FALSE”
mce.enable = “TRUE”
vhv.enable = “true”

The next thing to consider is: did you build the .VHD from another machine (or even VMware Workstation and use something like the (free) Starwind V2V Image Converter to convert from .VMDK)?

If you did, you may want to create a VM on the 2012 HyperV server and start it. Install the latest version of integration services from the Action menu when connected to the VM in Hyper-V.

So, you have managed all of the above, yet you STILL can’t complete the Remote Desktop collection to complete.

I had got through the first reboot of the RDS/VDI installation, but kept getting errors at the last stage (Creating the Remote Desktop Collection). I had tried to manually create the collection (using the tasks drop-down) in server manager->Remote Desktop Services->Collections, but no joy. The event log showed:

“Remote Desktop Virtualization Host failed to verify domain connectivity of the virtual machine” with Event ID 8464

You may also find that if you boot the VM in Hyper-V, that you will get information via DHCP, but you will only be able to ping the host, and not the internet or other servers.

This one took quite a while to figure out. You may see this if you happen to be running the Hyper-V server on ESXi/vSphere (Not a supported configuration strictly speaking).

You need to edit the VMware vSwitch  that the Windows Hyper-V VM is running on (and all others if you run vSphere and ever want to vMotion or migrate the VM). You must enable/accept Promiscuous Mode on the vSwitch.

I hope this article helps, and saves hours and hours of stepping through configuration issues with Server 2012 VDI.

 

 

Posted on — Leave a comment

Security in Lincolnshire Schools

More Coming Soon!

Recently I was asked to set up a computer for someone who had bought a laptop from a Lincolnshire school.

Little could I have imagined what data was still left on it, easily recoverable by anyone. Luckily it fell into my hands, and not anyone else.

How the school dealt with this was also just as shocking!

Once I have the full article completed, I’ll update this post.