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

[docdb] Issue parsing multiple comma separated rpc_bind_addresses. #5634

Closed
ramsrivatsa opened this issue Sep 9, 2020 · 1 comment
Closed
Assignees
Labels
area/platform Yugabyte Platform

Comments

@ramsrivatsa
Copy link
Contributor

ramsrivatsa commented Sep 9, 2020

While parsing multiple rpc_bind_addresses, the executable throws an error. This is because we try to resolve [127.0.0.1 and not 127.0.0.1. The extra square bracket in the front poses the issue.
./build/latest/bin/yb-master --master_addresses 127.0.0.1 --rpc_bind_addresses 127.0.0.1:7100,127.0.0.2:7101 --server_broadcast_addresses 127.0.0.1 --replication_factor 1 --enable_ysql --fs_data_dirs "/tmp/testing" & /tmp/testing/yb-master.out

@ramsrivatsa ramsrivatsa self-assigned this Sep 9, 2020
@ramsrivatsa ramsrivatsa added the area/platform Yugabyte Platform label Sep 9, 2020
@ramsrivatsa ramsrivatsa assigned iSignal and bmatican and unassigned iSignal and bmatican Sep 9, 2020
ramsrivatsa added a commit that referenced this issue Sep 24, 2020
Summary:
Issue parsing multiple comma separated rpc_bind_addresses while bringing up a tserver. If you build a the current master version of Yugabyte and try to bring up a tserver using the following command,
```
./build/latest/bin/yb-tserver --tserver_master_addrs 127.0.0.1 --rpc_bind_addresses 127.0.0.1:9301,127.0.0.2:9302 --start_pgsql_proxy --fs_data_dirs "/tmp/testing" & /tmp/testing/yb-master.out
```
it will throw the following error.

```
F0909 19:09:38.429009 194117056 tablet_server_main.cc:256] Network error (yb/util/net/net_util.cc:230): Unable to resolve address [127.0.0.1, getaddrinfo returned 8 (EAI_NONAME): nodename nor servname provided, or not known     Fatal failure details written to /tmp/testing/yb-data/tserver/logs/yb-tserver.FATAL.details.2020-09-09T19_09_38.pid23464.txt
F20200909 19:09:38 ../../src/yb/tserver/tablet_server_main.cc:256] Network error (yb/util/net/net_util.cc:230): Unable to resolve address [127.0.0.1, getaddrinfo returned 8 (EAI_NONAME): nodename nor servname provided, or not known
```
This is due to the fact that, tserver is unable to resolve the following ip address **[127.0.0.1**. There is a parsing bug due to the additional square bracket in the front which gets included as a part of the IP address.

Test Plan:
This fix can be tested by providing a comma separated list of rpc_bind_addresses while bringing up the tserver and checking if the tserver instance has been launched successfully. The following commands can be used for that purpose.
```
./build/latest/bin/yb-tserver --tserver_master_addrs 127.0.0.1 --rpc_bind_addresses 127.0.0.1,127.0.0.2 --start_pgsql_proxy --fs_data_dirs "/tmp/testing" & /tmp/testing/yb-master.out
```
```
./build/latest/bin/yb-tserver --tserver_master_addrs 127.0.0.1 --rpc_bind_addresses 127.0.0.1:9201,127.0.0.2:9202 --start_pgsql_proxy --fs_data_dirs "/tmp/testing" & /tmp/testing/yb-master.out
```
In either of these launches, we'll see that the CQL server will be running on localhost listening in ports 9042 and 9043.

Reviewers: hector, sanketh

Reviewed By: sanketh

Subscribers: ybase, bogdan

Differential Revision: https://phabricator.dev.yugabyte.com/D9341
@ramsrivatsa
Copy link
Contributor Author

ramsrivatsa commented Sep 24, 2020

Fixed this issue with a the following commit (69945b0)

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

No branches or pull requests

3 participants