1

ローカル仮想マシン (VirtualBox で構築) からリモート PostgreSQL データベースにアクセスしようとしています。データベースがリモート サーバー上で完全に正常に動作することはわかっています。ローカル スクリプトから得られるエラーは次のとおりです。

OperationalError: could not connect to server: Connection timed out
    Is the server running on host "314.15.926.53" and accepting
    TCP/IP connections on port 5432?

リモートサーバー(Ubuntu/Apache)でこれまでに行ったことは次のとおりです。

- Added "host  all  all  0.0.0.0/0  md5" to the bottom of "/etc/postgresql/8.4/main/pg_hba.conf"
- Set listen_address = '*' in `/etc/postgresql/8.4/main/postgresql.conf`
- Ran from the command line: 
    - "iptables -A INPUT -p tcp -s 0/0 --sport 1024:65535 -d 314.15.926.53  --dport 5432 -m state --state NEW,ESTABLISHED -j ACCEPT"
    - "iptables -A OUTPUT -p tcp -s 314.15.926.53 --sport 5432 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT"
- Restarted postgres and apache

それでも同じタイムアウトエラーが発生します。次に何をすべきかについて、誰かが私を正しい方向に向けるのを助けることができますか? または、考えられる原因は何ですか?

4

0 に答える 0