Showing posts with label howto. Show all posts
Showing posts with label howto. Show all posts

Monday, January 5, 2009

Netbeans will not start on OS X

Back from a two week break, finished with at least the first pass of mail and attempting to get back to inbox zero I find that I cannot start NetBeans 6.1 or 6.5. It appears that the problem is an OS X update forcing the use of 64-bit data model when the 32-bit is required.

In various locations I found instructions to change to the 32-bit data model with -d32. After adding this change to netbeans.conf (alternatively -d32 or -J-d32) the problem was not resolved.

An ugly hack to work around this issue (inspiration from Sam Cogan):

lipo /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java \
   -remove x86_64 -output /tmp/java
sudo mv /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java \
   /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java-x86_64
sudo mv /tmp/java /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java-32
sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java-32 \
   /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java

This appears to have fixed the immediate symptom, there is no telling what I have broken in some other insidious ways. I also expect this problem to return with the next update to java which replaces the java binary.

Ways to identify this problem:

From the terminal.app: open /Applications/NetBeans/NetBeans\ 6.5.app
LSOpenFromURLSpec() failed with error -10810 for the file /Applications/NetBeans/NetBeans 6.5.app
From CrashReporter files for java: 
Process:         java [5579]
Path:            /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java
Identifier:      java
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  bash [5421]
<...>
Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d, 0x0000000000000000
Crashed Thread:  0
<...>
Thread 0 crashed with X86 Thread State (64-bit):
In: /var/log/system.log
1/5/09 3:05:41 PM [0x0-0x133133].org.netbeans.ide[5610] /Applications/NetBeans/NetBeans 6.5.app/Contents/MacOS/../Resources/NetBeans/bin/../platform9/lib/nbexec: line 493:  5768 Segmentation fault      "/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java" ...

Thursday, January 24, 2008

Firefox extension compatability override

The next time you disable the compatibility override and want it back...because you really want the XYZ plugin and you value it over stability or possibly usability.

about:config -> add boolean "extensions.checkCompatibility" false and restart

(This is really a note to myself)

Thursday, December 13, 2007

Chicken Primavera w/garlic bread in 10min or less

Taking my cue from ThinGuy, only no one has been asking me for my recipes :)

This meal was prepared in the office kitchen, using only minimal tools and supplies.

Required Ingredients:
Garlic Salt (Garlic Powder recommended) I Can't Believe It's Not Butter, Feb '07 Vintage

Italian Spice Blend Martin's potato bread, Hot Dog Rolls
Lean Cuisine Chicken Primavera
Red (cayenne) pepper

Preparation:
  1. Set toaster oven to Bake at ~450
    1. Place baking rack on the top rail
  2. Prepare Garlic Toast
    1. Remove a roll from the bag, split and place on clean surface
    2. Lightly coat top of roll with ICBINB
    3. Apply Garlic Salt to taste
    4. Apply Italian Spice Blend to Taste
    5. Place prepared toast in toaster oven
  3. Chicken Primavera
    1. Remove from box
    2. Place in microwave
    3. heat until hot (we used 8:30 for two)
  4. Brown/Toast the Toast
    1. At ~2:00 remaining on the microwave
    2. Switch the toaster oven to broil
    3. Observe closely to prevent burning

  5. Enjoy!


I add ground red (cayenne) pepper to my Chicken


Notes:
The found "I Can't Believe It's Not Butter" expired Feb 13 '07. If you can't find this vintage feel free to use whatever edible grease you can find. Butter or butter flavor recommended.

The random spices smell like an Italian blend. They have been allowed to mellow and blend on the office kitchen table for at least a month.

All times are approximate, a pre-heated toaster oven would clearly require less time.

Tuesday, November 27, 2007

How to get experimental rw ZFS support AFTER upgrading to 10.5.1

The alternate title of this entry is "Force install of ZFS Beta Seed v1.1 on Leopard"

 

This is performed at your own risk. The steps described remove any logical restriction for installation of the package.

 

There is more than one way to implement this particular hack. This method uses the package installer (a cleaner more friendly hack than manually copying files). Other recommendations included installing 10.5 on a different partition and subsequently installing the patch and copying the package files.

A simple alternative left to the reader would be extract the files from the package Payload an manually copy the files into place (cat /tmp/ZFSseed1/ZFSBetaSeed1.pkg/Payload | pax -z -r -v).

 

On to the actual Implementation:

Download the dmg from developer.apple.com

 

Mount the DMG:

open ~/Desktop/Inbox/leopard_9a559_zfsbetaseed1_0613523123.dmg

Expand the package:

pkgutil --expand /Volumes/ZFS\ 1/ZFSBetaSeed1.pkg /tmp/ZFSseed1

Edit the Distribution file and comment out the line that actually checks the requirements (and "causes" the failure):

vi /tmp/ZFSseed1/Distribution
//



Flatten the edited expanded package directory back into package format:

pkgutil --flatten /tmp/ZFSseed1 /tmp/ZFSrw.pkg

Open the package installer:

open /tmp/ZFSrw.pkg

Install the package and reboot.

Again this is performed at your own risk. The steps described remove any logical restriction for installation of the package and may cause you system to explode or you cat to catch fire.


References:

ZFS Beta Seed v1.1 will not install on Leopard (10.5.1)

Edit: I guess I should mention that it does actually appear to work :) Next I'm going to try and switch access between Leopard and Solaris under Parallels

Edit1:  Changed comment marks from // to ; // works if you are commenting in the embedded script part not the XML part. Thanks to Colin Seymor for catching that.

Monday, November 26, 2007

SGE quick and dirty how to find jobs on 'bad' slots

I occasionally have a need to find queues in Sun Grid Engine that are in one of the possibly problematic states which have an occupied slot. It is just infrequent enough that I don't remember exactly how I did it the last time.

qstat -f | awk '$6~/[cdsuE]/ && $3!~/^[0]/'
queuename qtype used/tot. load_avg arch states
zone.q@r130c24z0.network.com BIP 1/1 -NA- sol-amd64 adu
zone.q@r130c24z1.network.com BIP 1/1 -NA- sol-amd64 adu

An alternate is "qstat -f | awk '$6~/[cdsuE]/ && $3~/^[1-9]/'" which also avoids printing the header line. In the example above 'state' in $6 matches 's' and 'used' does not begin with '0'.

The possibly more elegant 'qstat -f -qs cdsuE' still requires a second comparison in awk of '$0!~/--/' to filter out the queue separator lines. (qstat -f -qs acduE | awk '$0!~/--/ && $3!~/^[0]/')


Finally because I can never remember what exactly all the queue states are and the qstat man page doesn't have the nice table:


aoACD #8211 Number of queue instances that are in at least one of the following states:
a #8211 Load threshold alarm
o #8211 Orphaned
A #8211 Suspend threshold alarm
C #8211 Suspended by calendar
D #8211 Disabled by calendar

 

cdsuE #8211 Number of queue instances that are in at least one of the following states:
c #8211 Configuration ambiguous
d #8211 Disabled
s #8211 Suspended
u #8211 Unknown
E #8211 Error

 

Job State/Status:

d(eletion),  E(rror), h(old), r(unning), R(estarted), s(uspended), S(uspended), t(ransfering), T(hreshold) or w(aiting).

References: SGE (N1GE 6.0) -- Monitoring and Controlling Queues

Edit: Added Job Status, literally couldn't find that in any of the online docs (notwithstanding ~40% through the qstat(1) man page, targeted google searches do a poor job finding the link)

Wednesday, November 21, 2007

OS X Leopard, Tiger X11 and SGD (How I downgraded to Tiger's X11 and got SGD working again)

We use SGD to provide access to few applications. After installing Leopard I could focus and click with a mouse but all keyboard input was ignored for SGD applications.

Searching online I found some indications that X11 in Leopard has some application interaction issues. The solution presented in a number of different forums for various applications was to downgrade to Tigers X11.app. I tried methods from a couple of posts and didn't have success. Instead I mixed and matched the steps from a couple of suggestions and found a solution that worked for me.



I have not tried to recover from this change, You can PROBABLY re-install X from the leopard DVD.

When this is complete you will probably have two X icons in the Dock when X11.app is running.

The steps can be summarized as:

  1. Download X11 Update 2006 1.1.3: "http://www.apple.com/support/downloads/x11update2006113.html"
  2. Destroy your current X11 installation
  3. Install X11 update 2006
  4. Change the path to your window manager in xinitrc
  5. reboot

wget 'http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=12045&cat=60&platform=osx&method=sa/X11Update2006.dmg'
open X11Update2006.dmg
sudo launchctl unload -w /System/Library/LaunchAgents/org.x.X11.plist
sudo rm -R /usr/X11R6
sudo ditto -Vx --noqtn /Volumes/X11\ Update\ 2006/X11Update2006.pkg/Contents/Archive.pax.gz /
sudo perl -i -p -e 's:exec quartz-wm:exec /usr/X11R6/bin/quartz-wm:g'

The instructions I found online indicate that a log out/log in should do it. I found that it didn't seem to start working until after I rebooted.

The instructions I based the above steps on:
Bring Back Tiger's X11 to Leopard in 3 Steps
easier instructions to install Tiger's X11.app