parsa-epfl / cloudsuite

A Benchmark Suite for Cloud Services.
http://cloudsuite.ch
Other
210 stars 121 forks source link

web_server cannot connect to localhost:8080 #351

Closed Qinghe12 closed 2 years ago

Qinghe12 commented 2 years ago

Hi~ I have pulled the four tier images for web_serveing benchmark from master branch. While when starting cloudsuite/web-serving:faban_client as web-serving.md info,

docker run -dt --net=host --name=db_server cloudsuite/web-serving:db_server xx.xx.xx.xx

     #docker run -dt --net=host --name=web_server cloudsuite/web-serving:web_server /etc/bootstrap.sh
     #docker run -dt --net=host --name=memcache_server cloudsuite/web-serving:memcached_server
     #docker run --net=host --name=faban_client cloudsuite/web-serving:faban_client xx.xx.xx.xx   

     I got log as following:
     #350 "Could not perform HTTP 200 GET from: 10.69.193.11:8080"

      I tried to use curl to check web_server with different port in host machine where 502 return with 8080 and 200 return with 80 as following:
     # curl -sSI 127.0.0.1:80 | grep 'HTTP/1.1' | awk '{print $2}'
     # 200
     # curl -sSI 127.0.0.1:8080 | grep 'HTTP/1.1' | awk '{print $2}'
     # 502

    Is there any config I mistaken? 
xusine commented 2 years ago

Hello,

I observed that you are actually starting memcache server ahead of web-server. Can you strictly follow the order of (1) db_server, (2) memcached, (3) web_server, and (4) faban driver when running docker?

Please let me know again if you have further issue.

Best,

Qinghe12 commented 2 years ago

Actually, It's the same by the order of (1) db_server, (2) memcached, (3) web_server, and (4) faban driver

Could not perform HTTP 200 GET from: 10.69.193.11:8080

"curl -sSI ${WEB_SERVER_IP}:8080 |xxx" always return 502

/tmp/nginx_sites_avail.append in /etc/bootstrap.sh seems take no effect to nginx

xusine commented 2 years ago

Aha, maybe you want to use 10.69.193.11 instead of 127.0.0.1 for running all the docker images, including the ip for starting db_server, the ip for running web_server, and the target ip for faban client? As far as I know, our benchmark does not always assume 127.0.0.1 to be the localhost.

Qinghe12 commented 2 years ago

10.69.193.11 and 127.0.0.1 met the same problem.

I notice that there is a line —"127.0.0.1 localhost " in /etc/hosts in my host machine.

xusine commented 2 years ago

Extremely sorry, I cannot personally repeat this issue locally. For your reference, here is what I did. My machine is an x86 machine.

I first observe the IP address of my interface by running ip a, and I pick the address of my physical network interface and defined it as MYIP.

Since some docker images could occupy 8080 port of your host, maybe it's better to check whether this port is already listened by other program.

Then I run the following commands one by one:

docker run -dt --net=host --rm --name=database_server cloudsuite/web-serving:db_server $MYIP
docker run -dt --net=host --rm --name=memcache_server cloudsuite/web-serving:memcached_server
docker run -dt --net=host --name=web_server cloudsuite/web-serving:web_server /etc/bootstrap.sh $MYIP $MYIP

With each command, there should be a hash indicating that the container is started. You may also use docker ps to watch them. The option --rm is just to automatically remove the container after the container is stopped, and it should have nothing to do with the functionality.

After that, I start the faban docker:

docker run --net=host --name=faban_client cloudsuite/web-serving:faban_client $MYIP

Can you kindly repeat my procedure and let me know your result?

Qinghe12 commented 2 years ago

thanks a lot !! there os port conflict with another nginx..

PS: Is there aarch64 version?

ytaoeer commented 2 years ago

hi,i met the same problem, reply 502 after curl localhost:8080. but i run sudo netstat -apn | grep 8080 tcp 0 0 0.0.0.0:8080 0.0.0.0: LISTEN 32303/nginx: master tcp6 0 0 :::8080 ::: LISTEN 32303/nginx: master it seems that there is no conflit

xusine commented 2 years ago

thanks a lot !! there os port conflict with another nginx..

PS: Is there aarch64 version?

Sorry, there is no official aarch64 version. If you insist, you can use a branch from this pull request, which does not contain HHVM: https://github.com/parsa-epfl/cloudsuite/pull/348

xusine commented 2 years ago

hi,i met the same problem, reply 502 after curl localhost:8080. but i run sudo netstat -apn | grep 8080 tcp 0 0 0.0.0.0:8080 0.0.0.0: LISTEN 32303/nginx: master tcp6 0 0 :::8080 ::: LISTEN 32303/nginx: master it seems that there is no conflit

Can you also check my steps suggested before? Please double check the IP address and the order of running docker.

ytaoeer commented 2 years ago

finally, it is also port conflict.But mysql's 3306 port