Ramblings of this guy you know!

Tech Stuff and random observations on life as I see it….

Category Archives: Misadventures in Computing

Apple Mac not shutting down properly? Check the Console

shutdown I’d like to extend my thanks to Killerwolf for this blog post that helped my diagnose the problem – Read it here 

I’ve been having problems for a wee while with my Macbook Air not shutting down properly… It had been happening for a while but I just simply had no spare time to diagnose it and simply hitting Fn-Pwr to close it down… not the recommended route to fixing the problem. Every time I shut down the machine I ended up staring at a grey screen that had the Finder menu up with the services in the menu bar closing down one by one but never actually closing down fully.

My first port of call was to check that all was OK with the software so rebooted and held down the Command (⌘)-R keys and opened up Disk Utilities to do a permissions check followed by a Disk check. No problems there.

Not that I thought there was a hardware problem, but a hardware check wont hurt either so another reboot holding down the D key put me into the hardware test mode and unsurprisingly, no problems recorded there either.

I found a couple of recommendations to try booting into Safe Mode… This seemed a little dubious but it does clear some caches and does a system check on the way up, and heck, nothing else has helped so tried in and although it shutdown fine from Safe Mode, the symptom came back after a normal boot up and shutdown request. So, its nothing system related then.

I started looking at what was in startup by opening System Preferences -> Users and Groups and under my ID look at Login Items… Disabling them all still didn’t help at the next reboot… Still that infuriating grey screen And so finally, I end up at the console log, where I probably should have started and it was there that I noticed reference to three repeating logs about com.bluestacks files… I located these in the ~/Library folder but how best to get rid of them? I could delete them, but there may be other files lying about and thats when I came across Killerwolfs post. Follow these steps to remove all traces of the software. bluestacks-uninstall

  1. Open a terminal
  2. go to cd ~/Library/BlueStacks App Player/Uninstall/Clear BlueStacks User Data.app/Contents/MacOS
  3. then run sh uHD-ClearUserData
  4. hit Delete in the confirm popup

The Curious Case of Sharepoint and file uploading

Its been a frazzling sort of morning… We’ve been trying to migrate some of the Schools finance information from a shared folder space tied down with access rights… As its become more complicated to sort out who has access to what, the user rights list has gotten mixed up over time… So I had the bright idea to move it to a Sharepoint area… Me and my big ideas.

We’ve been playing with the Webdav connection and thought that it was going to be a simple process of file copying from one area to another… One of those two minute jobs that took much much longer to resolve than you thought… You know the ones.

The problems began when we compared the files in the original folder to those that were in the new folder… It was out by over 90 files but there had been no error reported back. Tried copying the files and folders again using a sync tool with a report and got a number of “Access Denied” or “<file> to large to copy” messages. It was only when we tried uploading the file manually to Sharepoint that the penny finally dropped

The file name is invalid or the file is empty. A file name cannot contain any of the following characters: \ / : * ? ” < > | # { } % ~ &

OK, so now we have the root cause of the problem, invalid characters in filenames and folders…. But how many of them do we have… Thats when we found that Windows Search is a pain in the arse… trying various incarnations of “&” or “*&*” just yields a result of all files and it was only after finding a random entry in a forum post that we got the answer that must be preserved across time; To find any of the invalid characters listed above, put the following in the search bar:

file:”&”

and you will find all the file with & in the title… Found 11 of those. But when we looked up + we found 90+ items… Passed that one back to the office to fix.

Misdaventures in Computing: Customer Services and the Mobile Phone

After trawling through three shops last week to try and get a replacement phone (unsuccessfully I might add), I wish that my mobile provider had this ideal. As a result its now not my other half's provider and I'll be following as soon as I'm out of contract…

 

After her phone unexpectedly started playing up last week, there was a rush on to get a replacement… It was an odd problem, SMS messages would come through from our own provider but cross network texts wouldn't come through till the following day… Customer Services really weren't very helpful saying there was no problem with the network or the connection to the phone and the best they could suggest was rebooting the phone regularly and they might then come through… This seems to be a popular solution as Googling the problem came back with the same answer. A second call to Customer services results in no more help other than the suggestion its the phone to blame for the problem… Hmm, yes sure because the imp that's inside has decked that it doesn't like O2 or Vodaphone texts… That's likely.

With no more help forthcoming, we thought that we'd better try a new phone. We have been with our current provider for the last five years since we moved to the country and, at that time anyhow, was about the only one we could use. So, after briefly trawling the online shop I had selected the best phone to choose from with a second choice in there just in case…

The first shop i went to said they didn't stock the model I wanted, but I would go to one of their other shops to see if they had one… No offer to phone them to check if they have, it's all down to me to do it myself. The second shop had the model I was looking for on the stands but had sold the last phone of that type earlier in the week… Also, not helpful…

The final shop I trudged to had the phone… Brilliant! But despite offering two mobile provider options at the front of the shop, I couldn't get this one on the network I wanted. Nor were they willing to swap the number…

That was it…. Final straw reached!!!

Trotted off to a new provider who handled all my requests with no problem and the OH is now sporting a new phone… And very happy with it too… With a little bit of TLC and a willingness to say yes first, instead of no, things could have been very different indeed.

 

Misadventures in Computing – Outputting a Mic on a PC directly to some speakers

This is a repost of an article I posted on the School of Computing Science and Digital Media.

Over the summer, we went through an upgrade of one of the IT labs… The carpet was looking a bit shabby after some rain last year and we were going to have more students that we could hold in our foundation year lab. The lab was fitted with connectivity through from the big lab so sound and vision could be played throughout.

We have already had problems with the connectivity; the new projectors and connections were fitted first so they could make as much mess as they wanted during the install. Unfortunately when the carpet fitters came in they pulled down the shelves that held the amplifier and disconnected all the cabling. Since putting it all back together, it’s never been totally right.

So, here we are on day one of a New Semester and the lecturers running the First Year lab come through and tell us that there isn’t any sound from the Microphone going through to the second lab… A call to the company that installed the system gives us a date of Friday for the Engineer so we need a workaround NOW!

My suggestion is to hook up a USB condenser mic we have and play the sound through the PC. OF course, by default your going to need some sort of App to play the sound… But through the glories of the Internet one of the sys admin support team came across this nugget on superuser.com (specifically this post)

1) Right click on the speaker icon in your system tray (bottom right of your screen). Go to recording devices.

2) Locate your microphone in the list. I am assuming it is not disabled as you mentioned examples of it working previously. Right click, go to properties.

3) Switch to the “Listen” tab, check off “Listen to this device”. While Listen is checked, your microphone will be audible through your speakers.

Tested it and it works… now we have a workaround to get us through the rest of the week.While Listen is checked, your microphone will be audible through your speakers, and in a more advanced facet, through stereo mix. So if you wanted to record your Mic and Stereo Mix, this is how you would do it, but at the expense of being able to still hear your mic (it throws most people off, like myself).

Unity and the case of the peculiar Mac OSX File permissions

This is a repost from my (developing but very much a work in progress) work blog at http://sysman.wordpressweb.comp.rgu.ac.uk/

I came across a very odd problem this morning from a lecturer who was trying to make some Unity coursework. Its turns out in the end to be both a Mac OSX File permissions problem AND a Unity problem.

No matter how they were opened we always came back to the same problem… There wasn’t the right permissions to copy files in and out of the Temp folders. Even if you tried to Save the Project you got the same “Moving File Failed” error. After a hack about in the forums it seems that Unity doesn’t like network drives so we copied the files to the local /Users/Shared area. The problem manifested itself in the same way… There are lots of forum entries for this type of problem but no real satisfactory answers…. Time to dig deeper.

I start looking up Mac OSX file permissions and I am happily told that you can do it all from Finder and using Get Info.. Pah! that was no help and didn’t make a difference.

Then I find an entry talking about extended attributes. Ok, so it seems that when you copy a file from a network drive even to a local one, it still retains some of the network permissions for the file in its list of extended attributes…

You can view extended attribute using the xattr command in Terminal. If you know the extended attribute then you can use xattr –d “attributeName” to get rid of it. I didn’t see anything in particular so I used the cp -X command (again in Terminal) to strip out all attributes from the file.

eg cp -Xr OldUnityProject ./NewUnityProject

A follow up xattr reveals no added entries.. Super… So that sorted out the Mac OS side of the problem….Back to Unity!

Opened up Unity and the student project in the New directory. When I selected Build and Run however it still wanted to compile to the student’s original home area WHICH WE DID NOT HAVE PERMISSIONS FOR!!!! So, the first thing to do is to do File->Save Project… This time with the file permissions set properly it saves. Then when doing File->Build and Run as a final check, ensure the area where the built file is to be stored is where you think it is… i.e. local to the project.

And there you have it….

Easy really….

Misadventures in Computing – ERROR 2002: Can’t connect to local MySQL server through socket

Earlier today i came across a problem with one of the Ubuntu servers i manage that runs MYSQL. The system had just recovered from a sudden power failure and when we tried to access MYSQL we got the following error.

ERROR 2002: Can’t connect to local MySQL server through socket ‘/var/run/mysql/mysql

This problem occurs when the file mysqld.sock doesn’t exist where it expect it to be.

The location it is going to look for the mysqld.sock file in the location specified by the debian.cnf file in /etc/mysql. You will need sudo rights to view this file

user@server:/etc/mysql$ sudo more debian.cnf
[sudo] password for user:
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = gibberish here
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password = = gibberish here
socket = /var/run/mysqld/mysqld.sock
basedir = /usr

On this server it tells us to go look in /var/run/mysqld for the file.

This problem is quite easily fixed by simply creating a new mysqld.sock file by following the steps below:

Create the directory (if it doesn’t already exist).

sudo mkdir /var/run/mysqld

Create the file by “touching” it.

sudo touch /var/run/mysqld/mysqld.sock

Set the ownership of the mysqld.sock file and folder to mysql.

sudo chown -R mysql /var/run/mysqld/

Alternatively you can run the mysql_safe & command which will create a mysqld.sock file for you with the correct permissions.

Misadventures in Computing – failed JS21 update to RHEL6

My team and i were set the task of trying to upgrade our IBM JS21 blades to Red Hat 6. To be honest it was always touch and go right from the start if the blades were even capable of going to version 6 but as it turns out, the processor can’t take it. Red Hat had cranked up the minimum spec and if we had JS22’s it would have installed, but it was JS21’s we have. Nonetheless we opted to have a go.

Have you ever used a headless blade before? Ever tried to use Serial over Ethernet before? This was the problem we came up against last year when we first got the blades and trying to find out information on using JS21‘s does not yield many results. Thank goodness for Ryan’s tech notes as his helped us get started. I just wanted to share them here again as another place a struggling SysAdmin might find it. The following is an extract of his article on How to get Non-Graphical Console Access to a BladeCenter Server.

Login to your BladeCenter Advanced Management Module:
http://yourBladeCenter or https://yourBladeCenter

  • Navigate to Serial Over LAN (BladeTasks -> Serial Over LAN)
  • Enable SOL for your specific server
  • Locate the section “Serial Over LAN Status”. It should show a table of your bays and blade servers.
  • Check the server(s) for which you’d like to enable SOL
  • Click Enable Serial Over LAN link
  • Enable Serial Over LAN service by using the drop down box under Serial Over LAN Configuration
  • Click Save

Ensure that either Telnet or SSH is enabled.

To enable SSH (the more secure option)

  • Navigate to MM Control -> Security
  • Enable SSH Server using the drop down box
  • Select Save

To enable Telnet (the less secure option)

  • Navigate to MM Control -> Network Protocols
  • Scroll down to Telnet Protocol
  • Enable Telnet mode using the drop down box
  • Save

You should be good to go. Note: SSH and Telnet can be assigned to non-standard ports in the BladeCenter. This can be checked under MM Control -> Port Assignments.How to Connect to the Console

SSH or Telnet into your BladeCenter

  • Set the environment variable to your blade bay number, then type console. If you don’t know your bay number, log into the BladeCenter GUI, http://yourBladeCenter. An example for connecting to the blade on bay 1:
  • system> env -T system:blade[1]
  • system:blade[1]> console
  • Console login:

