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

[🐛 BUG]: rr workers/reset commands don't respect default config values #1914

Closed
1 task done
r4m-alexd opened this issue May 7, 2024 · 3 comments · Fixed by #1915
Closed
1 task done

[🐛 BUG]: rr workers/reset commands don't respect default config values #1914

r4m-alexd opened this issue May 7, 2024 · 3 comments · Fixed by #1915
Assignees
Labels
B-bug Bug: bug, exception
Milestone

Comments

@r4m-alexd
Copy link

r4m-alexd commented May 7, 2024

No duplicates 🥲.

  • I have searched for a similar issue in our bug tracker and didn't find any solutions.

What happened?

A bug happened!

Version (rr --version)

rr version 2024.1.1 (build time: 2024-05-02T16:37:17+0000, go1.22.2), OS: linux, arch: amd64

How to reproduce the issue?

  1. Create a config file .rr.test.yaml:
version: '3'

server:
  command: "php8.1 psr-worker.php"

http:
  address: 0.0.0.0:8080

rpc:
  listen: tcp://0.0.0.0:${RR_RPC_PORT:-6081}

logs:
  level: debug
  mode: development
  1. Start rr with the command ./rr -c .rr.test.yaml serve:
2024-05-07T14:34:38+0000        DEBUG   rpc             plugin was started      {"address": "tcp://0.0.0.0:6081", "list of the plugins with RPC methods:": ["lock", "resetter", "app", "informer"]}
2024-05-07T14:34:38+0000        DEBUG   server          worker is allocated     {"pid": 13914, "max_execs": 0, "internal_event_name": "EventWorkerConstruct"}
2024-05-07T14:34:38+0000        DEBUG   server          worker is allocated     {"pid": 13916, "max_execs": 0, "internal_event_name": "EventWorkerConstruct"}
2024-05-07T14:34:38+0000        DEBUG   server          worker is allocated     {"pid": 13915, "max_execs": 0, "internal_event_name": "EventWorkerConstruct"}
2024-05-07T14:34:38+0000        DEBUG   server          worker is allocated     {"pid": 13913, "max_execs": 0, "internal_event_name": "EventWorkerConstruct"}
[INFO] RoadRunner server started; version: 2024.1.1, buildtime: 2024-05-02T16:37:17+0000
[INFO] sdnotify: not notified
2024-05-07T14:34:38+0000        DEBUG   http            http server was started {"address": "0.0.0.0:8080"}
  1. Try to get info about workers using the command ./rr -c .rr.test.yaml workers
dial tcp 0.0.0.0:0: connect: connection refused

This one doesn't work either :

$ RR_RPC_PORT=6081 ./rr -c .rr.test.yaml workers
dial tcp 0.0.0.0:0: connect: connection refused

Only this command works OK:

$ ./rr -c .rr.env.yaml -o "rpc.listen=tcp://0.0.0.0:6081"  workers
Workers of [http]:
+---------+-----------+---------+---------+---------+--------------------+
|   PID   |  STATUS   |  EXECS  | MEMORY  |  CPU%   |      CREATED       |
+---------+-----------+---------+---------+---------+--------------------+
|   13913 | ready     |       0 | 50 MB   |    0.20 | 14 seconds ago     |
|   13914 | ready     |       0 | 49 MB   |    0.26 | 14 seconds ago     |
|   13915 | ready     |       0 | 49 MB   |    0.20 | 14 seconds ago     |
|   13916 | ready     |       0 | 49 MB   |    0.20 | 14 seconds ago     |
+---------+-----------+---------+---------+---------+--------------------+
  1. Same problem with the reset command:
$ ./rr -c .rr.test.yaml reset
dial tcp 0.0.0.0:0: connect: connection refused

Relevant log output

No response

@r4m-alexd r4m-alexd added B-bug Bug: bug, exception F-need-verification labels May 7, 2024
@r4m-alexd r4m-alexd changed the title [🐛 BUG]: rr workers/reset command don't respect default config values [🐛 BUG]: rr workers/reset commands don't respect default config values May 7, 2024
@rustatian
Copy link
Member

rustatian commented May 7, 2024

Hey @r4m-alexd 👋
rr reset command should be used with a host and port, w/o env variables, because RR doesn't use the config parser for these commands. Please try to specify a port directly and retry the command.

EDIT:
Hm, I was wrong, we use the envs parser. Looks like this is the real bug, will be fixed in the next bugfix release, thanks.

@rustatian
Copy link
Member

./rr -c .rr.env.yaml -o "rpc.listen=tcp://0.0.0.0:6081" workers this command works because you override the host and port with the real values.

@rustatian rustatian moved this to 📋 Backlog in Jira 😄 May 7, 2024
@rustatian rustatian added this to the v2024.1.2 milestone May 7, 2024
@rustatian rustatian moved this from 📋 Backlog to 🏗 In progress in Jira 😄 May 7, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Jira 😄 May 7, 2024
@rustatian
Copy link
Member

@r4m-alexd Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: bug, exception
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants