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

Could not evaluate: undefined method `+' for nil:NilClass #134

Closed
bastelfreak opened this issue Nov 17, 2015 · 2 comments
Closed

Could not evaluate: undefined method `+' for nil:NilClass #134

bastelfreak opened this issue Nov 17, 2015 · 2 comments

Comments

@bastelfreak
Copy link
Member

My zabbixserver/web node fails during a puppet run:

[root@zabbix01 ~]# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for zabbix01..de
Warning: Found multiple default providers for kernel_parameter: grub2, grub; using grub2
Info: Applying configuration version '1447769567'
Error: /Stage[main]/Zabbix::Resources::Agent/Zabbix_host[zabbix01..de]: Could not evaluate: undefined method `+' for nil:NilClass
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[loadbalancer1..de]: Could not evaluate: undefined method `+' for nil:NilClass
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[loadbalancer2..de]: Could not evaluate: undefined method `+' for nil:NilClass
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[clusternode3..de]: Could not evaluate: undefined method `+' for nil:NilClass
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[puppet-master1..de]: Could not evaluate: undefined method `+' for nil:NilClass
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[puppet-db1..de]: Could not evaluate: undefined method `+' for nil:NilClass
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[postgres01..de]: Could not evaluate: undefined method `+' for nil:NilClass
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[es1..de]: Could not evaluate: undefined method `+' for nil:NilClass
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[puppet..de]: Could not evaluate: undefined method `+' for nil:NilClass
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[clusternode4..de]: Could not evaluate: undefined method `+' for nil:NilClass
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[clusternode2..de]: Could not evaluate: undefined method `+' for nil:NilClass
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[puppet-master2..de]: Could not evaluate: undefined method `+' for nil:NilClass
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[clusternode1..de]: Could not evaluate: undefined method `+' for nil:NilClass
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_host[es3..de]: Could not evaluate: undefined method `+' for nil:NilClass
Notice: Finished catalog run in 10.73 seconds
[root@zabbix01 ~]#

His profile:

class profiles::zabbixserver {
  class {'::postgresql::globals':
    encoding            => 'UTF-8',
    locale              => 'en_US.UTF-8',
    manage_package_repo => true,
    version             => '9.4',
  }->
  class {'::postgresql::client': } ->
  class {'::zabbix::server':
    zabbix_version    => '2.4',
    database_host     => '10.111.2.51',
    database_name     => 'zabbixdb',
    database_user     => 'zabbix',
    database_password => 'foo',
  }
  class {'::zabbix::web':
    manage_vhost          => false,
    zabbix_timezone       => 'Europe/Berlin',
    manage_resources      => true,
    database_host         => '10.111.2.51',
    database_name         => 'zabbixdb',
    database_user         => 'zabbix',
    database_password     => 'foo',
    zabbix_server         => '10.111.2.50',
    zabbix_api_user       => 'Admin',
    zabbix_api_pass       => 'foo',
    zabbix_package_state  => 'latest',
    zabbix_version        => '2.4',
  }
}

Agent profile:

  class { '::zabbix::agent':
    server                => '10.111.2.50',
    zabbix_package_state  => 'latest',
    zabbix_version        => '2.4',
    manage_resources      => true,
  }

Running everything on CentOS 7, do you have any ideas why this is failling?

@bastelfreak
Copy link
Member Author

The webserver wasn't running successfully, I fixed that and now the error is gone.

@Sher-Chowdhury
Copy link

Hi Bastelfreak,

I'm getting the same error message. Can you recall what you did to get the webserver running successfully?

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