To escape back into the BladeCenter CLI, use the escape sequence listed under SOL in the Blade Center GUI. The default sequence is ^[(. That is Ctrl+[ and then Shift+(

So now we had access to the console and the IBM toolkit in the DVD. The original IBM toolkit for Power machines could not cope with the version number we were trying to install. Version 4 only works up to RHEL 5 and all it’s subversions so went looking for an upgrade version 4.2 was available so we downloaded that. Success,we can now toolkit install version 6.

Unfortunately the toolkit won’t run properly on the JS21 blade and doesn’t properly build the RAMdisk needed to bootstrap the files. Each time we tried it, looking for why it was failing took up a significant portion of time as the bladecenter we have is served by a central USB DVD drive which it seems only supports USB1.

So we tried ignoring the toolkit installer and looked to install the IBM goodies later. The installer loaded so far, loaded some files from DVD and then failed saying that it couldn’t find the DVD to install the media from. Then the worst bit happened, the open firmware got corrupted so the DVD couldn’t see the disk it was trying to install on and no matter what coaxing we tried, we just couldn’t see the disk.

We tried reviving the old version of RHEL via the old toolkit installed but still no success. No disk found.

After the failed boot you get thrown into an OpenFirmware prompt. Ever been there? It’s a little bit like engaging your hyperdrive and instead of appearing half way across the galaxy you are in a big fat nothing.

GOOGLE!!! HELP!!!

If you ever end up there and looking for a disks mount point you can navigate around using these commands

Once at an Open Firmware prompt, to display current device aliases use the devalias command. For example:


0 > devalias 
ibm,sp              /vdevice/IBM,sp@4000
disk                /pci@800000020000002/pci@2,4/pci1069,b166@1/scsi@1/sd@5,0
network             /pci@800000020000002/pci@2/ethernet@1
net                 /pci@800000020000002/pci@2/ethernet@1
network1            /pci@800000020000002/pci@2/ethernet@1,1
scsi                /pci@800000020000002/pci@2,4/pci1069,b166@1/scsi@0
nvram               /vdevice/nvram@4002
rtc                 /vdevice/rtc@4001
screen              /vdevice/vty@30000000
 ok

To display the current boot device order, use the printenv command. For example:


0 > printenv boot-device 
-------------- Partition: common -------- Signature: 0x70 ---------------
boot-device              /pci@800000020000002/pci@2,3/ide@1/disk@0 /pci@800000020000002/pci@2,4/pci1069,b166@1/scsi@1/sd@5,0 
 ok

To add the device with alias network as the first boot device, use the setenv command. For example:


0 > setenv boot-device network /pci@800000020000002/pci@2,3/ide@1/disk@0 /pci@800000020000002/pci@2,4/pci1069,b166@1/scsi@1/sd@5,0

Your system is now configured to boot off of the device with alias network as the first boot device. Should booting off this device fail, your system will fallback to the next device listed in the boot-device Open Firmware settings.

Resetting the boot point for the blade didnt make any difference so it was back to the web for another solution. Another Google search reveals the suggestion that resetting the NVRAM may help. Again Ryan’s tech blog helps here…

First we tried to reset the NVRAM through the IBM management bladecenter management tool:

  • BladeCenter AMM > Blade Tasks > Power/Restart. Look on the bottom of the page.
  • Click Restart Blade and clear NVRAM

That didn’t help… OK resort to the severe resort of manually resetting the NVRAM:

  • Power off the server. It should be in the Power/Restart screen of your Blade Center.
  • Remove the battery from the server for five minutes. Slide out the blade, open the server, attach an anti-static wristband (if you worry about these things), and remove the nickel-sized battery. A small flathead screwdriver would be useful.

Finally we have a working system back but a retry of RHEL6 results in repeating the NVRAM reset. Finally, in defeat we resorted to RHEL5.5 on the blade. It went on sweet as anything and installed with no issues. That was server 1.

Server 2 should have been simple, a re-install of RHEL5 is all that was required. Even that didn’t go smooth as time and again the message that it couldn’t find the DVD half way through the install. In the end, in desperation, we swapped the bay over with the one that worked. Can you believe that it actually worked? The same happened with servers 3 and 4… That Bladecenter is in for a kicking… Sorry, reboot at the next available point.

To SSD or not SSD, that is the question

Late last week I had a researcher come rough from the IDEAS research center looking for a placement drive; he had filled up his 250Gb drive… He wAs hoping to get something with a faster throughput but with only SATA connectors on the small factor machines, choices are limited. Quite by chance i’d been reading a cent article on SSD’s which seemed to fit the bill. To my (and everyone else’s) rescue comes an intensive article from TomsHardware on this issue.

As the price of SSD’s drops down to a price us mere mortals can even contemplate them, people are asking the question, should I swap to SSD? The answer, as ever, is, it depends in what you are doing. SSD’s definitely have a better throughput than HDD so if you want your machine to run a bit faster or have I/O intensive tasks then it’s worth considering as an option. If, however, it is for data storage, SSD is not going to give you much advantage.

Undoubtably there is a cost difference between the two types of drives and SSD’s don’t have the same capacity as HDD drives. As price and capacity usually forms a major factor in selecting a new drive, this is usually the start and end of the choice. Although the price is dropping, it is estimated that it is going to take around 5 years before the two technologies prices come anywhere near each other.

Beyond the price you have the question of whether the write endurance limitation on an SSD (the amount of re-writes you can make to a sector on the drive) outweighs the likelihood of the failure on the mechanical drive. From the report on TomsHardware, it looks like we certainly don’t need to worry that much about the write endurance and a quick and swifty calculation led to a figure of 31 years on old 35mm NAND drives. That drops to 18 on newer 25mm NAND drives but they do have a higher threshold of writes too…

Overall it seems that SSD’s are not any more reliable that mechanical drives but overall fail at around the same rate over it’s lifetime. The recommendation is to always have a second copy of your data but that applies for all data in all reality.

The report is about eight pages of good quality researched material and well worth a read if the question of SSD’s is on your mind.

Here’s the link back to the article:

http://www.tomshardware.com/reviews/ssd-reliability-failure-rate,2923.html

Enabling Folio builder in Adobe InDesign 5.5

When one of the lecturers here in the School of Computing at Robert Gordons Universityheard that we were entitled to the upgrade our Adobe software to version 5.5 we were asked to install it for a project student who was developing a magazine layout for the iPad.

The software was installed in our C11 project lab for the student to use where he complained that Folio Builder was not available as an option. As per usual this came in as an email to the Computing Support team who dutifully popped along and checked that it existed in the inDesign extensions.

To view if the option is available, click Windows and Extensions and a drop menu shows you the installed ones.

So, it is there; an email is sent back to the student about it….. Now forward on four weeks… Yeah, I know, that long… We are enow coming closer to project submission times.

Call comes in from the student again that Folio Builder is still not working. Now here we come against a common technical support problem… Yes, we are masters of installation and getting your PC working when it stops. What we are not, are masters of every software package and it’s various nuances… It’s impossible.

Now, although the Folio Builder is there as an option, it’s not quite installed all the components required for publishing. This was never checked for. But thats OK because we are pointed to the download link to get the Folio producer from here (note this is for Windows):

http://www.adobe.com/support/downloads/product.jsp?product=172&platform=Windows

From that page we get two downloads, The actual Folio Producer tool and a seperate download for the Folio Panel itself. Download the latest revisions of both.

Install the Folio Producer Tool first.

  • Unpack the ZIP file and run the Set-up.exe in the extracted folder.
  • An AIR installer will fire up; Accept the license terms and click Accept.
  • Then Click the Install button on the next page.
  • Clicking Done at the final screen end the installer.

Running InDesign at this point and trying to run Filio builder gives you the same message as before… We still need to install the Folio Panel.

A Very similar process is required for installing the Folio Panel except there is no license to accept:

  • Unpack the ZIP file and run the Set-up.exe in the extracted folder.
  • An AIR installer will fire up; Click the Install button on the displayed page.
  • Clicking Done at the final screen end the installer.

Thinking that was us done, we fired up InDesign and went to run Folio builder only to be met with a new message:

You do not have a compatible Digital Publishing Plug-in. Click here to download the Folio Producer tools.

Clicking on the link to us right back where we started…..

Queue Google Search… Initially, nothing..

Ran the Folio Producer again (getting desperate now) and noticed that the installer given points to an Producer tools for CS5.

Another Google search, this time specifically looking for Folio Producer tools for InDesign CS5.5 Windows. And came upon this download link.

http://www.adobe.com/support/downloads/detail.jsp?ftpID=5133

Download the Folio Producer Tool Patch.

  • Unpack the ZIP file and run the AdobePatchInstaller.exe in the extracted folder.
  • An AIR installer will fire up and isntall the patch
  • Clicking Quit at the final screen end the installer.

Running InDesign and loading the Folio Builder Extension now works. All you need now to get going is a Free Adobe ID.

%d bloggers like this: