May 15, 2008 by sj
If an application on OS X has damaged the Journaling data, then when you try to run Disk Warrior, you may get this error:the new directory cannot replace the original directory due to a mac os services failure. You may be able to work around this problem by temporarily turning off Journaling via Disk Utility:
- Open Disk Utility
- Select the Volume of the drive
- Hold down the Option key on the keyboard
- Go to the File menu - select Disable Journaling
Now run Disk Warrior again. Afterwards, you can turn back journaling. I spend many hours trying to get Disk Warrior to rebuild my file-system and after many futile searches, I contacted the Disk Warrior Support, and they suggested this solution. The good news is that in my case it worked.
Posted in OS X | No Comments »
May 6, 2008 by sj
For the past couple of days a process called SyncServer started every 15 minutes or so and it would take over a 100% of the CPU on my MacBook Pro. Not quite sure what initiated this problem, but I found the remedy discussed in this Apple support case to be useful and apparently effective (well at least so far). I did have .Mac and BlackJack synchronization, so not sure if either of these applications caused this problem or not.
Here is the command that you’ll need to run (broken into a set of cd commands to fit the width of this column).
$ cd /System/Library/Frameworks/
$ cd SyncServices.framework/Versions/
$ cd A/Resources/
$ ./resetsync.pl full
Posted in OS X | No Comments »
May 6, 2008 by sj
Flex applications use a binary protocol called AMF. The easiest way to use JMeter with a Flex application is to use Charles (the indispensable 100% pure Java cross platform http debugging proxy). Here are the steps:
- Start Charles and visit the site whose Flex application you wish to load test. In Charles, you will see the entire HTTP traffic.
- Click on the Charles’s Sequence panel to see the ordered list of HTTP requests.
- Right click (on Mac control click) and save the HTTP request corresponding to a Flex AMF call to a file.
- On JMeter create a new HTTP sampler for this request. Set the Send a File with Request to the file that you saved on the step before. Set the MIME Type to application/x-amp (click here to see the JMeter screen)
That is really it. Just save the request using Charles, and then reference it in the JMeter HTTP Sampler. Couldn’t get much easier than this. The solution gets a bit more complicated if you need to read the requests and extract data for use in subsequent requests. To do this, you’ll have to write some code. I’ll add an entry on how to do this soon.
Posted in Flex, JMeter | No Comments »
May 4, 2008 by sj
On the Mac, there is an application called Java Preferences. You can use the Spotlight to find it. Launch the Java Preferences and in the Java Application Runtime Settings panel, drag the version of the JDK that you wish to use to the top. Save and restart any terminal applications that you may have had opened and you should be set.
Posted in Java, OS X | No Comments »
March 28, 2008 by sj
The new revamped Adobe Share (beta) 1.3.5 is out! This version offers PDF creation, updated Flash previews (supports full screen mode) and improved performance. The system is based on the Alfresco for content management. The various rendition generations are based on Adobe LiveCycle, Creative Suite and other core technologies. Share also offers Web Services that developers could use to create desktop or online applications. Here is an application that I created a while back that gives you access to Share on your iPhone. Try share.acrobat.com, it is great way to share your files and presentations (click on the thumbnail to see the Share Flash Preview in action).
If you’ve been using the Share web services, you’ll need to change the URL of the end point from share.adobe.com to share.acrobat.com.
Posted in Adobe Share, Alfresco | 1 Comment »
February 26, 2008 by sj
Depending on whether you’re using DHCP or a static IP, you may need to edit one or both of these two files: /etc/hosts and /etc/sysconfig/network. For static IP I edited both files. Once you’ve made the change, you’ll need to restart Fedora.
Posted in UNIX | No Comments »
February 24, 2008 by sj
You should install a minimal Fedora 8 on a server that you plan to run Xen on. This includes a minimal logical volume for the host; this way you can add additional logical volumes: one for each Xen guest. Before you can do this you’ll need to understand the Fedora Logical Volume Manager (LVM2).
Let’s start with a bit of introduction. On UNIX a file-system is a structure that is defined on a set of storage devices. A storage device must be partitioned before you can create a file-system or a logical volume. Once a file-system has been created, it can be mounted on a directory.
Linux supports different types of file-systems. For example, local file-systems such as ext2, ext3, ext4, FAT, NTFS, HFS, HFS+, JFS and XFS; or network file-systems such as NFS, OpenAFS and GFS.
For Xen, a file that contains an image of a file-system is easiest for a para-virtualized virtual machine. Files that contain an image of a file-system are accessed via Xen blktap or the loop-back mechanism.
A file that contains an image of a hard disk is the easiest for a hardware virtual machine (e.g., if you plan to run an unmodified guest such as Windows). These files are accessed via hard QEMU disk emulation.
Before you can create a logical volume, you need to partition the physical drive. You do this by using the fdisk command. Next you’ll need to create a physical volume for each partition using the pvcreate command. After you’ve created a physical volume, you’ll need to add the physical volume to a volume group. You create a volume group using the command vgcreate. Next you’ll need to create a logical volume on the volume group. Finally, after you’ve created a logical volume, you are ready to create a file-system in it.
But first, here is the summary of the commands:
fdisk /dev/hda
Use the fdisk command to create one or more logical disks called partitions on the first IDE disk (hda).
pvcreate /dev/hda1
Creates a physical volume on each partition
pvdisplay
Displays the status and size of the physical volumes
vgcreate VM /dev/hda1
Add physical volume to a volume group
vgdisplay VM
Displays the status of a volume group
lvcreate -L10G -n UBUNTU VM
Creates a 10GB logical volume called UBUNTU on volume group VM. This command also creates an entry in /dev/mapper that maps the logical volume to the physical volume that it was created from. You can access a logical volume from /dev/VM/UBUNTU
lvdisplay
Displays the status and size of logical volumes
Posted in UNIX, Xen | No Comments »
February 24, 2008 by sj
I’ve found the following two books on Xen to be required reading if you’re a beginner to the world of Xen and Fedora administration. Virtualization with Xen is an excellent book to get started with Xen and how to design your first Xen system. It is packed with information that would take you a long time to gather unless you’re a Linux admin guru.
Xen Virtualization is another good book to get you going. Again very strong on basic Linux administration needed to deal effectively with Xen. For a beginner to Xen, I refer to both of these book constantly as I’m extending my knowledge on Xen and find them both to be indispensable resources.
Posted in Books, Xen | No Comments »
February 24, 2008 by sj
Looks like that in Rails 2, in addition to changing the default database, default sessions store, now some of the oldies such as render_text method no longer work as expected. If you’ve used render_text "some text" in a controller, then you’ll need to replace it with render :text => "some text".
Posted in Programming, Ruby on Rails | 3 Comments »
February 24, 2008 by sj
My hosting company (bluehost.com) updates their system software now and then without any e-mail notifications to their users. Unfortunately, if you host a Ruby on Rails application (in my case sharepdf.com) each time they upgrade Ruby on Rails, there is a good chance that something will break. Recently, they upgraded to the latest version of Rails (2.0.2) and needless to say, my Rails application stopped working. It turns out that the latest version of Rails has changed the default sessions store from a file store to a cookie store. The problem is that if you stored anything other than a simple data in your session, then to get your application to work, you have to spend a few days porting your application. The fact that Rails upgrade is not backwardly compatible is really annoying. But that is a separate issue.
So what is the easiest way to port your file backed sessions application to Rails 2? The answer is to use the database for your sessions. But keep in mind that Rails 2 no longer uses MySQL as its default database. Here is how I ported my sharepdf.com application to Rails 2.0.2:
- Create a brand new rails application using the command
rails -d mysql appname
- Edit environment.rb file and explicity state that you wish to use database for sessions: simply uncomment this line:
config.action_controller.session_store = :active_record_store.
- Use the command
rake db:sessions:create to create the database definition for the sessions.
- Use the command
rake db:migrate to actually create the database tables (I’m assuming that you have updated the database.yml with correct user name and password and have create the database in MySQL). The rake command will then create the sessions database table.
- Copy your controllers, models, views, … from the your current Rails application to this one.
- You should be good to go!
Posted in Programming, Ruby on Rails | No Comments »