wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes Listening Ports Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Listening Ports" Watch "Listening Ports" New topic
Author

Listening Ports

Barani Kannan subramanian
Greenhorn

Joined: May 06, 2008
Posts: 14
Hi,

I was using Weblogic and in Weblogic we use 2 ports as listening ports, 1 for http and other for https but in case of JBoss I am not able to find the ports and their usage. Could you anyone please throw some light on it.

Thanks in advance.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

In JBoss, the default http port is 8080 and https port is 8443. If you want to change them to something of your choice then follow this wiki


[My Blog] [JavaRanch Journal]
Barani Kannan subramanian
Greenhorn

Joined: May 06, 2008
Posts: 14
Hi,

I am working in Weblogic and new to JBoss. I am not from Dev background and working as weblogic admin.The below is the description of our requirement.

JBoss version : jboss-4.2.3.GA
Installed folder : /tools/jboss/jboss-4.2.3.GA/

We have multiple environments and we will be running same application in same box for multiple instances. Similarly different application also may run in same box. So I worked out in the below steps.

I Copied the /tools/jboss/jboss-4.2.3.GA/server/all folder to the name fin , intel. These are the application names which we are
using in our weblogic environment. Since the JBoss phase has not yet started I am using the same name used in weblogic.

So while starting the application I use ./run.sh -c fin. Without any changes the server comes up and it listens in 8080 and everthing goes fine. I am not able to change the port manually. With the same port i cannot start any other applications since all are same copy. I can change the 8080 port whereever I find but it may lead me to more confusion for other ports.

Now I dont have any application but we have to ensure the environment ready for the development phase.

The below are my requirements.

1. Multiple JBoss server instances has to run in same box.
2. Since different application uses different ports and the memory arguments may also be different, we need same script which should start the servers with different memory/env parameters.So run.sh script cannot be used.
3. Since we are planning to create script to automate the instance creation, it will be good if we get the clear information about the changes to be carried out in the property files.


I don't want use the Service Binding Manager as mentioned in the link http://www.jboss.org/community/docs/DOC-12213

I tried changing manually as mentioned in this link http://www.thedance.net/~roth/TECHBLOG/jbossports.html .

I tried adding 6 before all the ports like 68080, after this server is not coming up and gives error

10:22:12,408 WARN [JBossWeb] Failed to startConnectors
LifecycleException: service.getName(): "jboss.web"; Protocol handler start failed: java.lang.IllegalArgumentException: Port value out of range: 68080

I cannot always add a number 6 or 5 without understanding, So please give a detail port information which are used by JBoss so we will plan accordingly and maintain the details of the ports used by each server.

Thanks in advance

Barani
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163


I don't want use the Service Binding Manager as mentioned in the link http://www.jboss.org/community/docs/DOC-12213


Why not? Any specific reason? That's the best way to manage ports on JBoss.

I cannot always add a number 6 or 5 without understanding,

Using the ServiceBindingManager will avoid these manual steps.

So please give a detail port information which are used by JBoss so we will plan accordingly and maintain the details of the ports used by each server.


See if this helps.
[ December 16, 2008: Message edited by: Jaikiran Pai ]
Barani Kannan subramanian
Greenhorn

Joined: May 06, 2008
Posts: 14
Hi,

I want to isolate the application without relating with each other. After instalation the application deployment startup / shutdown and most of the activities will be carried out by different teams depending on the application. Even the logins will be different for them so i dont want to mix one application with other in any means.
Barani Kannan subramanian
Greenhorn

Joined: May 06, 2008
Posts: 14
thanks for immediete response. Kindly help in this.

Regards
S.Barani kannan
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

Originally posted by Barani Kannan subramanian:
Hi,

I want to isolate the application without relating with each other. After instalation the application deployment startup / shutdown and most of the activities will be carried out by different teams depending on the application. Even the logins will be different for them so i dont want to mix one application with other in any means.


I don't think i understood this question. Is this related to what we have been discussing in this thread earlier? Or is this is a different question altogether? Could you please provide more details about what you are looking for?
Barani Kannan subramanian
Greenhorn

Joined: May 06, 2008
Posts: 14
Hi,

I tried to explain that,

1. In a sun box we have to run multiple JBoss instances. So we need different port for every instance.

2. Each instances will be own by different team. So after environment setup the team will be doing the deployment or any day to day activities. So if i share any property file or startup file in common like Service Binding Manager then there will be confusion between them in doing modifications. So isolating each instance separately will make each team to work individually.

3. Separate startup script is needed to avoid memory setting conflict.

In any means i confused you, sorry for that.

Thanks and Regards
S.Barani Kannan.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

