Reputation: 616
I'm a PostgreSQL novice trying to install the community version of Odoo 9 on Windows Server 2003. I ran the 'all in one' installer, which apparently succeeded, but when Odoo launched after the end of the installation, I got the following message:
Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Looking into the server logs seems to indicate that there is a problem with postgre:
I found this in the openerp-server.log:
2016-05-26 20:05:57,515 4060 INFO ? openerp.addons.bus.models.bus: Bus.loop listen imbus on db postgres
2016-05-26 20:05:58,608 4060 INFO ? openerp.sql_db: Connection to the database failed
2016-05-26 20:05:58,608 4060 ERROR ? openerp.addons.bus.models.bus: Bus.loop error, sleep and retry
Traceback (most recent call last):
File "C:\Odoo 9.0-20160523\server\openerp\addons\bus\models\bus.py", line 168, in run
File "C:\Odoo 9.0-20160523\server\openerp\addons\bus\models\bus.py", line 146, in loop
File "C:\Odoo 9.0-20160523\server\.\openerp\sql_db.py", line 630, in cursor
File "C:\Odoo 9.0-20160523\server\.\openerp\sql_db.py", line 164, in
__init__
File "C:\Odoo 9.0-20160523\server\.\openerp\sql_db.py", line 513, in
_locked
File "C:\Odoo 9.0-20160523\server\.\openerp\sql_db.py", line 581, in borrow
File "psycopg2\__init__.pyc", line 164, in connect
OperationalError: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
It looks pretty obvious that Odoo can't connect to Postgresql. Here is what I've tried:
pg_ctl -D "c:\Odoo 9.0-20160523\PostgreSQL\data" -l logfile start
, to which I got a response "server starting". The symptoms did not change after this.pg_ctl.exe register -N postgres -U postgres -P postgrespass -D "c:/Odoo 9.0-20160523/PostgreSQL/data"
. This created the service, but when I started it manually, I get the message The postgres service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service.
postgres cannot access the server configuration file "c:/Odoo 9.0-20160523/PostgreSQL/data/postgresql.conf": No such file or directory'. Looking for this error, I found some suggestions to search for this file, so I did and found 'postgresql.conf.sample
so I copied it, dropped it in the data folder, removed the .sample extension and attempted to start the service again. This lead to more errors in the event log, including this:
'FATAL: "c:/Odoo 9.0-20160523/PostgreSQL/data" is not a valid data directory DETAIL: File "c:/Odoo 9.0-20160523/PostgreSQL/data/PG_VERSION" is missing.'
I also found this in the openerp-server.conf:
db_host = localhost
db_maxconn = 64
db_name = False
db_password = openpgpwd
db_port = 5432
db_template = template1
db_user = openpg
Does that look correct? Should db_name = false
?
I'm not sure how to proceed from here. Any suggestions?
UPDATE
Installing on Windows 7 works as expected with the same installation file. Could this be a compatibility issue with Server 2003? I saw no system requirements for Odoo or PostgreSQL that indicated an incompatibility with Windows Server 2003.
Upvotes: 0
Views: 6546
Reputation: 11
I've solved this problem after installing pg_agent package, to do that :
The server should automatically starts, if not start it manually.
Best regards
Upvotes: 0