ZH/Problem in Installation

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

<返回中文首页>

安装问题解决方法

  • 本文目要解决安装过程中的主要问题。

#01 端口报错

  • 端口报错 Web Port 80 / SSL Port 443
  • 系统环境:
* 版本:ADempiere 3.6.0 LTS
* 操作系统:Debian Squeeze/Testing amd64
* 数据库:PostgreSQL 8.4
* JAVA虚拟机:sun-java6-jdk/jre

问题描述

  • 执行"$ sh RUN_setup.sh"后出现以下错误提示:
testPort[http,debian, 80, /]
testServerPort: 80
-----------> ConfigurationData.testServerPort: Port 80: Permission denied [11]
-----------> ConfigurationData.test: Not correct: Web Port = 80 [11]
===========> ConfigurationPanel$1.finished: Error Web Port 
(Not correct: Web Port = 80) [12]

testPort[https,debian, 443, /]
testServerPort: 443
-----------> ConfigurationData.testServerPort: Port 443: Permission denied [13]
-----------> ConfigurationData.test: Not correct: SSL Port = 443 [13]
===========> ConfigurationPanel$1.finished: Error Web Port 
(Not correct: SSL Port = 443) [12]

解决办法

 $ su
 # sh RUN_setup.sh

#02 数据库端口错误

  • 系统环境:
* 版本:ADempiere 3.6.0 LTS
* 操作系统:Debian Squeeze/Testing amd64
* 数据库:PostgreSQL 8.4
* JAVA虚拟机:sun-java6-jdk/jre

问题描述

  • 执行"# sh RUN_setup.sh"后出现以下错误提示:
14:45:20.759 Config.test: OK: Database Server = /127.0.0.1 [17]
**testPort[127.0.0.1, 5432]**
-----------> ConfigurationData.testPort: Open Socket localhost/127.0.0.1:5432 - Network is unreachable [17]
-----------> ConfigurationData.test: DB Server Port = 5432 [17]
===========> ConfigurationPanel$1.finished: Error Database Port 
(DB Server Port = 5432) [12]

故障排查

利用pgAdmin进行连接[127.0.0.1, 5432],连接成功。因此可以排除PostgreSQL数据库设置的问题。 在Google上对以下关键词搜索:"Network is unreachable", "Debian". 终于发现是Debian的Bug。

Debian Bug report logs - #560044
sun-java6-jre: net.ipv6.bindv6only=1 breaks java networking

解决方法

  • 方法一,执行以下命令:
#sed -i 's/net.ipv6.bindv6only\ =\ 1/net.ipv6.bindv6only\ =\ 0/' \
/etc/sysctl.d/bindv6only.conf &&  invoke-rc.d procps restart
  • 方法二,JVM不采用java-sun-jdk,改用openjdk。


#03 数据库密码验证错误

  • 错误提示关键信息:
 RUN_ImportAdempiere FATAL password authentication failed 
  • 系统环境:
* 版本:ADempiere 3.6.0 LTS
* 操作系统:Debian Squeeze/Testing amd64
* 数据库:PostgreSQL 8.4
* JAVA虚拟机:sun-java6-jdk/jre

问题描述

  • 执行"# sh RUN_ImportAdempiere.sh"后出现以下错误提示:
root:/usr/adempiere/utils# sh RUN_ImportAdempiere.sh
Adempiere Database Import : 1.10 $
Importing Adempiere DB from /usr/adempiere/data/Adempiere_pg.dmp
-------------------------------------
Recreate user and database
-------------------------------------
dropdb: **could not connect to database postgres: FATAL:  password authentication failed for user "postgres"**
FATAL:  password authentication failed for user "postgres"
dropuser: could not connect to database postgres: FATAL:  password authentication failed for user "postgres"
FATAL:  password authentication failed for user "postgres"
psql: FATAL:  password authentication failed for user "postgres"
FATAL:  password authentication failed for user "postgres"
createdb: could not connect to database postgres: FATAL:  password authentication failed for user "adempiere"
FATAL:  password authentication failed for user "adempiere"
-------------------------------------
Import Adempiere_pg.dmp
-------------------------------------
psql: FATAL:  password authentication failed for user "adempiere"
FATAL:  password authentication failed for user "adempiere"
psql: FATAL:  password authentication failed for user "adempiere"
FATAL:  password authentication failed for user "adempiere"
psql: FATAL:  password authentication failed for user "adempiere"
FATAL:  password authentication failed for user "adempiere"

解决方法

  • 我原本以为不会用上IPv6,于是没有改IPv6的md5,后来报错,改为trust之后就没问题了,这里有点奇怪。
# nano /etc/postgresql/8.4/main/pg_hba.conf
  • 将里面所有的验证方式改为trust。
 # IPv6 local connections:
 host    all         all         ::1/128               md5


#04 局域网内无法访问JBOSS服务器

  • 局域网内无法访问JBOSS服务器,本机也无法通过局域网IP访问,只能通过内部IP:127.0.1.1来访问。
  • 版本:ADempiere 3.6.0 LTS

故障分析

  • JBOSS 4.2以上版本服务启动如果不加任何参数的话,只监听127.0.0.1。就是说只能用127.0.0.1或者localhost访问。用本机的对外地址访问不了,同一网络内别的计算机也无法访问。需要设置JBOSS,以监听本机所有IP地址。

解决方法

  • 方法一,在启动的快截方式的命令中加入:run -b 局域网ip。
  • 方法二,修改server.xml配置文件。
    • 文件位于.adempiere/jboss/server/adempiere/deploy/jboss-web.deployer/。
    • 将以下这行的address改成对应的IP或者0.0.0.0就可以了。
 <Connector port="80" address="${jboss.bind.address}"  


#05 局域网客户端数据库连接

  • 故障现象:客户端Test Database无法通过
  • 系统环境
* 版本:ADempiere 3.6.0 LTS
* 操作系统:Debian Squeeze/Testing amd64
* 数据库:PostgreSQL 8.4
* JAVA虚拟机:sun-java6-jdk/jre

解决方法

  • 第一步,修改pg_hba.conf装置文件
#cd /etc/postgresql/8.4/main/
#nano pg_hba.conf
  • 原有内容:
# IPv4 local connections:
host    all         all         127.0.0.1/32        trust
  • 现在改为:
# IPv4 local connections:
host    all         all         127.0.0.1/32        trust
host    all         all         192.168.1.1/24      trust
  • 备注1:“127.0.0.1/32”中的32表示该IP被完全固定。
  • 备注2:“192.168.1.1/24”中的24表示该IP前3位固定,最后一位自由设定。
  • 第二步,修改postgresql.conf装置文件,让PostgreSQL监听所有IP地址的连接。
    • 找到“#listen_addresses = 'localhost'”,改成“listen_addresses = '*'”。
#cd /etc/postgresql/8.4/main/
#cp postgresql.conf postgresql_backup.conf
#nano postgresql.conf
  • 第三步,重启postgresql服务。
 #/etc/init.d/postgresql restart