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

No log output if logfile setting is invalid (was: No host resolved when loglevel is set in headless mode) #2996

Open
2 tasks done
vkuehn opened this issue Nov 26, 2024 · 3 comments
Labels

Comments

@vkuehn
Copy link
Contributor

vkuehn commented Nov 26, 2024

Prerequisites

Description

This works fine

locustfile = locustfile.py
headless = false
host = "http://localhost:8080"
process = 4
spawn-rate = 10
run-time = 5m
users = 100

when adding these debug settings

locustfile = locustfile.py
headless = false
host = "http://localhost:8080"
loglevel = DEBUG
logfile = locust.logfile
process = 4
spawn-rate = 10
run-time = 5m
users = 100

locust shows this and freezes

Error resolving address: [Errno 8] nodename nor servname provided, or not known

this does not happen in headless mode

Command line

locust --config local.conf

Locustfile contents

as shown

Python version

3.11.10

Locust version

2.32.1

Operating system

Mac OS 15.1 Build 24B83

@vkuehn vkuehn added the bug label Nov 26, 2024
@vkuehn vkuehn changed the title No localhost found when debug is set No localhost found when loglevel is set in headless mode Nov 26, 2024
@vkuehn vkuehn changed the title No localhost found when loglevel is set in headless mode No host resolved when loglevel is set in headless mode Nov 26, 2024
@cyberw
Copy link
Collaborator

cyberw commented Nov 26, 2024

I guess adding quote marks doesnt help?

logfile = "locust.logfile"

What is the full output?

@vkuehn
Copy link
Contributor Author

vkuehn commented Nov 26, 2024

yes that did help and solve the issue.

The full output was just that line

Error resolving address: [Errno 8] nodename nor servname provided, or not known

nothing happend than as far I could see

and couldn't reproduce the issue now...sad but could be a pain for new users like me

@vkuehn vkuehn closed this as completed Nov 26, 2024
@cyberw cyberw reopened this Nov 26, 2024
@cyberw
Copy link
Collaborator

cyberw commented Nov 26, 2024

I'll reopen this in case anyone wants to have a go at it. What I'm thinking could be done is send output to stderr if logging setup fails like this.

I dont have time to look at it myself rn, but maybe later...

@cyberw cyberw changed the title No host resolved when loglevel is set in headless mode No log output if logfile setting is invalid (was: No host resolved when loglevel is set in headless mode) Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants