首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用2模块在icinga2上失败

使用2模块在icinga2上失败
EN

Server Fault用户
提问于 2016-01-08 19:18:36
回答 1查看 258关注 0票数 0

我试着用流浪者为icinga2打开一个盒子,我用的是来自https://github.com/Icinga/puppet-icinga2/tree/v0.6.2的傀儡2。

所以我有一个角色如下所示

代码语言:javascript
复制
class role::icinga2_server {

class { 'postgresql::server':
      ip_mask_deny_postgres_user => '0.0.0.0/32',
      ip_mask_allow_all_users    => '0.0.0.0/0',
      listen_addresses           => 'localhost',
      postgres_password          => 'password',}

postgresql::server::db {
        'icinga2_data':
        user => 'icinga2',
        password => 'password'
}



class { 'icinga2::server':
      server_db_type => 'pgsql',
      db_host => 'localhost',
      db_port => '5432',
      db_name => 'icinga2_data',
      db_user => 'icinga2',
      db_password => 'password',
 }
}

因此,当我提供的盒子,我得到postgres的所有通过傀儡(使用傀儡-postgres模块),然后傀儡抛出错误

代码语言:javascript
复制
==> centos7: Notice: /Stage[main]/Vagrant/Group[vagrant]/gid: gid changed '1000' to '500'
==> centos7: Debug: /Stage[main]/Vagrant/Group[vagrant]: The container Class[Vagrant] will propagate my refresh event
==> centos7: Debug: Exec[postgres_schema_load](provider=posix): Executing 'su - postgres -c 'export PGPASSWORD='\''password'\'' && psql -U icinga2 -h localhost -d icinga2_data < /usr/share/icinga2-ido-pgsql/schema/pgsql.sql' && export PGPASSWORD='' && touch /etc/icinga2/postgres_schema_loaded.txt'
==> centos7: Debug: Executing 'su - postgres -c 'export PGPASSWORD='\''password'\'' && psql -U icinga2 -h localhost -d icinga2_data < /usr/share/icinga2-ido-pgsql/schema/pgsql.sql' && export PGPASSWORD='' && touch /etc/icinga2/postgres_schema_loaded.txt'
==> centos7: Notice: /Stage[main]/Icinga2::Server::Install::Execs/Exec[postgres_schema_load]/returns: psql: could not connect to server: Connection refused
==> centos7: Notice: /Stage[main]/Icinga2::Server::Install::Execs/Exec[postgres_schema_load]/returns:   Is the server running on host "localhost" (::1) and accepting
==> centos7: Notice: /Stage[main]/Icinga2::Server::Install::Execs/Exec[postgres_schema_load]/returns:   TCP/IP connections on port 5432?
==> centos7: Notice: /Stage[main]/Icinga2::Server::Install::Execs/Exec[postgres_schema_load]/returns: could not connect to server: Connection refused
==> centos7: Notice: /Stage[main]/Icinga2::Server::Install::Execs/Exec[postgres_schema_load]/returns:   Is the server running on host "localhost" (192.168.10.131) and accepting
==> centos7: Notice: /Stage[main]/Icinga2::Server::Install::Execs/Exec[postgres_schema_load]/returns:   TCP/IP connections on port 5432?
==> centos7: Error: su - postgres -c 'export PGPASSWORD='\''password'\'' && psql -U icinga2 -h localhost -d icinga2_data < /usr/share/icinga2-ido-pgsql/schema/pgsql.sql' && export PGPASSWORD='' && touch /etc/icinga2/postgres_schema_loaded.txt returned 2 instead of one of [0]

我看到错误,说明psql不能连接,但当我把我的流浪盒,ssh,我看到postgres安装运行和监听良好。我也可以使用psql进行连接,但是but无法在postgres上创建模式,就像调试输出中所看到的那样。

我还对postgres模式加载进行了登录并执行了相同的命令,并且运行良好。

为什么木偶无法加载模式?

EN

回答 1

Server Fault用户

发布于 2016-01-12 13:47:11

这个模块的发行版本真的很老,而且也不是很好。

首先,您应该尝试一下我们当前的开发状态,目前还处于一个叫做“开发”的分支中。

在我们达到一个可释放的状态之前,还有一些事情要做(在清理和破坏更改方面)。

你应该看看路线图

票数 -1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/747754

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档