Firefox version check fails on Redhat 7
fletchowns opened this issue · 1 comments
fletchowns commented
Cookbook Version: 3.0.1
Chef Version: 12.20.3
Operating System: Redhat 7.2 on AWS
Attributes:
default["mozilla_firefox"]["version"] = "latest"
default["mozilla_firefox"]["use_package_manager"] = false
default["mozilla_firefox"]["force_32bit"] = false
My converge failed:
Recipe: mozilla_firefox::default
* mozilla_firefox[latest] action install[2017-10-26T14:51:08-04:00] INFO: Processing mozilla_firefox[latest] action install (mozilla_firefox::default line 1)
* remote_file[/tmp/kitchen/cache/firefox-56.0.2.tar.bz2] action create[2017-10-26T14:51:08-04:00] INFO: Processing remote_file[/tmp/kitchen/cache/firefox-56.0.2.tar.bz2] action create (/tmp/kitchen/cache/cookbooks/mozilla_firefox/providers/default.rb line 119)
[2017-10-26T14:51:12-04:00] INFO: remote_file[/tmp/kitchen/cache/firefox-56.0.2.tar.bz2] created file /tmp/kitchen/cache/firefox-56.0.2.tar.bz2
- create new file /tmp/kitchen/cache/firefox-56.0.2.tar.bz2[2017-10-26T14:51:12-04:00] INFO: remote_file[/tmp/kitchen/cache/firefox-56.0.2.tar.bz2] updated file contents /tmp/kitchen/cache/firefox-56.0.2.tar.bz2
- update content in file /tmp/kitchen/cache/firefox-56.0.2.tar.bz2 from none to 547b60
(file sizes exceed 10000000 bytes, diff output suppressed)
- restore selinux security context
* yum_package[bzip2] action install[2017-10-26T14:51:13-04:00] INFO: Processing yum_package[bzip2] action install (/tmp/kitchen/cache/cookbooks/mozilla_firefox/providers/default.rb line 127)
[2017-10-26T14:51:14-04:00] INFO: yum_package[bzip2] installing bzip2-1.0.6-13.el7 from rhui-REGION-rhel-server-releases repository
[2017-10-26T14:51:17-04:00] INFO: yum_package[bzip2] installed bzip2 at 1.0.6-13.el7
- install version 1.0.6-13.el7 of package bzip2
* yum_package[gtk3-devel] action install[2017-10-26T14:51:17-04:00] INFO: Processing yum_package[gtk3-devel] action install (/tmp/kitchen/cache/cookbooks/mozilla_firefox/providers/default.rb line 127)
[2017-10-26T14:51:18-04:00] INFO: yum_package[gtk3-devel] installing gtk3-devel-3.22.10-4.el7 from rhui-REGION-rhel-server-releases repository
[2017-10-26T14:52:07-04:00] INFO: yum_package[gtk3-devel] installed gtk3-devel at 3.22.10-4.el7
- install version 3.22.10-4.el7 of package gtk3-devel
* yum_package[GConf2-devel] action install[2017-10-26T14:52:07-04:00] INFO: Processing yum_package[GConf2-devel] action install (/tmp/kitchen/cache/cookbooks/mozilla_firefox/providers/default.rb line 127)
[2017-10-26T14:52:08-04:00] INFO: yum_package[GConf2-devel] installing GConf2-devel-3.2.6-8.el7 from rhui-REGION-rhel-server-optional repository
[2017-10-26T14:52:16-04:00] INFO: yum_package[GConf2-devel] installed GConf2-devel at 3.2.6-8.el7
- install version 3.2.6-8.el7 of package GConf2-devel
* yum_package[dbus-glib-devel] action install[2017-10-26T14:52:16-04:00] INFO: Processing yum_package[dbus-glib-devel] action install (/tmp/kitchen/cache/cookbooks/mozilla_firefox/providers/default.rb line 127)
[2017-10-26T14:52:17-04:00] INFO: yum_package[dbus-glib-devel] installing dbus-glib-devel-0.100-7.el7 from rhui-REGION-rhel-server-releases repository
[2017-10-26T14:52:20-04:00] INFO: yum_package[dbus-glib-devel] installed dbus-glib-devel at 0.100-7.el7
- install version 0.100-7.el7 of package dbus-glib-devel
* yum_package[alsa-lib-devel] action install[2017-10-26T14:52:20-04:00] INFO: Processing yum_package[alsa-lib-devel] action install (/tmp/kitchen/cache/cookbooks/mozilla_firefox/providers/default.rb line 127)
[2017-10-26T14:52:21-04:00] INFO: yum_package[alsa-lib-devel] installing alsa-lib-devel-1.1.3-3.el7 from rhui-REGION-rhel-server-releases repository
[2017-10-26T14:52:27-04:00] INFO: yum_package[alsa-lib-devel] installed alsa-lib-devel at 1.1.3-3.el7
- install version 1.1.3-3.el7 of package alsa-lib-devel
* yum_package[pulseaudio-libs-devel] action install[2017-10-26T14:52:27-04:00] INFO: Processing yum_package[pulseaudio-libs-devel] action install (/tmp/kitchen/cache/cookbooks/mozilla_firefox/providers/default.rb line 127)
[2017-10-26T14:52:27-04:00] INFO: yum_package[pulseaudio-libs-devel] installing pulseaudio-libs-devel-10.0-3.el7 from rhui-REGION-rhel-server-releases repository
[2017-10-26T14:52:39-04:00] INFO: yum_package[pulseaudio-libs-devel] installed pulseaudio-libs-devel at 10.0-3.el7
- install version 10.0-3.el7 of package pulseaudio-libs-devel
* directory[/opt/firefox/56.0.2_en-US] action create[2017-10-26T14:52:39-04:00] INFO: Processing directory[/opt/firefox/56.0.2_en-US] action create (/tmp/kitchen/cache/cookbooks/mozilla_firefox/providers/default.rb line 69)
[2017-10-26T14:52:39-04:00] INFO: directory[/opt/firefox/56.0.2_en-US] created directory /opt/firefox/56.0.2_en-US
- create new directory /opt/firefox/56.0.2_en-US
- restore selinux security context
* execute[untar-firefox] action run[2017-10-26T14:52:39-04:00] INFO: Processing execute[untar-firefox] action run (/tmp/kitchen/cache/cookbooks/mozilla_firefox/providers/default.rb line 73)
[2017-10-26T14:52:52-04:00] INFO: execute[untar-firefox] ran successfully
- execute tar --strip-components=1 -xjf /tmp/kitchen/cache/firefox-56.0.2.tar.bz2 -C /opt/firefox/56.0.2_en-US
* link[/usr/bin/firefox] action create[2017-10-26T14:52:52-04:00] INFO: Processing link[/usr/bin/firefox] action create (/tmp/kitchen/cache/cookbooks/mozilla_firefox/providers/default.rb line 132)
[2017-10-26T14:52:52-04:00] INFO: link[/usr/bin/firefox] created
- create symlink at /usr/bin/firefox to /opt/firefox/56.0.2_en-US/firefox
================================================================================
Recipe Compile Error in /tmp/kitchen/cache/cookbooks/selenium_grid/recipes/node.rb
================================================================================
NoMethodError
-------------
undefined method `[]' for nil:NilClass
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/mozilla_firefox/libraries/default.rb:24:in `firefox_version'
/tmp/kitchen/cache/cookbooks/selenium_grid/recipes/node.rb:37:in `from_file'
Relevant File Content:
----------------------
/tmp/kitchen/cache/cookbooks/mozilla_firefox/libraries/default.rb:
17: firefox_shellout('iceweasel -v').match(/Mozilla Firefox (.*)/)[1]
18: rescue
19: firefox_shellout('firefox -v').match(/Mozilla Firefox (.*)/)[1]
20: end
21: when 'mac_os_x'
22: firefox_shellout('/Applications/Firefox.app/Contents/MacOS/firefox -v')
23: else
24>> firefox_shellout('firefox -v').match(/Mozilla Firefox (.*)/)[1]
25: end
26: end
27:
28: # private
29:
30: def firefox_shellout(command)
31: cmd = Mixlib::ShellOut.new(command)
32: cmd.run_command
33: cmd.stdout.strip
Platform:
---------
x86_64-linux
Running handlers:
[2017-10-26T14:52:52-04:00] ERROR: Running exception handlers
[2017-10-26T14:52:52-04:00] ERROR: Report handler MailHandler raised #<NoMethodError: undefined method `each' for nil:NilClass>
[2017-10-26T14:52:52-04:00] ERROR: (erubis):9:in `block in evaluate'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `instance_eval'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/erubis-2.7.0/lib/erubis/evaluator.rb:74:in `evaluate'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-handler-mail-0.1.2/lib/chef/handler/mail.rb:48:in `report'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/handler.rb:259:in `run_report_unsafe'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/handler.rb:247:in `run_report_safely'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/handler.rb:151:in `block in run_exception_handlers'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/handler.rb:149:in `each'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/handler.rb:149:in `run_exception_handlers'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/handler.rb:160:in `block in <class:Handler>'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/client.rb:455:in `block in run_failed'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/client.rb:454:in `each'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/client.rb:454:in `run_failed'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/client.rb:316:in `rescue in run'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/client.rb:323:in `run'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/application.rb:295:in `block in fork_chef_client'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/application.rb:283:in `fork'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/application.rb:283:in `fork_chef_client'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/application.rb:248:in `block in run_chef_client'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/local_mode.rb:44:in `with_server_connectivity'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/application.rb:236:in `run_chef_client'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/application/client.rb:464:in `sleep_then_run_chef_client'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/application/client.rb:451:in `block in interval_run_chef_client'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/application/client.rb:450:in `loop'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/application/client.rb:450:in `interval_run_chef_client'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/application/client.rb:434:in `run_application'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/application.rb:59:in `run'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/bin/chef-client:26:in `<top (required)>'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/bin/chef-client:57:in `load'
[2017-10-26T14:52:52-04:00] ERROR: /opt/chef/bin/chef-client:57:in `<main>'
- MailHandler
Running handlers complete
[2017-10-26T14:52:52-04:00] ERROR: Exception handlers complete
Chef Client failed. 30 resources updated in 09 minutes 20 seconds
[2017-10-26T14:52:52-04:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2017-10-26T14:52:52-04:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-10-26T14:52:52-04:00] ERROR: undefined method `[]' for nil:NilClass
[2017-10-26T14:52:52-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Here's what I see when I run the command manually:
[ec2-user@ip-10-0-0-82 ~]$ firefox --version
XPCOMGlueLoad error for file /opt/firefox/56.0.2_en-US/libxul.so:
libXt.so.6: cannot open shared object file: No such file or directory
Couldn't load XPCOM.
I installed libXt manually as a workaround:
[ec2-user@ip-10-0-0-82 ~]$ sudo yum install libXt
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Resolving Dependencies
--> Running transaction check
---> Package libXt.x86_64 0:1.1.5-3.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==============================================================================================================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================================================================================================
Installing:
libXt x86_64 1.1.5-3.el7 rhui-REGION-rhel-server-releases 173 k
Transaction Summary
==============================================================================================================================================================================================================================================
Install 1 Package
Total download size: 173 k
Installed size: 420 k
Is this ok [y/d/N]: y
Downloading packages:
libXt-1.1.5-3.el7.x86_64.rpm | 173 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libXt-1.1.5-3.el7.x86_64 1/1
Verifying : libXt-1.1.5-3.el7.x86_64 1/1
Installed:
libXt.x86_64 0:1.1.5-3.el7
Complete!
Now it seems to work fine:
[ec2-user@ip-10-0-0-82 ~]$ firefox --version
Mozilla Firefox 56.0.2
dhoer commented
Are you interested in adopting this cookbook or being a collaborator?