Open jonbartlett opened 7 years ago
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.
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.
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 :)
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
`
@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 :)
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.
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.
Vagrant is attempting to mount "/vagrant/oradata" as user oracle before the user is created. This causes the provisioning to fail.