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

Error while receiving a message #44

Open
Neyzoter opened this issue May 17, 2024 · 6 comments
Open

Error while receiving a message #44

Neyzoter opened this issue May 17, 2024 · 6 comments

Comments

@Neyzoter
Copy link

Neyzoter commented May 17, 2024

I have used several locust versions(2.0, 2.2, 2.16, 2.20) to control locust4j workers, but exceptions always occured.And witch locust version do you recomand to use?

2024-05-17 17:18:19 ERROR Runner:415 - Error while receiving a message
java.lang.IllegalArgumentException
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1314)
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1237)
        at com.github.myzhan.locust4j.runtime.Runner.startSpawning(Runner.java:202)
        at com.github.myzhan.locust4j.runtime.Runner.onSpawnMessage(Runner.java:291)
        at com.github.myzhan.locust4j.runtime.Runner.onMessage(Runner.java:336)
        at com.github.myzhan.locust4j.runtime.Runner.access$600(Runner.java:28)
        at com.github.myzhan.locust4j.runtime.Runner$Receiver.run(Runner.java:413)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
2024-05-17 17:19:43 ERROR Runner:415 - Error while receiving a message
java.lang.NullPointerException
        at com.github.myzhan.locust4j.runtime.Runner.shutdownThreadPool(Runner.java:244)
        at com.github.myzhan.locust4j.runtime.Runner.stop(Runner.java:254)
        at com.github.myzhan.locust4j.runtime.Runner.onMessage(Runner.java:339)
        at com.github.myzhan.locust4j.runtime.Runner.access$600(Runner.java:28)
        at com.github.myzhan.locust4j.runtime.Runner$Receiver.run(Runner.java:413)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
@myzhan
Copy link
Owner

myzhan commented May 21, 2024

You should always use the latest version of locust and locust4j. And how to reproduce this issue?

@Neyzoter
Copy link
Author

You should always use the latest version of locust and locust4j. And how to reproduce this issue?

  1. Run 10 workers.
  2. Start one runner.
  3. Inc to 10 runners.
  4. The workers throw these exceptions.

@myzhan
Copy link
Owner

myzhan commented May 22, 2024

Looks like locust send invalid number of users. Can you add some logs to debug?

@Neyzoter
Copy link
Author

Neyzoter commented Jun 1, 2024

@myzhan please help check the below messages from mater.

2024-06-01 14:34:32 INFO  Worker:68 - Connected to: jdbc:clickhouse:http://cc-uf67hwqx1uq0ior0u-clickhouse.clickhouseserver.rds.aliyuncs.com:8123
2024-06-01 14:34:53 INFO  Runner:291 - Recv spawn message from master: iZuf6aj1fhxxxxxxxxxZ_67018b30fe654430a5e9c9d6cf5f4bdd-spawn-{user_classes_count={Dummy=0}, host=, parsed_options={print_stats=false, html_file=null, tls_key=, stats_history_enabled=false, autostart=false, num_users=null, web_host=, locustfile=dummy.py, web_auth=null, host=null, csv_prefix=null, worker=false, run_time=null, master_host=127.0.0.1, logfile=null, web_port=8089, tls_cert=, list_commands=false, tags=null, autoquit=-1, master_bind_host=*, modern_ui=false, enable_rebalancing=false, hatch_rate=0, show_task_ratio=false, equal_weights=false, expect_workers_max_wait=0, exit_code_on_error=1, spawn_rate=null, slave=false, stop_timeout=0, skip_log_setup=false, class_picker=false, json=false, master_bind_port=5557, processes=null, user_classes=[], only_summary=false, expect_slaves=false, exclude_tags=null, master=true, headless=false, expect_workers=1, reset_stats=false, loglevel=INFO, show_task_ratio_json=false, master_port=5557, headful=false, config=null}, stop_timeout=0.0, timestamp=1.71722368E9}, numUsers: 0
2024-06-01 14:34:53 ERROR Runner:417 - Error while receiving a message
java.lang.IllegalArgumentException
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1314)
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1237)
        at com.github.myzhan.locust4j.runtime.Runner.startSpawning(Runner.java:202)
        at com.github.myzhan.locust4j.runtime.Runner.onSpawnMessage(Runner.java:293)
        at com.github.myzhan.locust4j.runtime.Runner.onMessage(Runner.java:319)
        at com.github.myzhan.locust4j.runtime.Runner.access$600(Runner.java:28)
        at com.github.myzhan.locust4j.runtime.Runner$Receiver.run(Runner.java:415)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
2024-06-01 14:35:45 INFO  Runner:291 - Recv spawn message from master: iZuf6ajxxxxxxxxZ_67018b30fe654430a5e9c9d6cf5f4bdd-spawn-{user_classes_count={Dummy=0}, host=, parsed_options={print_stats=false, html_file=null, tls_key=, stats_history_enabled=false, autostart=false, num_users=null, web_host=, locustfile=dummy.py, web_auth=null, host=null, csv_prefix=null, worker=false, run_time=null, master_host=127.0.0.1, logfile=null, web_port=8089, tls_cert=, list_commands=false, tags=null, autoquit=-1, master_bind_host=*, modern_ui=false, enable_rebalancing=false, hatch_rate=0, show_task_ratio=false, equal_weights=false, expect_workers_max_wait=0, exit_code_on_error=1, spawn_rate=null, slave=false, stop_timeout=0, skip_log_setup=false, class_picker=false, json=false, master_bind_port=5557, processes=null, user_classes=[], only_summary=false, expect_slaves=false, exclude_tags=null, master=true, headless=false, expect_workers=1, reset_stats=false, loglevel=INFO, show_task_ratio_json=false, master_port=5557, headful=false, config=null}, stop_timeout=0.0, timestamp=1.71722381E9}, numUsers: 0
2024-06-01 14:35:45 ERROR Runner:417 - Error while receiving a message
java.lang.IllegalArgumentException
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1314)
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1237)
        at com.github.myzhan.locust4j.runtime.Runner.startSpawning(Runner.java:202)
        at com.github.myzhan.locust4j.runtime.Runner.onSpawnMessage(Runner.java:293)
        at com.github.myzhan.locust4j.runtime.Runner.onMessage(Runner.java:338)
        at com.github.myzhan.locust4j.runtime.Runner.access$600(Runner.java:28)
        at com.github.myzhan.locust4j.runtime.Runner$Receiver.run(Runner.java:415)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
2024-06-01 14:35:46 INFO  Runner:291 - Recv spawn message from master: iZuf6aj1xxxxxxZ_67018b30fe654430a5e9c9d6cf5f4bdd-spawn-{user_classes_count={Dummy=1}, host=, parsed_options={print_stats=false, html_file=null, tls_key=, stats_history_enabled=false, autostart=false, num_users=null, web_host=, locustfile=dummy.py, web_auth=null, host=null, csv_prefix=null, worker=false, run_time=null, master_host=127.0.0.1, logfile=null, web_port=8089, tls_cert=, list_commands=false, tags=null, autoquit=-1, master_bind_host=*, modern_ui=false, enable_rebalancing=false, hatch_rate=0, show_task_ratio=false, equal_weights=false, expect_workers_max_wait=0, exit_code_on_error=1, spawn_rate=null, slave=false, stop_timeout=0, skip_log_setup=false, class_picker=false, json=false, master_bind_port=5557, processes=null, user_classes=[], only_summary=false, expect_slaves=false, exclude_tags=null, master=true, headless=false, expect_workers=1, reset_stats=false, loglevel=INFO, show_task_ratio_json=false, master_port=5557, headful=false, config=null}, stop_timeout=0.0, timestamp=1.71722381E9}, numUsers: 1

@Neyzoter
Copy link
Author

Neyzoter commented Jun 1, 2024

@myzhan please help check the below messages from mater.

2024-06-01 14:34:32 INFO  Worker:68 - Connected to: jdbc:clickhouse:http://cc-uf67hwqx1uq0ior0u-clickhouse.clickhouseserver.rds.aliyuncs.com:8123
2024-06-01 14:34:53 INFO  Runner:291 - Recv spawn message from master: iZuf6aj1fhxxxxxxxxxZ_67018b30fe654430a5e9c9d6cf5f4bdd-spawn-{user_classes_count={Dummy=0}, host=, parsed_options={print_stats=false, html_file=null, tls_key=, stats_history_enabled=false, autostart=false, num_users=null, web_host=, locustfile=dummy.py, web_auth=null, host=null, csv_prefix=null, worker=false, run_time=null, master_host=127.0.0.1, logfile=null, web_port=8089, tls_cert=, list_commands=false, tags=null, autoquit=-1, master_bind_host=*, modern_ui=false, enable_rebalancing=false, hatch_rate=0, show_task_ratio=false, equal_weights=false, expect_workers_max_wait=0, exit_code_on_error=1, spawn_rate=null, slave=false, stop_timeout=0, skip_log_setup=false, class_picker=false, json=false, master_bind_port=5557, processes=null, user_classes=[], only_summary=false, expect_slaves=false, exclude_tags=null, master=true, headless=false, expect_workers=1, reset_stats=false, loglevel=INFO, show_task_ratio_json=false, master_port=5557, headful=false, config=null}, stop_timeout=0.0, timestamp=1.71722368E9}, numUsers: 0
2024-06-01 14:34:53 ERROR Runner:417 - Error while receiving a message
java.lang.IllegalArgumentException
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1314)
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1237)
        at com.github.myzhan.locust4j.runtime.Runner.startSpawning(Runner.java:202)
        at com.github.myzhan.locust4j.runtime.Runner.onSpawnMessage(Runner.java:293)
        at com.github.myzhan.locust4j.runtime.Runner.onMessage(Runner.java:319)
        at com.github.myzhan.locust4j.runtime.Runner.access$600(Runner.java:28)
        at com.github.myzhan.locust4j.runtime.Runner$Receiver.run(Runner.java:415)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
2024-06-01 14:35:45 INFO  Runner:291 - Recv spawn message from master: iZuf6ajxxxxxxxxZ_67018b30fe654430a5e9c9d6cf5f4bdd-spawn-{user_classes_count={Dummy=0}, host=, parsed_options={print_stats=false, html_file=null, tls_key=, stats_history_enabled=false, autostart=false, num_users=null, web_host=, locustfile=dummy.py, web_auth=null, host=null, csv_prefix=null, worker=false, run_time=null, master_host=127.0.0.1, logfile=null, web_port=8089, tls_cert=, list_commands=false, tags=null, autoquit=-1, master_bind_host=*, modern_ui=false, enable_rebalancing=false, hatch_rate=0, show_task_ratio=false, equal_weights=false, expect_workers_max_wait=0, exit_code_on_error=1, spawn_rate=null, slave=false, stop_timeout=0, skip_log_setup=false, class_picker=false, json=false, master_bind_port=5557, processes=null, user_classes=[], only_summary=false, expect_slaves=false, exclude_tags=null, master=true, headless=false, expect_workers=1, reset_stats=false, loglevel=INFO, show_task_ratio_json=false, master_port=5557, headful=false, config=null}, stop_timeout=0.0, timestamp=1.71722381E9}, numUsers: 0
2024-06-01 14:35:45 ERROR Runner:417 - Error while receiving a message
java.lang.IllegalArgumentException
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1314)
        at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1237)
        at com.github.myzhan.locust4j.runtime.Runner.startSpawning(Runner.java:202)
        at com.github.myzhan.locust4j.runtime.Runner.onSpawnMessage(Runner.java:293)
        at com.github.myzhan.locust4j.runtime.Runner.onMessage(Runner.java:338)
        at com.github.myzhan.locust4j.runtime.Runner.access$600(Runner.java:28)
        at com.github.myzhan.locust4j.runtime.Runner$Receiver.run(Runner.java:415)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
2024-06-01 14:35:46 INFO  Runner:291 - Recv spawn message from master: iZuf6aj1xxxxxxZ_67018b30fe654430a5e9c9d6cf5f4bdd-spawn-{user_classes_count={Dummy=1}, host=, parsed_options={print_stats=false, html_file=null, tls_key=, stats_history_enabled=false, autostart=false, num_users=null, web_host=, locustfile=dummy.py, web_auth=null, host=null, csv_prefix=null, worker=false, run_time=null, master_host=127.0.0.1, logfile=null, web_port=8089, tls_cert=, list_commands=false, tags=null, autoquit=-1, master_bind_host=*, modern_ui=false, enable_rebalancing=false, hatch_rate=0, show_task_ratio=false, equal_weights=false, expect_workers_max_wait=0, exit_code_on_error=1, spawn_rate=null, slave=false, stop_timeout=0, skip_log_setup=false, class_picker=false, json=false, master_bind_port=5557, processes=null, user_classes=[], only_summary=false, expect_slaves=false, exclude_tags=null, master=true, headless=false, expect_workers=1, reset_stats=false, loglevel=INFO, show_task_ratio_json=false, master_port=5557, headful=false, config=null}, stop_timeout=0.0, timestamp=1.71722381E9}, numUsers: 1

user_classes_count={Dummy=0} seem like a problem.

@Neyzoter
Copy link
Author

Neyzoter commented Jun 1, 2024

I created a pr, can you review it? @myzhan

#45 #45

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