私はtrytonをローカルにインストールしています。ただし、リモート クライアントからの接続は機能しません。tryton は Postgre SQL でビルドされています。ドキュメントから、問題の性質はそこにあると思います。
編集:問題はPostgreSQLでもtrytond.confスクリプトだけでもなく、ポート8000用のWindows Azure上の仮想マシンのセットアップでエンドポイントを追加する必要があることが判明しました。http://xmodulo.com/を参照してください2012/12/how-to-open-ports-on-windows-azure-vm.html . ただし、trytond.conf ファイルに関する以下の回答も正しいです。
/etc/trytond.conf に、tryton サーバーの IP アドレスを入力しました。
#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]
# This is the hostname used when generating tryton URI
#hostname =
# Activate the json-rpc protocol
jsonrpc = 23.97.165.118:8000
#ssl_jsonrpc = False
(これは IP の例です)
FAQ からのチェックの実行: trytond は正しく実行されています:
リスニング ポート:
ただし、クライアントからインターネット経由で接続できません。
インターネット上のどこからでもすべてのクライアントが接続できるようにしたいと思います (セキュリティには最適ではありませんが、ユーザーの IP は変更されるため、これを回避する方法はありません)。
/etc/postgresql/9.1/main/pg_hba.conf には何を入力する必要がありますか?
postgresql.conf には何が必要ですか? そして、どれに?「whereis postgresql.conf」で検索すると、いくつかのバージョンが見つかります。
root@Tryton:~# whereis postgresql.conf
postgresql: /etc/postgresql /usr/lib/postgresql /usr/share/postgresql
よろしくお願いいたします。
編集:ここに構成ファイルがあります。サーバー上でローカルに正常に実行されますが、インターネット経由で tryton クライアントに接続できません。
構成ファイル (変更)
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]
# This is the hostname used when generating tryton URI
#hostname =
# Activate the json-rpc protocol
jsonrpc = *:8000
#ssl_jsonrpc = False
# 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
# 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 = False
#db_port = False
db_user = tryton
db_password = tryton_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
pg_hba.conf
# PostgreSQL Client Authentication Configuration File
# ===================================================
# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
local all postgres md5
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
# Original:
#host all all 127.0.0.1/32 md5
# Neu:
# Option 1: host all all 0.0.0.0/0 md5
host all all 127.0.0.1/32 md5
# IPv6 local connections:
# Original:
#host all all ::1/128 md5
# Neu:
host all all ::/0 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5
postgresql.conf
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)