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

[yugabyted] Error while starting yugabyte cluster with './yugabyted start' on macOS #13373

Closed
gargsans-yb opened this issue Jul 20, 2022 · 5 comments
Assignees
Labels
area/ossexp DB usability Project

Comments

@gargsans-yb
Copy link
Contributor

Description

When trying to start a 1-node cluster on macOS using ./yugabyted start, following error shows up.

gargsans@Sanskars-MacBook-Pro bin % ./yugabyted start
Traceback (most recent call last):
  File "./yugabyted", line 3723, in <module>
    ControlScript().run()
  File "./yugabyted", line 2250, in run
    self.validate_and_set_configs(args)
  File "./yugabyted", line 1976, in validate_and_set_configs
    args.advertise_address = self.find_ip_address_of_node()
  File "./yugabyted", line 1845, in find_ip_address_of_node
    host_ip = socket.gethostbyname(host_name)
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

The python method socket.gethostbyname() is not able to get the host ip.

@gargsans-yb gargsans-yb added area/documentation Documentation needed area/ossexp DB usability Project and removed area/documentation Documentation needed labels Jul 20, 2022
@gargsans-yb gargsans-yb self-assigned this Jul 20, 2022
gargsans-yb added a commit that referenced this issue Jul 21, 2022
…th private ip as advertise address by default

Summary:
The code changes, for supporting 0.0.0.0 as bind address, that was using private ip of the
machine by default fails to work when running on a macOS machine. The python method
socket.gethostbyname() fails to get the host ip of the machine of macOS. Reverting the changes back.

Test Plan: Manual Testing

Reviewers: nikhil

Reviewed By: nikhil

Subscribers: sgarg-yb

Differential Revision: https://phabricator.dev.yugabyte.com/D18443
@nchandrappa
Copy link
Contributor

Another issue reported for itest failure for a default behaviour change. We will need update the tests before landing this feature.

we have reverted the code change in master. The issue is test case is trying to connect on 127.0.0.1 by default however a feature was landed to change the behavior of yugabyted to bind on the host VM private-ip address instead on 127.0.0.1. YCQLSH should use host IP instead of loopback address.

The test case has to be updated however this feature was broken on macOS, so we reverted the feature. There are workarounds for this issue. Do we have to backport the reverted code changes for 2.15.1.0 branch? Please let us know

@Yosuamuliawan19
Copy link

Yosuamuliawan19 commented Aug 28, 2022

@nchandrappa Hi, are there any updates on this ? Im currently unable to start installing yugabtyeDB on my local machine due to this. Machine: Intel MBP 15 inch , Mac OS Big Sur

@nchandrappa
Copy link
Contributor

We have reverted the code changes from the master, and a new fix is in progress. The issue will be fixed in YugabyteDB
2.15.2 release. Thanks

@nchandrappa
Copy link
Contributor

nchandrappa commented Sep 6, 2022

Hi @Yosuamuliawan19 There is a workaround by directly specifying the advertise_address. You can run the following command to start a single node cluster -

./bin/yugabyted start --advertise_address=127.0.0.1

gargsans-yb added a commit that referenced this issue Sep 7, 2022
…ing advertising address

Summary:
Current Behaviour-
* If advertise address is not provided, the rpc_bind_address of yb-master was being set to 0.0.0.0 whereas the rpc_bind_address of yb-tserver was being set to 127.0.0.1

Changed Behaviour -
* In Linux, the private ip is used as advertise address if not given.
* In MacOS, the function to find the private_ip address from python if not working properly so starting with 127.0.0.1 as bind address.

Test Plan: Manual Testing

Reviewers: nikhil

Reviewed By: nikhil

Subscribers: sgarg-yb

Differential Revision: https://phabricator.dev.yugabyte.com/D18517
@nchandrappa
Copy link
Contributor

Code changes have landed and they will be available in 2.15.3.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ossexp DB usability Project
Projects
None yet
Development

No branches or pull requests

3 participants