Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

locust not making any request when deployed on docker #415

Closed
timfeirg opened this issue May 11, 2016 · 4 comments
Closed

locust not making any request when deployed on docker #415

timfeirg opened this issue May 11, 2016 · 4 comments

Comments

@timfeirg
Copy link

timfeirg commented May 11, 2016

When I deploy locust (standalone or master-slave) on docker, it won't make any requests after I started a new load test.

mosh__root_7d9626228cc4-byobu__1

and the web interface will stay like this forever, zero request made:

locust

as for docker base image, I've tried alpine, ubuntu, centos, I can provide Dockerfile, but there're no exceptions raised, locust runs just fine, it's just not making any requests.

anybody with similar experience? I have no idea where to look, no idea at all.

locust file

the locust file I used is just any example locust file, it runs without any problem on my macbook (standalone or master-slave).

but here's the code:

from locust import HttpLocust, TaskSet


headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36'}


def index(l):
    l.client.get('/', headers=headers)


class UserBehavior(TaskSet):
    tasks = {index: 2}


class WebsiteUser(HttpLocust):
    task_set = UserBehavior
    host = 'http://www.baidu.com'
    min_wait=5000
    max_wait=9000
@cgoldberg
Copy link
Member

can you post your locustfile?

@timfeirg
Copy link
Author

@cgoldberg I've updated my comment

@timfeirg
Copy link
Author

@cgoldberg I think I can start a alpine container (in which locust wouldn't make request) on my test server and publish port and give you remote access, if you'd like to take a look?

@timfeirg
Copy link
Author

I print a lot to finally find out the problem, the url I requested will return None when using the docker network inside our company, no reponse, no status_code, and requests.get will just return, completely insane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants