2014-03-05 132 views
0

我有Tryton ERP在本地虚拟机上工作,运行正常。Tryton客户端无法通过Internet端口8000连接

但是,客户端无法通过互联网连接到它。

nmap报告端口8000被“关闭”,也就是说,在那里没有任何东西在监听。

~# nmap -PN -p 8000 <IP> 

Starting Nmap 5.21 (http://nmap.org) at 2014-03-05 12:29 EST 
Nmap scan report for <IP> 
Host is up (0.00017s latency). 
PORT  STATE SERVICE 
8000/tcp closed http-alt 

但是,我trytond.conf文件看起来是正确的,有

jsonrpc = *:8000 

与数据库连接参数。 (在Azure上以类似方式设置的另一个虚拟机正常工作。) 完整连接文件如下。

据我所知,netstat的报告说,它是只监听本地主机的8000端口:

~# netstat -tupan | grep 8000 
tcp  0  0 127.0.0.1:8000   0.0.0.0:*    LISTEN  
     10051/python 
tcp  0  0 127.0.0.1:8000   127.0.0.1:58296   ESTABLISHED 
     10051/python 
tcp  0  0 127.0.0.1:58296   127.0.0.1:8000   ESTABLISHED  
     13842/python 

因为我的其他VM这里的一切都很好,使用netstat输出不同的是:

[email protected]:~# netstat -tupan | grep 8000 
tcp6  0  0 :::8000     :::*     LISTEN 
     1310/python 

但是我做错了什么? 我唯一的参考点就是trytond.conf文件,对吧?

这就是:

#This file is part of Tryton. The COPYRIGHT file at the top level of 
#this repository contains the full copyright notices and license terms. 
[options] 

# Activate the json-rpc protocol 
jsonrpc = *:8000 
#ssl_jsonrpc = False 

# This is the hostname used when generating tryton URI 
#hostname_jsonrpc = 

# Configure the path of json-rpc data 
#jsondata_path = /var/www/localhost/tryton 

# Activate the xml-rpc protocol 
#xmlrpc = *:8069 
#ssl_xmlrpc = False 

# Activate the webdav protocol 
#webdav = *:8080 
#ssl_webdav = False 

# This is the hostname used when generating WebDAV URI 
#hostname_webdav = 

# Configure the database type 
# allowed values are postgresql, sqlite, mysql 
db_type = postgresql 

# Configure the database connection 
# # Note: Only databases owned by db_user will be displayed in the connection dialog 
# # of the Tryton client. db_user must have create permission for new databases 
# # to be able to use automatic database creation with the Tryton client. 
db_host = localhost 
db_port = 5432 
db_user = postgres 
db_password = postgres_password 
db_minconn = 1 
db_maxconn = 64 

# Configure the postgresql path for the executable 
#pg_path = None 

# Configure the Tryton server password 
admin_passwd = admin_password 

# Configure the path of the files for the pid and the logs 
#pidfile = False 
#logfile = False 

#privatekey = server.pem 
#certificate = server.pem 

# Configure the SMTP connection 
#smtp_server = localhost 
#smtp_port = 25 
#smtp_ssl = False 
#smtp_tls = False 
#smtp_password = False 
#smtp_user = False 
#smtp_default_from_email = False 

# Configure the path to store attachments and sqlite database 
data_path = /var/lib/tryton 

# Allow to run more than one instance of trytond 
#multi_server = False 

# Configure the session timeout (inactivity of the client in sec) 
#session_timeout = 600 

# Enable auto-reload of modules if changed 
#auto_reload = True 

# Prevent database listing 
#prevent_dblist = False 

# Enable cron 
# cron = True 

# unoconv connection 
#unoconv = pipe,name=trytond;urp;StarOffice.ComponentContext 

# Number of retries on database operational error 
# retry = 5 

# Default language code 
# language = en_US 

# Timezone of the server 
timezone = 0 

回答

1

原来的配置文件是完全正确的,我想。

整个问题只是该Tryton服务器没有正确读取更改后,因为有与它的重启问题。

统一桌面报告说,它需要“重新启动安装更新”(不我知道,从Windows?)和我做了后,端口自动打开。

系统重新启动之前,重新启动服务器Tryton只产生:

sudo /etc/init.d/tryton—server restart 
* Restarting Tryton Application Platform trytond 
start—stop—daemon: warning: failed to kill 18175: No such process  
[ 0K ] 

我采取了[OK]暗示服务器已经重启反正。 但不,它没有!

系统重新启动后,我得到了正确的消息:

sudo /etc/init.d/tryton—server restart 
* Restarting Tryton Application Platform trytond 
[ 0K ] 

而且现在也使用netstat输出是正确的和客户端成功连接:

# netstat -tupan | grep 8000 
tcp6  0  0 :::8000     :::*     LISTEN 
1792/python 
0

我有同样的问题,这是其实我的烦恼原因:

但是,我的trytond.conf文件看起来是正确的,有

jsonrpc = *:8000 

correct syntax(至少在最近的版本中,3.4〜3。8)如下:

[jsonrpc] 
listen = *:8000 

一点题外话,运行trytond--verbose标志,可以在控制台调试(或者你也可以用logfiles玩,喂trytond--logconf logconf.conf)。

相关问题