Monday, September 30, 2013

Quick Note on How to enable ExFAT partition support in Ubuntu.

I recently had to reformat my USB 3 drive to ExFAT for accessing it properly on Mac for Backup. Everything was fine as long as I used it on Mac and Windows.  Once I have lost access to Mac and shifted to my favorite Ubuntu machine I was surprised by having similar issue that I had on Mac but with ExFAT this time. After searching a bit I found that ExFAT partition type isn't supported out-of-box. To enable this one need to add the support separately.

Here is what is needed to enable ExFAT support.

$sudo -s
$apt-add-repository ppa:relan/exfat
$apt-get update
$apt-get install fuse-exfat

This will install the ExFat support and the drive got mounted automatically.

In case you want to mount the drive manually you can do something like:

mount -t exfat /dev/sdb1 /media/exfatdir



Thursday, July 18, 2013

Brought back power dead mac with following tip from Apple support.

I got a sudden power dead laptop overnight when left in sleep mode as usual. I couldn't get it start by any means and power connector was fine, battery was full etc.
I was pretty sure it was some hardware failure and was about to search Apple Service Centre however, while looking for address online found a toll free Apple support number and thought of giving a call to them.
To my surprise the call was picked up quickly and upon providing serial number and doing some rudimentary checks person on phone quickly asked me try 2 things first didn't work but second work like charm and it came back to life.  a 4-5 min call saved me a 2 hour trip to Apple Service centre and above all all this time I didn't have to hear the recorded sentences with unnecessary "Thank you", "Sorry", "Bare with me" and most importantly I wasn't made to feel like a dumb terminal on the other end.

Anyhow, apart from Rants here is the main purpose of the post to note down the tips.

Tip 1 :
Press   cmd+option+P+R and while pressed use Power  button to switch on Mac which in my case didn't work.

Tip 2 :
Press Right ctrl+options+space and then power button at same time, This worked in my case and my Mac came back on and started properly.

Upon asking what was the issue, I was told it was due to being a full memory and a software bug in OS that may cause it sometimes to appear power dead.  I didn't bother exploring technical details at that stage since I had other things to worry about.

I hope this helps me in future and some one else on the net to try it out first in such case.

Tuesday, March 26, 2013

Switching ubuntu boot from graphics to text mode.

This one has always puzzled me and make me go round and round few times now on all my new VM's, so I decided to note down what I did this time.

To Change the Graphic boot to Text mode on startup all you need to do is modify your /etc/init/.cfg file.

In my case I was trying to do this with gdm.cfg based on many google results however, I missed a crucial point that I had selected another Display Manager lightdm. After trying few things I finally realized the mistake. So here is the snippet from /etc/init/lightdm.cfg (This should be same for gdm as well in gdm.cfg):
start on ((filesystem
           and runlevel [!026]
           and started dbus
           and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
                or stopped udev-fallback-graphics))
          or runlevel PREVLEVEL=S)

stop on runlevel [016]
You can change the runlevel in
stop on runlevel [016]
but I didn't find it necessary, just changing it in start on section did the job.

Monday, April 16, 2012

Quick Note on How to remove/change /cxf from context path of CXF OSGi service.

By Default, when a CXF servlet endpoint is deployed in Servicemix OSGi container the context path for the endpoint address contains "/cxf".
This causes resulting endpoint URL being something like http://localhost:9090/cxf/myservice . This is not always a desirable URL and many times needed to change to more generic (technology neutral) URL for publishing the endpoint.

This default context can be changed in one of the two ways as follows:

1. It can be changed by adding org.apache.cxf.servlet.context=/myservice to etc/org.apache.cxf.osgi.cfg.

2. By running following commands to alter configuration in container using configuration management service in Servicemix container.
       config:edit org.apache.cxf.osgi
       config:propset org.apache.cxf.servlet.context /myservice
       config:update

Monday, November 14, 2011

ActiveMQ prefetch and Spring DMLC advice from Torsten


A piece of advice on ActiveMQ prefetch and Spring DMLC from my colleague Torsten.


I just remembered a lesson learned about prefetch and Spring DMLC:
If you configure DMLC to use CACHE_SESSION or below (i.e. CACHE_CONNECTION or CACHE_NONE) *and* when you don't use a CachingConnectionFactory (e.g SingleConnectionFactory), then you should set the prefetch for the Spring consumer to only 1 or 0.
That is because when not caching the consumer, a new JMS consumer is recreated for every msg that Spring will ask the broker for.
And if there are many msgs on the queue, the broker will prefetch e.g. 1000 msgs to the consumer although the consumer will only process one msg.
Spring DMLC then recycles the JMS consumer with 999 unprocessed msgs. This obviously causes to much and unnecessary load on the network.

So possible solutions in this case:
1) prefetch=0 or 1,
2) configure DMLC to use CACHE_CONSUMER, or
3) use Springs CachingConnectionFactory

Tuesday, November 8, 2011

Short Note on How to install Servicemix 4 as windows service.

To install Servicemix 4 as windows service need to start SMX from console and run features:install wrapper and wrapper:install and follow the instructions that are displayed by second karaf command.

Here is the output from a sample run :


karaf@root> features:install wrapper
karaf@root> wrapper:install
Creating file: C:\work\apache-servicemix-4.4.1-fuse-01-06\bin\karaf-wrapper.exe
Creating file: C:\work\apache-servicemix-4.4.1-fuse-01-06\etc\karaf-wrapper.conf

Creating file: C:\work\apache-servicemix-4.4.1-fuse-01-06\bin\karaf-service.bat
Creating file: C:\work\apache-servicemix-4.4.1-fuse-01-06\lib\wrapper.dll
Creating file: C:\work\apache-servicemix-4.4.1-fuse-01-06\lib\karaf-wrapper.jar
Creating file: C:\work\apache-servicemix-4.4.1-fuse-01-06\lib\karaf-wrapper-main
.jar

Setup complete. You may want to tweak the JVM properties in the wrapper configu
ration file:
C:\work\apache-servicemix-4.4.1-fuse-01-06\etc\karaf-wrapper.conf
before installing and starting the service.


To install the service, run:
C:> C:\work\apache-servicemix-4.4.1-fuse-01-06\bin\karaf-service.bat install

Once installed, to start the service run:
C:> net start "karaf"

Once running, to stop the service run:
C:> net stop "karaf"

Once stopped, to remove the installed the service run:
C:> C:\work\apache-servicemix-4.4.1-fuse-01-06\bin\karaf-service.bat remove


Hope this helps and serves as note to myself for future.