First why are you posting this in a JMS development forum? Do you have any idea as to which forums to use for which questions?
Second before posting this have you bothered to check if the port is already in use?
Which operating system are you using?
Thanks alot for ur reply.
I am using windows operating system in both the machines.
I have changed the port nomber in jboss-service.xml
Now the problem is solved.
This is a typical windows problem, as windows uses those port for its network drives as well. So depending on the startup order of things and the number of network drives and other services, the port might be used by windows. Usually only a reboot (or several) will help.
As an alternative, you could als specify a different port for the naming service.