Nevermind, just figured it out. It's actually in the mysql server. Its
dockerfile sets
ENV web_host web_server
-Guangyan
On 03/20/2016 02:16 PM, Guangyan Hu wrote:
Hello,
Is the hostname "web_server" hard coded anywhere? I tried to change
the web_server container's name to be "net_server" from
"web_server"but both the usergen.jar and the faban_client gave me
"Exception in thread "main" java.net.UnknownHostException: web_server"
error.
For user generation, I first ran the command to start a web_server
container called "net_server".
docker run -d -t --net=swarm-network --privileged=true
--name=net_server cloudsuite/web-serving:web_server /etc/bootstrap.sh
and verified that the net_server container could be accessed from
other containers, I ran curl net_server and got the "Welcome to Nginx"
message.
In the net_server container, I ran cd /web20_benchmark/build && java
-jar Usergen.jar http://192.168.100.2:8080 (ip address of the
net_server container) but it gave me the following output :
Exception in thread "main" java.net.UnknownHostException: web_server
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
at java.net.Socket.connect(Socket.java:579)
at
com.sun.faban.driver.transport.util.TimedSocket.connect(TimedSocket.java:292)
at java.net.Socket.connect(Socket.java:528)
at
com.sun.faban.driver.transport.sunhttp.HttpClient.doConnect(HttpClient.java:182)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
at
com.sun.faban.driver.transport.sunhttp.HttpClient.<init>(HttpClient.java:130)
at
com.sun.faban.driver.transport.sunhttp.HttpClient.New(HttpClient.java:111)
at
com.sun.faban.driver.transport.sunhttp.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:99)
at
com.sun.faban.driver.transport.sunhttp.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:41)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:934)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:852)
at
sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2409)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1559)
at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at
com.sun.faban.driver.transport.sunhttp.SunHttpTransport.fetchResponse(SunHttpTransport.java:654)
at
com.sun.faban.driver.transport.sunhttp.SunHttpTransport.fetchURL(SunHttpTransport.java:557)
at
com.sun.faban.driver.transport.sunhttp.SunHttpTransport.fetchURL(SunHttpTransport.java:519)
at setup.UserGenerator.createUsers(UserGenerator.java:117)
at setup.UserGenerator.main(UserGenerator.java:152)
I tried running cd /web20_benchmark/build && java -jar Usergen.jar
http://net_server:8080 and I received the same error. It looks weird
to me since I do not use the host name "web_server" in the faban_client
I have not seen the host name "web_server" hard-coded in the
faban_client anywhere yet. For my research project, I need to have a
cluster of web_servers with a load balancer in the front. Supposedly,
they should have different host names. What can we do to have
different names for the web_server?
Thanks and best regards,
Guangyan