-
1. Re: changing ports require changes to 2 xml files
jaikiran Mar 12, 2010 12:18 PM (in response to mwringe)Changing only the binding-jboss-beans.xml should have worked. Can you post the exact changes you did and also what exceptions you see (i assume that's what you mean by the SBM breaking).
-
2. Re: changing ports require changes to 2 xml files
mwringe Mar 12, 2010 1:31 PM (in response to jaikiran)What I did is to replace 8080 in binding-jboss-beans.xml with 8085.
start server, it starts on port 8080 and not 8085
start server with -Djboss.service.binding.set=ports-01, server starts on port 8080 and not 8185
There are no error exceptions or warnings about this in the logs, the server is just ignoring the jboss.service.binding.set=ports-01 and starting the server on 8080. This is what I mean by it breaking the service binding, that its no longer working and silently failing.
change 8080 in server.xml to 8085
start server, it starts on port 8085
start server with -Djboss.service.binding.set=ports-01, the server starts on port 8185
So when the port value is the same between the binding-jboss-beans.xml and server.xml then everything works, if the port value is different then the binding service doesn't work and silently fails.
-
3. Re: changing ports require changes to 2 xml files
jaikiran Mar 12, 2010 2:40 PM (in response to mwringe)I just changed port number in the following section of JBOSS_HOME/server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml: {code:xml} <bean class="org.jboss.services.binding.ServiceBindingMetadata"> <property name="serviceName">jboss.web:service=WebServer</property> <property name="port">8080</property> <property name="description">JBoss Web HTTP connector socket; also drives the values for the HTTPS and AJP sockets</property> <!-- Inject a XSLT transform configuration (see below) that describes how to transform server.xml If the binding value request doesn't require an XSL Transform, this config will be ignored. --> <property name="serviceBindingValueSourceConfig"><inject bean="JBossWebConnectorXSLTConfig"/></property> </bean> {code} to 8380: {code:xml} <bean class="org.jboss.services.binding.ServiceBindingMetadata"> <property name="serviceName">jboss.web:service=WebServer</property> <property name="port">8080</property> <property name="description">JBoss Web HTTP connector socket; also drives the values for the HTTPS and AJP sockets</property> <!-- Inject a XSLT transform configuration (see below) that describes how to transform server.xml If the binding value request doesn't require an XSL Transform, this config will be ignored. --> <property name="serviceBindingValueSourceConfig"><inject bean="JBossWebConnectorXSLTConfig"/></property> </bean> {code} and started the server: {code} ./run.sh -b 0.0.0.0 {code} {code} 01:04:35,820 INFO [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8380 01:04:35,826 INFO [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-0.0.0.0-8309 {code} As shown in the logs it correctly picked up 8380 (without the need for changing any other file). Are you sure you changed the right file and the right section. Can you post the exact changes.
-
4. Re: changing ports require changes to 2 xml files
jaikiran Mar 12, 2010 2:41 PM (in response to jaikiran)By the way, that output was from 6.0.0.M2, same as what you are using.
-
5. Re: changing ports require changes to 2 xml files
mwringe Mar 12, 2010 3:11 PM (in response to jaikiran)Ah, ok, if you edit the port in server.xml to be something other than 8080, and then the bindings doesn't work unless it is equals what is in binding-jboss-beans.xml
-
6. Re: changing ports require changes to 2 xml files
brian.stansberry Mar 12, 2010 3:22 PM (in response to mwringe)This problem will go away in M3. The whole XSL transform of server.xml has been removed; the ports in server.xml are now configured as system properties and the ServiceBindingManager ensures the properties are set. https://jira.jboss.org/jira/browse/JBAS-7466
Thanks for the thread; I still had some minor qualms about this change (don't much like using system properties as a mechanism for passing data) but you remind me why I really dislike the XSLT approach!
-
7. Re: changing ports require changes to 2 xml files
beamerblvd Mar 31, 2011 10:06 PM (in response to mwringe)I hate to reopen an old (over a year old) and seemingly settled thread, but I'm using 6.0.0.FINAL and this doesn't appear to be working for me.
I'm running two instances on the same machine. I want to run the HTTP and AJP connectors on adjacent ports, so I edit the server.xml files for node1 and node2 to look like this:
<Connector protocol="HTTP/1.1" port="8101" address="0.0.0.0" />
<Connector protocol="AJP/1.3" port="20101" address="0.0.0.0" />
<Connector protocol="HTTP/1.1" port="8102" address="0.0.0.0" />
<Connector protocol="AJP/1.3" port="20102" address="0.0.0.0" />
I don't care what ports the other services run on, as long as they are different from each other. I tried starting node2 with -Djboss.service.binding.set=ports-01, but I got dozens of "Address in use" errors. So I edited node2/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml and changed ${jboss.service.binding.set:ports-default} to ${jboss.service.binding.set:ports-01}, but I still got dozens of "Address in use" errors. I'd rather not have to edit every port assignment in this file. I thought this was fixed? What do I do?
Thanks!
-
8. Re: changing ports require changes to 2 xml files
beamerblvd Apr 1, 2011 10:46 AM (in response to mwringe)Also,
Out of frustration, I went ahead and broke down and incremented all of the ports in the file manually. The instance starts, now, but it never joins the cluster. I have two instances on one machine and two instances on another machine. The two instances (one from each machine) that I didn't increment all of the ports manually join the cluster (you see it in the output of .\run.bat, but the other two instances (one from each machine) that I did increment the ports manually do not join the cluster. They just sit there waiting for connections.
N