Chinaunix首页 | 论坛 | 博客
  • 博客访问: 62793
  • 博文数量: 23
  • 博客积分: 1440
  • 博客等级: 上尉
  • 技术积分: 235
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-29 09:53
文章分类

全部博文(23)

文章存档

2009年(2)

2008年(2)

2007年(19)

我的朋友

分类:

2007-07-15 10:30:39

opennms+email+opennms连不上数据库

安装好opennms以后默认是不能发送邮件的,即使能发送邮件也得不到有效的数据。可以通过一下方式修改配置。
确定opennms/share/reports/和opennms/logs/reports.log存在,如果不存在自己建一个文件夹和一个文档。
确定ghostscript fonts 和xorg-xll-deprecated-libs两个包都存在。
chgrp -R  root  $OPENNMS_HOME/share/reports/
chmod -R g+w $OPENNMS_HOME/share/reports/
root是tomcat的用户名chgrp是改变目录的所属群组,chmod是改变目录的属性
然后更改opennms/etc/javamail-configuration.properties
################################################################################
# This file is the configuration for the the JavaMailer class. It is used to
# specify the details of the JavaMailer system properties
################################################################################
#
# Properties are defined but commented out indicating the default values.
#

#
# This property defines system sender account.
#
# The default setting is root@[127.0.0.1]
org.opennms.core.utils.fromAddress=root@[127.0.0.1]

#
# This property defines SMTP Host.
#
org.opennms.core.utils.mailHost=127.0.0.1
org.opennms.core.utils.mailer=smtpsend
org.opennms.core.utils.transport=smtp
org.opennms.core.utils.debug=true
#
# This property defines Mail authentication.
# The default setting is false
org.opennms.core.utils.authenticate=false
org.opennms.core.utils.authenticateUser="opennms"
org.opennms.core.utils.authenticatePassword="opennms"

# This property controls the use of the JMTA, the
# default is true
org.opennms.core.utils.useJMTA=false

以上参考了
我在设置时可能是
javamail-configuration.properties

没有配置好结果不能发送邮件。

另外,昨天下午,我玩另外一个软件时,无意把机器的名称给该了,结果opennms连不上数据库。发帖请求帮组
还是解决不了,原以为两个软件不兼容,就删除了我玩的软件。结果还是不行,试过很多方法就是搞不定,
我在终端敲命令是发现已经不是[root@localhost]$了而是[root@mt]感觉问题出在这里。果然,当更改了机器名以后
opennms乖乖的运行了。
opennms连不上数据库,一般情况下是data下的pg_hba.conf文件配置的问题。

数据库配置还可以添加本机的权限

host all all ::1/32 trust

host all all 127.0.0.1/32 trust

不过也不排除是其它方面的原因。
不过当出现这种情况,去看数据库的日志文件是解决问题的开始与捷径。

阅读(1364) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~