-
1. Re: How to access a web project in domain mode?
Weinan Li Jul 13, 2011 11:46 PM (in response to Weinan Li)I've modified the config to:
<virtual-server name="other" enable-welcome-root="true"> <alias name="other.com"/> </virtual-server>
The war is deployed successfully in this server-group:
And the log from master host(10.0.1.3):
[Server:server-one] 11:23:05,703 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "my-webapp.war" [Server:server-one] 11:23:05,752 INFO [org.jboss.web] (MSC service thread 1-2) registering web context: /my-webapp [Server:server-one] 11:23:05,798 INFO [org.jboss.as.server.controller] (pool-1-thread-3) Deployed "my-webapp.war"
I've tried to access the WAR resource in this server host via master host IP:
http://10.0.1.3:8080/my-webapp
or slave host IP:
http://10.0.1.18:8080/my-webapp
But all are just return blank page.
Does that mean the war resources deployed in server group cannot be accessed directly from HTTP port?
-
2. Re: How to access a web project in domain mode?
Emanuel Muckenhuber Jul 14, 2011 8:45 AM (in response to Weinan Li)I don't really understand what you are trying to do with the virtual-servers. Can you just try to change the interface to <any-ipv4-address />, deploy the .war - then you should be able to access http://localhost:8080/my-webapp/ and http://10.0.1.3:8080/my-webapp - on the master. As soon as you connect the slave the equivalent should work.
-
3. Re: How to access a web project in domain mode?
Weinan Li Jul 14, 2011 10:36 AM (in response to Emanuel Muckenhuber)I've added following thing to host.xml in both master and slave:
<management-interfaces> <native-interface interface="any" port="9999" /> <http-interface interface="any" port="9990"/> </management-interfaces> ... <interfaces> ... <interface name="any"><any-ipv4-address/></interface> </interfaces>
And then I've tried to access 'http://localhost:8080/my-webapp' on both master and slave.
Both returns:
curl http://localhost:8080/my-webapp curl: (7) couldn't connect to host
btw, I'm a little bit curious about the domain config. Because one host can serve multiple server groups. If both groups have web resources and use 8080 ports, how will the AS solve the conflicts? Does that mean, different server groups on same hosts must have different ports to serve?
-
4. Re: How to access a web project in domain mode?
Emanuel Muckenhuber Jul 14, 2011 11:17 AM (in response to Weinan Li)Weinan Li wrote:
And then I've tried to access 'http://localhost:8080/my-webapp' on both master and slave.
Above you changed the interfaces for the management ports only which does not affect the socket-binding (standard-sockets) which is used by the web connector.
Weinan Li wrote:
btw, I'm a little bit curious about the domain config. Because one host can serve multiple server groups. If both groups have web resources and use 8080 ports, how will the AS solve the conflicts? Does that mean, different server groups on same hosts must have different ports to serve?
Correct in this case you can specify a 'port-offset' attribute for each server in the host.xml. This is part of the socket-binding reference and is an offset which will be added to each configured port.
-
5. Re: How to access a web project in domain mode?
Weinan Li Jul 14, 2011 9:02 PM (in response to Emanuel Muckenhuber)[domain@10.0.1.3:9999 /] /profile=default/subsystem=web/virtual-server=other.com:add { "outcome" => "success", "result" => {"server-groups" => [("main-server-group" => { "master" => { "host" => "master", "response" => {"outcome" => "success"} }, "slave" => { "host" => "slave", "response" => { "outcome" => "success", "result" => undefined } } })]} }
Thank you for your help Emanuel! The problem is that I forgot to add the web module dynamically because of the bug currently in white rabbit. After adding it I can access the resources in both master and slave with its ip.
Here I have another question, what's the meaning of alias name and name of the virtual server? Does that just used to identify the server group or could be used to access a server group as a whole?
-
6. Re: How to access a web project in domain mode?
Emanuel Muckenhuber Jul 18, 2011 4:48 AM (in response to Weinan Li)1 of 1 people found this helpfulWeinan Li wrote:
Here I have another question, what's the meaning of alias name and name of the virtual server? Does that just used to identify the server group or could be used to access a server group as a whole?
This has just something to do with the web container and virtual hosts and is not related to anything else in the management layer. I guess the 'virtual-server' element should be renamed to 'virtual-host' to make this a bit more clear.
-
7. Re: How to access a web project in domain mode?
Weinan Li Jul 18, 2011 10:32 PM (in response to Emanuel Muckenhuber)yeah 'virtual-host' sounds more reasonable ;-)