You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We ran into a few problems, which I can try and list.
1: The vagrant user was not found when ./bin/yb-ctl --enable_postgres was run
initdb: could not look up effective user ID 1000: user does not exist
To fix: export YB_PG_FALLBACK_SYSTEM_USER_NAME='vagrant'
2: There is no way to access it from outside the local loopback which is a problem
To fix:
#Edit yb-ctl
Change the loopback to your vagrant machines IP
def get_local_ip(index):
return "YOUR HOST IP HERE".format(index)
nano /home/vagrant/data/node-1/disk-1/yb-data/postgres/pg_hba.conf
host all all 0.0.0.0/0 trust
0.0.0.0/0 could also be a specific host but since this is locally running on vagrant with no remote access outside the host machine itself we made it easy.
The text was updated successfully, but these errors were encountered:
We ran into a few problems, which I can try and list.
1: The vagrant user was not found when ./bin/yb-ctl --enable_postgres was run
initdb: could not look up effective user ID 1000: user does not exist
To fix: export YB_PG_FALLBACK_SYSTEM_USER_NAME='vagrant'
2: There is no way to access it from outside the local loopback which is a problem
To fix:
#Edit yb-ctl
Change the loopback to your vagrant machines IP
def get_local_ip(index):
return "YOUR HOST IP HERE".format(index)
Change init_if_necessary to include ‘--no-locale’
Eg: initdb_cmd_line = [
os.path.join(self.bin_dir, 'initdb'),
'-U',
'postgres',
'--no-locale'
]
Then to enable remote access to the DB
Edit the config for remote access
nano /home/vagrant/data/node-1/disk-1/yb-data/postgres/postgresql.conf
listen_addresses = '*'
Edit the pg_hba.conf so you can connect
nano /home/vagrant/data/node-1/disk-1/yb-data/postgres/pg_hba.conf
host all all 0.0.0.0/0 trust
0.0.0.0/0 could also be a specific host but since this is locally running on vagrant with no remote access outside the host machine itself we made it easy.
The text was updated successfully, but these errors were encountered: