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

Provisioning fails with "id: oracle: no such user" #9

Open
jonbartlett opened this issue Sep 3, 2017 · 7 comments
Open

Provisioning fails with "id: oracle: no such user" #9

jonbartlett opened this issue Sep 3, 2017 · 7 comments

Comments

@jonbartlett
Copy link

Vagrant is attempting to mount "/vagrant/oradata" as user oracle before the user is created. This causes the provisioning to fail.

==> default: Mounting shared folders...
    default: /vagrant => /Users/jon/Documents/Projects/oracle12c-vagrant
    default: /vagrant/oradata => /Users/jon/Documents/Projects/oracle12c-vagrant/oradata
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

id -u oracle

The error output from the command was:

id: oracle: no such user
@steveswinsburg
Copy link
Owner

steveswinsburg commented Sep 4, 2017

Are you getting this when you install for the first time? I raised #8 because I saw this sporadically when starting up - I can't find a way to get the shared folders to mount earlier - the solution is to just connect as sys and 'ALTER DATABASE OPEN'. Alternatively you could comment out the oradata shared folder as it is optional.

@jonbartlett
Copy link
Author

jonbartlett commented Sep 5, 2017

Yes when provisioning. I assumed it was because Vagrant mounts the shared folders prior to running the "install.sh" script (which in turn installs Oracle and creates the 'oracle' user). This happens very early on in the provisioning process ("vagrant up").

Commenting out the oradata share works around the issue.

Unsure if this is related to #8 as the db is not installed when this occurs.

@joyider
Copy link

joyider commented Sep 5, 2017

I Had that issue too :) first time i just ran the provisioning manually (vagrant provision) then vagrant reload,
Then I wrote a little function to check whether the machine was provisioned

def provisioned?(vm_name='default', provider='virtualbox') File.exist?(".vagrant/machines/#{vm_name}/#{provider}/action_provision") end

and did that check on the part causing the issue in the vagrantfile

config.vm.synced_folder "./oradata", "/vagrant/oradata", owner: "oracle", group: "oinstall" if provisioned?
Or i guess you can entirely move that line config.vm.synced_folder "./oradata", "/vagrant/oradata", owner: "oracle", group: "oinstall" before running vagrant up
EDIT: See you already fixed it by removing the mount :)

@Fachher
Copy link

Fachher commented Oct 25, 2017

Still have problems with this vagrant box.

What I did.
$: vagrant up // leads to "Provisioning fails with "id: oracle: no such user"
$: vagrant provision
$: vagrant reload

==> default: make[1]: Leaving directory /tmp/perl-5.14.4'
==> default: mv: cannot stat ‘/opt/oracle/product/12.1.0.2/dbhome_1/rdbms/lib/config.o’: No such file or directory
==> default: cp: cannot stat ‘/opt/oracle/product/12.1.0.2/dbhome_1/javavm/jdk/jdk6/lib/libjavavm12.a’: No such file or directory
==> default: chown: cannot access ‘/opt/oracle/product/12.1.0.2/dbhome_1/lib/libjavavm12.a’: No such file or directory
==> default: make: /opt/oracle/product/12.1.0.2/dbhome_1/rdbms/lib/ins_rdbms.mk: No such file or directory
==> default: make: *** No rule to make target /opt/oracle/product/12.1.0.2/dbhome_1/rdbms/lib/ins_rdbms.mk'. Stop. ==> default: make: /opt/oracle/product/12.1.0.2/dbhome_1/network/lib/ins_net_server.mk: No such file or directory ==> default: make: *** No rule to make target /opt/oracle/product/12.1.0.2/dbhome_1/network/lib/ins_net_server.mk'. Stop.
==> default: make: /opt/oracle/product/12.1.0.2/dbhome_1/sqlplus/lib/ins_sqlplus.mk: No such file or directory
==> default: make: *** No rule to make target /opt/oracle/product/12.1.0.2/dbhome_1/sqlplus/lib/ins_sqlplus.mk'. ==> default: make: Failed to remake makefile /opt/oracle/product/12.1.0.2/dbhome_1/sqlplus/lib/ins_sqlplus.mk'.
==> default: make: *** No rule to make target install'. ==> default: -bash: /opt/oracle/product/12.1.0.2/dbhome_1/bin/relink: No such file or directory ==> default: INSTALLER: Oracle installation fixed and relinked ==> default: -bash: netca: command not found ==> default: INSTALLER: Listener created ==> default: -bash: dbca: command not found ==> default: INSTALLER: Database created ==> default: INSTALLER: Oratab configured ==> default: Job for oracle-rdbms.service failed because the control process exited with error code. See "systemctl status oracle-rdbms.service" and "journalctl -xe" for details. ==> default: INSTALLER: Created and enabled oracle-rdbms systemd's service ==> default: INSTALLER: Installation complete

@steveswinsburg
Copy link
Owner

@Fachher comment out line 35 in the Vagrant file, the one that has oradata in it. That is causing the initial issue and is reported at #8. Please try a clean build after you do that.

@joyider, is that working fine for you? Feel free to submit a PR :)

@Fachher
Copy link

Fachher commented Oct 26, 2017

I don't know how this should fix missing file issue, but I give it a try.

UPDATE: It does not work by comment out line 35. Same error message.

@MichaelHegner
Copy link

MichaelHegner commented Nov 3, 2017

I am more software developer than administrator and currently facing same problem. Unfortunately the order in Vagrant File seems it doesn't matter when configure synced folder after shell executions.

I found on Stackoverflow a solution what seems to me a valid one, but not sure.
https://stackoverflow.com/questions/17966365/vagrant-chicken-and-egg-shared-folder-with-uid-apache-user

In the case here I changed the Vagrantfile:
config.vm.synced_folder "./oradata", "/vagrant/oradata", mount_options: ["dmode=777", "fmode=666"]

Maybe a valid solution?

EDIT: the folder are then owned by vagrant:vagrant.

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

5 participants