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

Can't get into the vm with 18.4.0-XE via vagrant ssh #534

Open
infiniteshi opened this issue Jan 2, 2025 · 2 comments
Open

Can't get into the vm with 18.4.0-XE via vagrant ssh #534

infiniteshi opened this issue Jan 2, 2025 · 2 comments

Comments

@infiniteshi
Copy link

infiniteshi commented Jan 2, 2025

Describe the issue
An older version of this project is being used 18.4.0-XE in this case.
User currently has no issue to bring the Oracle DB up by running vagrant up. We can verify that Oracle DB is up and running by "sqlplus / as sysdba" etc.
After an upgrade of vagrant to 2.4.3 recently, can't connect to the DB with a sql client software AquaData studio. We are trying to get into the vm by vagrant ssh but can't.
Since we know the DB is running, our main focus/question is how to get into the vm. (1)How to make vagrant ssh work and (2) Is there any alternative to vagrant ssh to achieve the same goal.

Environment (please complete the following information):

Additional information
We've tried this command that works in terms of getting us to run sqlplus / as sysdba
ssh -i /<path_to>/vagrant-projects/OracleDatabase/18.4.0-XE/.vagrant/machines/oracle18c-xe-vagrant/virtualbox/private_key [email protected] -p 2222

The Vagrantfile is default as in the OracleDatabase/18.4.0-XE project and not modified, so the name of the vm is the defult oracle18c-xe-vagrant

Expected Behavior
After running vagrant up, we run vagrant ssh, what we expect to see is prompt [vagrant@oracle18c-xe-vagrant ~] and then if we would do sudo su - oracle we'd expect to see prompt [oracle@oracle18c-xe-vagrant ~].

Actual Behavior
After running vagrant up, we run vagrant ssh, what we actually see is prompt [vagrant@vbox ~] and then if we did sudo su - oracle anyway and we saw prompt [oracle@vbox ~].

@infiniteshi infiniteshi changed the title Can't run vagrant ssh to get into the vm with 18.4.0-XE Can't get into the vm with 18.4.0-XE via vagrant ssh Jan 2, 2025
@PaulNeumann
Copy link
Contributor

PaulNeumann commented Jan 3, 2025

@infiniteshi Since the OS username in the prompt changes from "vagrant" to "oracle" when you run sudo su - oracle, vagrant ssh is connecting to the VM and working correctly. You should be able to run sqlplus or any other command.

It sounds like the IP address 127.0.0.1 has been assigned the name "vbox" in a configuration file on the host computer, but I think you can safely ignore the "vbox" name.

For the OracleDatabase/18.4.0-XE project, the Vagrantfile sets the VM hostname to "localhost", rather than "oracle18c-xe-vagrant". Otherwise, listener configuration fails. So, even if 127.0.0.1 wasn't assigned the name "vbox", the prompt would be "[vagrant@localhost ~]", rather than "[vagrant@oracle18c-xe-vagrant ~]". The same is true for the 21.3.0-XE, 23.3.0-Free and 23.5.0-Free projects.

I hope this helps.

@infiniteshi
Copy link
Author

@PaulNeumann That's great to know, thank you!

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