本文介绍了Tryton客户端无法通过Internet端口8000连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我让Tryton ERP在VM上本地工作,并且运行正常.

I have Tryton ERP working locally on a VM, functioning correctly.

但是,客户端无法通过Internet连接到它.

However, the client cannot connect to it via internet.

nmap报告端口8000被关闭",也就是说,那里没有任何监听.

nmap reports port 8000 to be "closed", that is, nothing is listening there.

~# 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文件看起来正确,具有

However, my trytond.conf file looks correct, having

jsonrpc = *:8000

和数据库连接参数. (在Azure上类似地设置的其他VM可以正常工作.)完整的连接文件在下面.

and the database connection parameters. (A different VM set up similarly on Azure works correctly.)Full connection file is below.

AFAIK,netstat报告它仅在本地主机上监听8000端口:

AFAIK, netstat reports that it is only listening on localhost for the 8000 port:

~# 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

因为在其他一切正常的虚拟机上,netstat的输出却不同:

Because on my other VM where everything is fine, the netstat output is different:

root@Tryton:~# netstat -tupan | grep 8000
tcp6       0      0 :::8000                 :::*                    LISTEN
        1310/python

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

But what did I do wrong?My only reference point to change something is the trytond.conf file, right?

这里是:

#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

推荐答案

事实证明,按照我的想法,配置文件是完全正确的.

It turned out the config file was totally correct, as I thought.

整个问题只是Tryton服务器在更改后没有正确读取它,因为重新启动存在问题.

The whole issue was just that the Tryton server had not correctly read it after the changes since there was a problem with its reboot.

Unity桌面报告它需要重新开始安装更新"(我不知道是从Windows来的吗?),然后,该端口会自动打开.

Unity desktop reported that it needed to "restart to install updates" (don't I know that from Windows?) and after I did, the port opened automatically.

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

Before system restart, restarting the Tryton server only yielded:

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]来表示服务器无论如何都已重新启动.但是,没有!

And I had taken the [OK] to imply that the server had restarted anyway.But no, it hadn't!

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

After system restart, I got the correct message:

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

现在netstat输出也正确,并且客户端成功连接:

And now also the netstat output is correct and the client connects successfully:

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

这篇关于Tryton客户端无法通过Internet端口8000连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 02:35