hilverd / vagrant-ubuntu-oracle-xe

Install Oracle 11g XE in a Vagrant virtual machine running Ubuntu 12.04.
MIT License
287 stars 96 forks source link

run dos2unix on config files to ensure proper eol? #7

Closed dotbombjoe closed 10 years ago

dotbombjoe commented 10 years ago

First, thanks for putting this out there -- it has proven very handy.

Just thought I'd make a quick note that I ran into issues when I installed this onto a windows box. I think my git is set up to convert end of lines to windows format on checkout and this causes the provisioner to choke on those files and fail.

Not sure if anyone cares since this is as much an issue about folks' git configurations as anything else but if you wanted to ensure it worked on all platforms you could probably just run each of the unix files through dos2unix or something just to ensure unix EOLs... Or maybe just comment on the Readme?

mrmanc commented 10 years ago

I also encountered this problem under Windows, and it wasn't obvious what was wrong until I trailed through the output to the step that had failed ("set up shm" in init.pp) and attempted to run the command manually:

vagrant@oracle:~$ /etc/rc2.d/S01shm_load start -bash: /etc/rc2.d/S01shm_load: /bin/sh^M: bad interpreter: No such file or directory

This was fixed by running git config --global core.autocrlf false (https://help.github.com/articles/dealing-with-line-endings).

Here's my output that was failing for reference. See the line that says err: /Stage[main]/Oracle::Server/Exec[set up shm]/returns: change from notrun to 0 failed: /etc/rc2.d/S01shm_load start returned 1 instead of one of [0] at /tmp/vagrant-puppet/modules-0/oracle/manifests/init.pp:48 this for the clue.

Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise64'...

[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 1521 => 1521 (adapter 1)
[default] Running 'pre-boot' VM customizations...
[default] Booting VM...
[default] Configuring proxy for Apt...
[default] Configuring proxy environment variables...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] Setting hostname...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0
[default] Running provisioner: shell...
[default] Running: inline script
stdin: is not a tty
America/New_York

Current default time zone: 'America/New_York'
Local time is now:      Wed Nov 20 06:52:24 EST 2013.
Universal Time is now:  Wed Nov 20 11:52:24 UTC 2013.

[default] Running provisioner: puppet...
Running Puppet with base.pp...
stdin: is not a tty
warning: Could not retrieve fact fqdn
warning: Host is missing hostname and/or domain: oracle
info: Applying configuration version '1384948347'
notice: /Stage[main]/Oracle::Swap/Exec[create swapfile]/returns: executed successfully
notice: /Stage[main]/Oracle::Swap/Exec[add swapfile entry to fstab]/returns: executed successfully
notice: /Stage[main]/Oracle::Server/Exec[apt-update]/returns: executed successfully
notice: /Stage[main]/Oracle::Server/User[syslog]/groups: groups changed '' to 'adm,syslog'
notice: /Stage[main]/Oracle::Server/File[/etc/rc2.d/S01shm_load]/ensure: defined content as '{md5}2474efbd78003310ac817899c7985e29'
notice: /Stage[main]/Oracle::Server/Package[rlwrap]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Oracle::Server/Package[unixodbc]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Oracle::Server/Package[alien]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Oracle::Swap/Exec[set up swapfile]/returns: executed successfully
notice: /Stage[main]/Oracle::Xe/File[/bin/awk]/ensure: created
notice: /Stage[main]/Oracle::Xe/File[/home/vagrant/oracle-xe-11.2.0-1.0.x86_64.rpm.zip]/ensure: defined content as '{md5}dd7881a55569d890241f11cd0eeb7d48'
notice: /Stage[main]/Oracle::Xe/File[/var/lock/subsys]/ensure: created
notice: /Stage[main]/Oracle::Xe/File[/var/lock/subsys/listener]/ensure: created
notice: /Stage[main]/Oracle::Xe/File[/tmp/xe.rsp]/ensure: defined content as '{md5}468fed182e8c8e13a4c132bafe998463'
notice: /Stage[main]/Oracle::Server/File[/sbin/chkconfig]/ensure: defined content as '{md5}8fb91df355d59635f7669668816bc129'
notice: /Stage[main]/Oracle::Server/Package[libaio1]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Oracle::Server/Package[bc]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Oracle::Xe/File[/etc/profile.d/oracle-env.sh]/ensure: defined content as '{md5}e10ac9cfd22a648c0e7c5f18b4f19aab'
notice: /Stage[main]/Oracle::Swap/File[/swapfile]/mode: mode changed '0644' to '0600'
notice: /Stage[main]/Oracle::Swap/Exec[enable swapfile]/returns: executed successfully
notice: /Stage[main]/Oracle::Server/Package[unzip]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[main]/Oracle::Xe/Exec[unzip xe]/returns: executed successfully
notice: /Stage[main]/Oracle::Xe/Exec[alien xe]/returns: executed successfully
notice: /Stage[main]/Oracle::Xe/Package[oracle-xe]/ensure: ensure changed 'purged' to 'latest'
notice: /Stage[main]/Oracle::Server/File[/etc/sysctl.d/60-oracle.conf]/ensure: defined content as '{md5}85af7d80c93af01eff15b57e276f268a'
info: /Stage[main]/Oracle::Server/File[/etc/sysctl.d/60-oracle.conf]: Scheduling refresh of Exec[procps]
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/parameter.rb:165:in `fail'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/type/exec.rb:125:in `sync'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/transaction/resource_harness.rb:114:in `apply_parameter'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/transaction/resource_harness.rb:62:in `perform_changes'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/transaction/resource_harness.rb:60:in `each'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/transaction/resource_harness.rb:60:in `perform_changes'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/transaction/resource_harness.rb:133:in `evaluate'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/transaction.rb:49:in `apply'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/transaction.rb:84:in `eval_resource'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/transaction.rb:104:in `evaluate'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/util.rb:493:in `thinmark'
/opt/vagrant_ruby/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/util.rb:492:in `thinmark'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/transaction.rb:104:in `evaluate'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/transaction.rb:386:in `traverse'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/transaction.rb:99:in `evaluate'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/resource/catalog.rb:141:in `apply'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/configurer.rb:122:in `retrieve_and_apply_catalog'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/util.rb:161:in `benchmark'
/opt/vagrant_ruby/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/util.rb:160:in `benchmark'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/configurer.rb:121:in `retrieve_and_apply_catalog'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/configurer.rb:152:in `run'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/application/apply.rb:229:in `main'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/application/apply.rb:149:in `run_command'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/application.rb:309:in `run'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/application.rb:416:in `hook'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/application.rb:309:in `run'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/application.rb:407:in `exit_on_fail'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/application.rb:309:in `run'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/lib/puppet/util/command_line.rb:69:in `execute'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/puppet-2.7.19/bin/puppet:4
/opt/vagrant_ruby/bin/puppet:19:in `load'
/opt/vagrant_ruby/bin/puppet:19
err: /Stage[main]/Oracle::Server/Exec[set up shm]/returns: change from notrun to 0 failed: /etc/rc2.d/S01shm_load start returned 1 instead of one of [0] at /tmp/vagrant-puppet/modules-0/oracle/manifests/init.pp:48
notice: /Stage[main]/Oracle::Xe/Exec[configure xe]: Dependency Exec[set up shm] has failures: true
warning: /Stage[main]/Oracle::Xe/Exec[configure xe]: Skipping because of failed dependencies
notice: /Stage[main]/Oracle::Xe/Service[oracle-xe]: Dependency Exec[set up shm] has failures: true
warning: /Stage[main]/Oracle::Xe/Service[oracle-xe]: Skipping because of failed dependencies
notice: /Stage[main]/Oracle::Server/Exec[procps]: Triggered 'refresh' from 1 events
notice: /Stage[main]//Node[oracle]/User[vagrant]: Dependency Exec[set up shm] has failures: true
warning: /Stage[main]//Node[oracle]/User[vagrant]: Skipping because of failed dependencies
info: Creating state file /var/lib/puppet/state/state.yaml
notice: Finished catalog run in 309.51 seconds
hilverd commented 10 years ago

Sorry it has taken me so long to respond to this :-(. I have followed your suggestion and am running the files through dos2unix now. I don't have a Windows machine to test this on but I'm assuming it will do the trick. Many thanks to you both for your help.