Friday, 4 March 2011

Problem saving Office 2011 files to Windows 2008 shares

One of my clients just had a problem with opening Excel files on a network share.  When double clicking on a file they get the following error:
'<filename>' could not be found. Check the spelling of the file name, and verify that the file location is correct. If you are trying to open the file from your list of most recently used files on the File menu, make sure that the file has not been renamed, moved, or deleted.
Problem machine Mac OSX running Office 2011
2 windows file servers, one running Windows 2003, the other 2008

Office files can be opened on the Windows 2003 shares but not on the Windows 2008 ones
All other files can be opened fine on the Windows 2008 server

So, I went to another Mac, running Office 2004 and it all works fine.  I then looked at a third Mac running Office 2011 - this can open office files from both servers fine too.

I finally tracked the problem down to the way the shares had been mounted - as soon as I mounted the Windows 2008 share via AFP rather than SMB it all worked.

Note that the Windows 2003 shares work fine with Office 2011 mapped via SMB and the Windows 2008 shares work fine via SMB when using Office 2004,


So the problem was specifc to Office 2011 connecting to a Windows 2008 share via SMB


Connect to the share via AFP and you are good to go!

Monday, 25 October 2010

Backup Exec 2010 SBS/Sharepoint Database Errors

Been noticing a few problems recently with Backup Exec 2010 complaining about the default SBS 2008 databases.

Specifically the logs say that the transaction logs for these databases are not being backed up and the recovery mode should be set to simple.  However, it is not straight forward to do this, particularly as the SQL Management Studio is not part of SBS

These are the errors as shown in the Backup Exec logs:

Backup- XXXXXXXX\MICROSOFT##SSEEV-79-40960-37914 - Database WSS_Content is configured to maintain transaction logs. Transaction log backups are not being performed. This will result in the log growing to fill all available disk space. Regular log backups should be scheduled or the database should be changed to the simple recovery mode.

Backup- WebApplication\Content-DB 1 (XXXXXXXX\MICROSOFT##SSEE\SharePoint_AdminContent_d4e397f2-a27a-48a0-a628-d25db6672bab)V-79-40960-37914 - Database SharePoint_AdminContent_d4e397f2-a27a-48a0-a628-d25db6672bab is configured to maintain transaction logs. Transaction log backups are not being performed. This will result in the log growing to fill all available disk space. Regular log backups should be scheduled or the database should be changed to the simple recovery mode.

Backup- SBS SharePoint\Content-DB 1 (XXXXXXXX\MICROSOFT##SSEE\ShareWebDb)V-79-40960-37914 - Database ShareWebDb is configured to maintain transaction logs. Transaction log backups are not being performed. This will result in the log growing to fill all available disk space. Regular log backups should be scheduled or the database should be changed to the simple recovery mode.

Backup- ConfigurationV3-DB (XXXXXXXX\MICROSOFT##SSEE\SharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6)V-79-40960-37914 - Database SharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6 is configured to maintain transaction logs. Transaction log backups are not being performed. This will result in the log growing to fill all available disk space. Regular log backups should be scheduled or the database should be changed to the simple recovery mode.

I've put the database names in bold above to make it easier to pick them out, the long alphanumeric strings in two of them will be different on each server so be sure to substitute the correct ones when running the commands below.

To set the recovery mode to simple for these databases, use osql from the command prompt as follows:

C:> osql -E -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
1> ALTER DATABASE WSS_Content SET RECOVERY SIMPLE
2> go
1> ALTER DATABASE ShareWebDb SET RECOVERY SIMPLE
2> go
1> ALTER DATABASE [SharePoint_AdminContent_d4e397f2-a27a-48a0-a628-d25db6672bab] SET RECOVERY SIMPLE
2> go
1> ALTER DATABASE [SharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6] SET RECOVERY SIMPLE
2> go

NOTE: That the last two with the long alphanumeric strings need to be surrounded by square brackets [], or you will get a syntax error complaining about the '-' symbol.  I originally thought I would be clever and just quote these database names, but then I got an error saying that 'recovery' is not a recognized option.  Square brackets fixes this.



Monday, 1 February 2010

On iPads and Google OS

There is an awful lot of noise at the moment about the iPad (which I guess I'm adding to...) but so many people seem to be really missing the point and this reminds me of a similar mis-perception about the Google OS recently.

It seems to me that Google and Apple are the only companies that really understand what personal computing is evolving into, both of them have a clear (but very different) vision of what is coming next and they are both totally blindsiding the rest of the tech industry.

When the Google OS was announced all my (techie) friends were saying "Whats the point of that?" and bemoaning the fact that everything was "in the cloud" and run through a browser - typical objections were
  1. No local applications
  2. Useless without internet access
  3. Why buy one of these instead of a laptop ?
All of these miss the point.  With Google Gears, browser applications can quite happily run locally, but you probably wont want to much - the vast majority of computer use these days is in fact internet use, so if you aren't connected you may as well switch the thing off.
As for the last item - "Why buy one of these instead of a laptop?" - the simple answer is that you don't.  Buy one that is.  Instead, you walk into Carphone Warehouse, sign up for the latest mobile phone on a 24 month contract and they chuck in a Google OS netbook free.
"But I don't trust Google with all my data." - fine, don't then, but most people really couldn't care less, and for them it is a bonus that all their data is in the cloud and backed up without them ever having to think about it.

What has this got to do with the iPad ?

Well the technically savvy are showing a similar lack of clue about this.  The main objections to the iPad seem to be:
  1. It's a big iPod
  2. The Kindle is better because it has e-ink
  3. The Kindle is better because it has weeks of battery life
  4. I can do more with my netbook
  5. Why didn't they put a phone (camera, gps, other....) in it ?
1. It's a big iPod - Yes it is.  And?
"But why would I pay out for one of these when it is just a big iPod?" - because, it is a big iPod.  All the people trotting out this argument seem to be saying that they already have an iPod and even though it only has a small screen they still play games, email, surf the web, read books, watch films etc. on it so why would they want a big iPod ?  Surely, surely, if you are already doing all this on a teeny little iPod screen, it's going to be so much better on an iPad?

2. The Kindle is better because it has e-ink - first off, I'd like to point out that the Kindle is really fugly, but that aside, the e-ink displays I've seen are grey, grainy and slow, and I would much, much, rather read off an LCD.  "But reading off the computer gives me eye strain" - I spend at least 8 hours a day, reading from an LCD and don't have eye strain, but then I wear the reading glasses that I am supposed to, and make sure I have proper lighting around the screen.  Also, e-ink doesn't do glossy magazines.

3. The Kindle is better because it has weeks of battery life - I don't need several weeks of battery life.  The iPad will (according to Apple) play video for 10 hours straight, and if you've just spent ten hours on the damn thing then it is probably time for bed anyway - just plug it in before you go to sleep hugging it.  "But what about when I go on holiday - a Kindle will last for the whole two weeks!" - they don't have plug sockets where you go on holiday ?  Well, maybe they don't, but if you are on a "get away from it all" kind of vacation then you probably want to be laying off the tech a bit anyway.

4.  I can do more with my netbook - Yes, you can do more with your netbook, and for the same kind of price to boot, and this goes to the heart of what I have been talking about.  Before the iPad and Google OS, the IT industry completely misunderstood netbooks too.
The iPad is what netbooks were always supposed to be - and were, originally.  Netbooks are just seen as small laptops now, but this was not the  original market - they were intended to be web and email devices in a handy portable form factor.  It was only when the major manufacturers saw netbooks selling like hot cakes and decided to jump on the bandwagon with devices that were actually small laptops instead.
The laptop, by contrast, has for a long time been intended as a replacement for the standard personal computer, but by shrinking it down further it becomes far less usable as such and also fails to deliver the value for money and simplicity of the netbook ideal.
Now when people complain that the iPad can't do what a netbook can, they perfectly demonstrate their failure to understand either.

5.  Why didn't they put a phone (camera, gps, other....) in it ? - why would you possibly want a phone in it ?  You're not going to hold that up to the side of your face are you ?  Similarly with the camera, though I concede that a front facing one would be useful as a webcam, but you are not going to use it to take holiday (or Facebook) snaps.  As for other complaints about the lack of peripherals, again, you are missing the point.  Plug your peripherals into your PC (or Mac), not into the iPad that's lying on your knees as you are lounging on the sofa.


The point of the Google OS and the iPad (and other products being offered and developed by these companies) is that computing should be delivered to the masses as appliances.  And this is precisely why the technical community, who are the ones commenting and writing all the articles on these things, don't get it.  Technical people look at these things and see all the stuff that they can't do with them, but fail to realise that non-technical people don't want to do this stuff - they just want a device that works without them having to worry about things like viruses and backups.
Google's problem in this is that their vision is aimed at the techie community, which largely don't get or want that vision.  They are appealing to the same market as Apple, but contrasting it with "Hey, we're free and open, don't buy that proprietary, locked down fanbois kit".  Trouble is, the only people that care about free and open are the geeks, and they want full-featured computers, not appliances.
So, my money is (metaphorically anyway) on Apple as they are aiming at the non-technical customer and all the criticisms of their approach that are levelled at them by the techie crowd are actually strengths in their target market.

Take a good look next time you pass an Apple shop - look at how rammo it is with ordinary people oohing and aahing over the lovely shiny gadgets.  You slap an iPad in front of these people and they will lap it up.

Friday, 29 January 2010

Managing Roaming Profile Size

Many of my clients have problems with their roaming profiles getting too large.
As mentioned in a previous post, this is mainly due to badly written software storing files in the roaming, rather than local, part of the user profile.  In addition to slowing down logins, there is a hardcoded limit of 90MB on roaming profiles so it is important to keep this nice and trim.
To combat this, I have written a script which can be run periodically (weekly say, overnight when the users are logged out) to clear out all the cruft that, left alone, will cause the profile to break.
Currently this script removes the following files:
  • Adobe update files
  • Real update files
  • Java cache files
  • Apple iPod & iPhone firmware updates
Hopefully this may prove useful to others, just make sure to set the PROFILE_ROOT variable to point to the location of the roaming profiles on the server.
If you want to see what it will do before, then run with the -test switch which will just output what it intends to remove, but wont actually delete anything
@echo off
REM cleanup_profiles.cmd
REM v 1.0
REM This file removes any unnecessary files from roaming profiles
REM files removed:
REM     Adobe update files
REM     Real update files
REM     java cache files
REM     ipod & iphone firmware updates
REM by Jon Reeves
REM run with -test switch to just show what would be done, but not
REM actually delete any files
REM cleanup_profiles -test
REM ***** MAKE SURE to set the PROFILE_ROOT variable *****
SET PROFILE_ROOT=E:\Shared\Profiles
REM ******************************************************
set TESTRUN=FALSE
if "%1" == "-test" set TESTRUN=TRUE
SET DELETION_FILE=%TEMP%\profcleanupdeletion.txt
REM list folders to be deleted
for /F "delims=" %%u in ('dir %PROFILE_ROOT% /B /A:D') DO dir /s /b /a:d "%PROFILE_ROOT%\%%u\Application Data\Adobe" | findstr Updater >> %DELETION_FILE%
for /F "delims=" %%u in ('dir %PROFILE_ROOT% /B /A:D') DO dir /s /b /a:d "%PROFILE_ROOT%\%%u\Application Data\Real" | findstr Update >> %DELETION_FILE%
for /F "delims=" %%u in ('dir %PROFILE_ROOT% /B /A:D') DO echo "%PROFILE_ROOT%\%%u\Application Data\Sun\Java\Deployment\cache" >> %DELETION_FILE%
for /F "delims=" %%u in ('dir %PROFILE_ROOT% /B /A:D') DO dir /b /s "%PROFILE_ROOT%\%%u\Application Data\Apple Computer\iTunes\iPhone Software Updates" | findstr .ipsw >> %DELETION_FILE%
for /F "delims=" %%u in ('dir %PROFILE_ROOT% /B /A:D') DO dir /b /s "%PROFILE_ROOT%\%%u\Application Data\Apple Computer\iTunes\iPod Software Updates" | findstr .ipsw >> %DELETION_FILE%
REM do the actual deletion
if %TESTRUN% EQU TRUE goto TESTRUN
REM delete directories
for /F "delims=" %%d in (%DELETION_FILE%) DO rmdir /S /Q %%d
REM delete files
for /F "delims=" %%f in (%DELETION_FILE%) DO del /F /Q %%f
goto CLEANUP
:TESTRUN
echo Test run completed, no files have been deleted
notepad %DELETION_FILE%
:CLEANUP
REM clean up temp files
del %DELETION_FILE%
set TESTRUN=

Saturday, 23 January 2010

How to get SIP working through Cisco 837 router

At last!
Finally I have got a SIP softphone working through my firewall.
I spent hours and hours trying different inspection rules and nat traversal stuff and eventually gave up, but after waking up obscenely early this morning I decided to give it a quick googling.
Five minutes later it was working - seems all I had to do was disable the SIP ALG on my Cisco 837 router:
no ip nat service sip udp port 5060
And it works !
Of course now I find that sound doesnt work in Ekiga (grumble, grumble), but Twinkle works perfectly.

Thursday, 3 September 2009

Java Cache Profile Size Problems

EDIT:  see my later post on this subject for more tips on managing roaming profile sizes

Been having this for a while, off and on with various clients, particularly on Citrix/Terminal servers, user calls up unable to log off because their profile exceeds the size limit.

9 times out of 10, this is due to the Java cache with the other 10% being Adobe update files. These programs incorrectly store temporary data in the roaming part of the user profile rather than the local part where it should be. The Adobe issue is rarer and easily dealt with by deleting the update file, but the Java cache keeps coming back.

The solution is to move the Java temporary files cache which can be easily done from the Java Control Panel applet. Unfortunately on a typical locked down terminal server, users do not have access to the Control Panel to change this and it is a per user setting, so changing it as the administrator doesn't help.

After much intensive Googling I finally found how to change this in the background, without having to give the user admin rights and log on as them (which is even more of a pain the more users you have). All that needs to be done is to add a line to the Java deployment.properties file to set the deployment.user.cache property.

This file is located in the user profile, so normally,
C:\Documents and Settings\_username_\Application Data\Sun\Java\Deployment\deployment.properties

By default (with the deployment.user.cache property not present), Java cache files are stored in
C:\Documents and Settings\_username_\Application Data\Sun\Java\Deployment\cache

And this is the problem, that should be \Local Settings\Application Data..... in order for those temp files to be kept locally to the machine and not copied around as part of the roaming profile.



Now setting this to a different location is easy, just add to the deployment.properties file, say

deployment.user.cache=C\:\\Temp

*note the escaped characters !

However, the user in question needs write access to this location (which they shouldn't have if the server is even marginally locked down), so the best bet is to just dump it into the Local Settings part of the profile. Trouble is, the deployment.properties file does not support system environment variables so you need to hard code the full path, which is a problem if you are trying to script this setting for all users.

Luckily the file does recognise some Java environment variables one of which can be inelegantly kludged to point into the correct location:

deployment.user.cache=$USER_HOME\\..\\..\\..\\Local Settings\\Application Data\\Sun\\Java\\Deployment\\cache

* NOTE - this is all one line.


This can easily be added to logon scripts, e.g.

echo
deployment.user.cache=$USER_HOME\\..\\..\\..\\Local Settings\\Application Data\\Sun\\Java\\Deployment\\cache >> %APPDATA%\Sun\Java\Deployment\deployment.properties

* NOTE - this is all one line too.


The Java client seems to read and rewrite this file on a pretty frequent basis so it will clean up any additional lines that are put in.

An even better method is to use a machine wide deployment.properties file.


You will need to create the following two files:

C:\Windows\Sun\Java\Deployment\Deployment.config

deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties

* NOTE - this is all one line

C:\Windows\Sun\Java\Deployment\Deployment.properties

deployment.user.cachedir=$USER_HOME\\..\\..\\..\\..\\Local Settings\\Application Data\\Sun\\Java\\Deployment\\cache

deployment.user.cachedir.locked=

* NOTE - this is two lines.

The last line locks the setting so that users cannot change it, so you may or may not want this.


Lastly, if you are running on a Windows 2008 Server you don't need to worry about any of this.  On 2008 the default location is in the LocalLow part of the profile which doesn't roam - at last!

Friday, 8 February 2008

Un-Scheduled Tasks

Just had a weird problem with one of my servers running scheduled tasks twice.

Sometimes, the backup job would run twice, and sometimes the job that emails me the backup report would run twice. When ever a job was duplicated, the logs showed that it ran several minutes early.

Most of the time though, they both only run once, as they should.

I had no idea what might be causing this.

I checked the scheduled task logs, even ran the AT command in case something had been put in there, but nothing.

It was only once I got round to looking in the obvious place of the event logs that I saw loads of w32time errors....

What was happening was that the server was failing to synchronise with the domain controller for long periods and the clock would drift until it managed to reconnect. If this happened while the backup ran then the clock would get shifted backwards and the scheduled task would run again.

Why the server is having trouble connecting to the NTP server, and why the clock is drifting so much and why it seems to resynchronise during the backups, are entirely different questions of course.

I suspect it is because this server is a virtual machine running on a heavily loaded physical server, but further work is happening to rectify this so we'll see then if the time problem goes away too.