0
我想在我的Raspberry PI 3上運行postgresql 9.4,但沒有成功。端口5432不聽Raspberry PI
我/etc/postgresql/9.4/main/pg_hba.conf
host all all 10.0.1.0/24 md5
這對/etc/postgresql/9.4/main/postgresql.conf
當我啓動該服務,並得到了狀態:
[email protected]:~ $ sudo service postgresql start
[email protected]:~ $ sudo service postgresql status
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled)
Active: active (exited) since Thu 2017-03-02 22:51:27 UTC; 29s ago
Process: 2840 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 2840 (code=exited, status=0/SUCCESS)
Mar 02 22:51:27 raspberrypi systemd[1]: Started PostgreSQL RDBMS.
我只得到了SSH端口:
[email protected]:~ $ sudo netstat -anpt | grep LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 577/sshd
tcp6 0 0 :::22 :::* LISTEN 577/sshd
從我的MAC我嘗試連接:
❯ psql -h 10.0.1.4 jdmclub_development pguser
psql: could not connect to server: Connection refused
Is the server running on host "10.0.1.4" and accepting
TCP/IP connections on port 5432?
我不知道我做錯了什麼,任何人可以幫助我嗎?
編輯
PostgreSQL的記錄說:
2017-03-02 23:18:06 UTC [3993-1] LOG: invalid value for parameter "lc_messages": "en_GB.UTF-8"
2017-03-02 23:18:06 UTC [3993-2] LOG: invalid value for parameter "lc_monetary": "en_GB.UTF-8"
2017-03-02 23:18:06 UTC [3993-3] LOG: invalid value for parameter "lc_numeric": "en_GB.UTF-8"
2017-03-02 23:18:06 UTC [3993-4] LOG: invalid value for parameter "lc_time": "en_GB.UTF-8"
2017-03-02 23:18:06 UTC [3993-5] FATAL: configuration file "/etc/postgresql/9.4/main/postgresql.conf" contains errors
你的postgresql數據庫的內存設置如何?我覺得在樹莓中運行類似的數據庫對設備來說是一種矯枉過正的行爲。 –
postgresql日誌怎麼樣?他們說什麼? –
2017-03-02 23:18:06 UTC [3993-1]日誌:參數「lc_messages」的無效值:「en_GB.UTF-8」 2017-03-02 23:18:06 UTC [3993-2 ] LOG:參數「lc_monetary」的值無效:「en_GB.UTF-8」 2017-03-02 23:18:06 UTC [3993-3] LOG:參數「lc_numeric」的值無效:「en_GB.UTF- 8「 2017-03-02 23:18:06 UTC [3993-4]日誌:參數」lc_time「的無效值:」en_GB.UTF-8「 2017-03-02 23:18:06 UTC [3993 -5] FATAL:配置文件「/etc/postgresql/9.4/main/postgresql.conf」包含錯誤 – murb83