Originally posted by Barani Kannan subramanian:

1. In a sun box we have to run multiple JBoss instances. So we need different port for every instance.

2. Each instances will be own by different team. So after environment setup the team will be doing the deployment or any day to day activities. So if i share any property file or startup file in common like Service Binding Manager then there will be confusion between them in doing modifications. So isolating each instance separately will make each team to work individually.

3. Separate startup script is needed to avoid memory setting conflict.



So you are looking for this. Notice that the jboss-service.xml file that you are editing is not shared. There's a separate jboss-service.xml file for each of the server instances.
Barani Kannan subramanian
Greenhorn

Joined: May 06, 2008
Posts: 14
Hi, first thanks for your patience. Slowly I understood what you tried to say me. I successfully started the first instance after changing the Port. I am fighting (writing) for a script to automate the installation process.
But still I have some more doubts. JBoss is listening in many ports as I found, but it�s not mandatory to utilize all its functions. In such case if I want to disable a service how can I make it. If I comment the service in bind file for the particular function, is it enough. It will be good if you give a clear view on these ports and their use. I am attaching the bind.xml and the ports I found. Similarilly please give a note to understand admin related activities clearly.




<<<<<< jboss-service.xml>>>>>>

Service Name=Naming

RmiPort =11098
RMI_binding_port=18083

WebService_binding_port=14444

invoker_RMIObjectPort=14445

invoker_ServerBindPort=14445


<<<<<<<cluster-service.xml>>>>>>

HAJNDI_RMIport=11101

invoker_RMIObjectPort=11101

invoker_ServerBindPort=14448


<<<<<<<<<<iiop-service.xml>>>>>>>>>>>

CorbaORB_port=13528

<<<<<<<<<<jmx-rmi-adaptor.sar>>>>>>>>>

RMIObjectPort=19001


<<<<<<<<<<<snmp-adaptor.sar>>>>>>>>>>>>

SnmpAgent_logger port=11162

SnmpAgent_adaptor port=11161


<<<<<<<<<<<<jbossmq-service.xml>>>>>>>>

ServerBindPort=18093


<<<<<<<<<<<<<jbossmq-httpil.sar>>>>>>>>>

InvocationLayer_URLPort=18080


<<<<<<<<<<<<<<hajndi-jms-ds.xml>>>>>>>>>>>


JMSProviderLoader=11100


<<<<<<<<http-invoker.sar & httpha-invoker.sar>>>>>>>>


Invoker=18080


InvokerLocator=13873

JMXInvoker=18080

readonly JMXInvoker=18080

httpha-invoker=18080

JMXInvokerHA=18080



<<<<<<<<<<<<<<jboss-ws4ee.sar>>>>>>>>>>>>>>>>>>


WebServicePort=18080

jboss.remoting=14446


<<<<<<<<<<<<<<hsqldb-ds.xml>>>>>>>>>>>>>>>>>>>>>


<<<<<<<<<<<<<<<tomcat>>>>>>>>>>>>>>>>>>>>>>>>>>>


Webserver binding port=18080


<<<<<<<<<<<<<<<<<jboss messaging>>>>>>>>>>>>>>>>


messaging:service=14457


========================************==============================

Script which i am trying for
----------------------------

#!/bin/bash

# This is a program will create a New JBoss Instance.

portlist="/export/home/jbsfi/tmp/test/portlist"

echo "Hello, "$USER". This script will create New JBoss instance."

echo -n "Enter JBoss instance Name and press [ENTER]: "
read JBoss
DIR="/apps/fi/$JBoss"
echo $DIR
if [ -d $DIR ] ;then
echo "Directory exists"
exit
else
cp -r /tools/jboss/jboss-4.2.3.GA/server/all $DIR &
ln -s $DIR "/tools/jboss/jboss-4.2.3.GA/server/$JBoss"
echo ok
fi


echo -n "Enter HTTP.PORT and press [ENTER]: "
read HTTP

echo -n "Enter RMI.PORT and press [ENTER]: "
read RMI

echo "HTTP.PORT=$HTTP" > "$portlist"
echo "RMI.PORT=$RMI" >> "$portlist"


sed "s/HTTP.PORT/$HTTP/g; s/RMI.PORT/$RMI/" < master.xml > bind.xml
Barani Kannan subramanian
Greenhorn

Joined: May 06, 2008
Posts: 14
Hi Jaikiran Pai,

Could you please have look on my request.

Regards
Barani
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

In such case if I want to disable a service how can I make it. If I comment the service in bind file for the particular function, is it enough.


No that won't be enough. This document might help you in removing services which you don't need.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Listening Ports