Thursday, September 22, 2011

Planning for failure

Process in IT companies looks a very ambiguous word. What looks fine in one company may not be acceptable in another company.  I come across this site http://www.planningforfailure.com which  compared the agile/Scrum with Kanban/Lean startup. It is an interesting read. Also the links mentioned in the blog are good. 

I also like the definition of a hacker.
"Someone who thinks outside the box. Someone who discards conventional wisdom and does something else instead. Someone who looks at the edge and wonders what's beyond. Someone who sees a set of rules and wonders what happens if you don't follow them. - Bruce Schneie" 

from http://www.thehackerchickblog.com/ 



Saturday, February 05, 2011

Debug maven application with jetty plugin

Have the jetty plugin configured.
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.12</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8888</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
</configuration>
</plugin>

After that It’s time to configure eclipse for debugging the web app by selecting the Run > Debug … from the menu
# Set Main Class to "org.codehaus.classworlds.Launcher"

Go to the argument tab:
# Set Program arguments to "jetty:run"
# Set VM arguments to "-Xmx512M -Dclassworlds.conf=[MAVEN_HOME]/bin/m2.conf -Dmaven.home=[MAVEN_HOME]"
(Replace MAVEN_HOME with the location of maven on your system)

Go to the classpath tab:
# remove the application from the user entries
# add the "[MAVEN_HOME]/lib/classworlds.jar" to the user entries. in case if the classworlds.jar have version number in the name, please include. Essentially we need to add the correct jar to the classpath

Go to the source tab:
# add the current project to debug

Now you can start debugging your application like you do it always

It is very interesting to set the –o option to the maven command in order to accelerate the fix/debug process.

Monday, August 02, 2010

how to change oracle xe default http port number?

login to sqlpus with system account.
sqlplus system@xe

see the present value

select dbms_xdb.gethttpport as "HTTP-Port", bms_xdb.getftpport as "FTP-Port" from dual;

--it shows actual value. now u want to change them, use the following?

begin

dbms_xdb.sethttpport('9999');
dbms_xdb.setftpport('2100');
end;
/

Saturday, January 16, 2010

vmserver 2.0.2 ubuntu 9.10

vmserver 2.0.2 licenses:
VMware Server for Windows A05FN-F2R0Z-V9380-4T085
VMware Server for Linux AA4D0-F8D2G-U7JGM-4100H


I had problem in installing vmserver in ubuntu 9.10. This link helped me to fix the problem. While trying the patch, it was showing error for a specific patch file that i have downloaded manually and placed along with the attahcment given in the post.

it worked, have to see bringing up my vm images.

Friday, August 28, 2009

Ubuntu - hdmi, video, webcam

I had problem with hdmi audio from ubuntu. Video is going fine to LCD tv through HDMI cable, but no audio.

Not sure if that is a problem with operating system or the multimedia softwares, but I found mplayer supporting audio as well.

Following line has fixed hdmi audio for me.
mplayer -afm hwac3,hwdts, -ao alsa:device=hdmi -channels 2 file

Skype, web cam:
Web cam was not detected by skype on ubuntu (9.04). After searching on internet, installed gspcs-source, followed by a system restart.

sudo apt-get install gspca-source

Skype recognized my webcam and when ever I am on voice call with my skype contacts, I am able to share video through webcam.

Kopete, yahoo IM problem:
Kopete was not able to connect to Yahoo server. fix I found on internet is add subdomain "cn" in the server name (account preferences). this "cn.scs.msg.yahoo.com" one worked for me. the default port of 5050 is same.


kopete is not able to detect webcam. It needs jasper conversion utility installed. I tried to to install libjasper-progs, but it seems replaced by another one in the ubuntu repository.
Here is the line that worked for me.

sudo apt-get install libjasper-runtime

Tuesday, August 04, 2009

Low volumne in ubuntu

If you are struck up with low volumn in Ubuntu (even in 9.04)
do the following:

sudo apt-get install gnome-alsamixer


after installing gnome-alsamixer run it, it pops up a UI. Increase the PCM value towards maximum.

try the sound now, you got it full right?

Wednesday, July 29, 2009

Linux /Ubuntu tomcat -> too many open files

Issue:
How do I set the maximum number of files allowed to be open on a system
scenario: I am running 3 war files of magnolia CMS on local tomcat, third one is not getting deployed properly because of the "too many files" opened.

Resolution:
The current setting for maximum number of open files can be viewed with the command:

ulimit -n

This number indicates the maximum number of files normal users (i.e. non-root) can have open in a single session. Note that for the root user, ulimit -n will sometimes output 1024 even after following the procedure to increase the maximum number of open files. This won't effect root's ability to open large numbers of files, as only normal users are bound by this value.

To increase the maximum number of open files beyond the default of 1024, two changes to the system may be necessary. In these examples, we will increase the maximum number of open files to the arbitrary value of 2048. All changes need to be made by the root user and users will need to log out and log back in before the changes will take effect.

1. Configure the system to accept the desired value for maximum number of open files Check the value in /proc/sys/fs/file-max to see if it is larger than the value needed for the maximum number of open files:

# cat /proc/sys/fs/file-max

If the value isn't large enough, echo an appropriate number into the variable and add the change to /etc/sysctl.conf to make it persistent across reboots. If the number is already larger than the value you wish to use, skip to step 2.

# echo 2048 > /proc/sys/fs/file-max

and edit /etc/sysctl.conf to include the line:

fs.file-max = 2048

2. Set the value for maximum number of open files In the file /etc/security/limits.conf, below the commented line that reads

#

add this line:

* - nofile 2048

This line sets the default number of open file descriptors for every user on the system to 2048. Note that the "nofile" item has two possible limit values under the header: hard and soft. Both types of limits must be set before the change in the maximum number of open files will take effect. By using the "-" character, both hard and soft limits are set simultaneously.

The hard limit represents the maximum value a soft limit may have and the soft limit represents the limit being actively enforced on the system at that time. Hard limits can be lowered by normal users, but not raised and soft limits cannot be set higher than hard limits. Only root may raise hard limits.

When increasing file limit descriptors, you may want to simply double the value. For example, if you need to increase the default value of 1024, increase the value to 2048 first. If you need to increase it again, try 4096, etc.