This question has been flagged

I installed odoo 9 on a vps.  I then restored a dB I had on my local mac.  Everything went perfect until I tried editing the website.  After a few product ow I getcategory edits (nothing major)  I an Infirst got an internal server error trying to load the /web/login and now tI get the internal Server Error just loading the website at ip:8069.

Should I reinstall odoo or remove the website module somehow from the command line?

I tried reinstalling odoo but I get a message saying there is nothing to update.

I ran this command per Damon's and Ermin's instructions:

root@server [/usr/bin]# ./odoo.py -d postgres --db-filter postgres -u baseRunning as user 'root' is a security risk.
2016-12-10 19:36:34,282 4354 INFO ? openerp: OpenERP version 9.0c-201612102016-12-10 19:36:34,282 4354 INFO ? openerp: addons paths: ['/root/.local/share/Odoo/addons/9.0', u'/usr/lib/python2.7/site-packages/openerp/addons']2016-12-10 19:36:34,282 4354 INFO ? openerp: database: default@default:default2016-12-10 19:36:34,284 4354 INFO ? openerp.sql_db: Connection to the database failedTraceback (most recent call last):
  File "./odoo.py", line 160, in <module> main() File "./odoo.py", line 157, in main openerp.cli.main() File "/usr/lib/python2.7/site-packages/openerp/cli/command.py", line 64, in main o.run(args) File "/usr/lib/python2.7/site-packages/openerp/cli/server.py", line 165, in run main(args) File "/usr/lib/python2.7/site-packages/openerp/cli/server.py", line 136, in main openerp.service.db._create_empty_database(db_name) File "/usr/lib/python2.7/site-packages/openerp/service/db.py", line 79, in _create_empty_database with closing(db.cursor()) as cr:
  File "/usr/lib/python2.7/site-packages/openerp/sql_db.py", line 630, in cursor
return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
File "/usr/lib/python2.7/site-packages/openerp/sql_db.py", line 164, in __init__
self._cnx = pool.borrow(dsn)
File "/usr/lib/python2.7/site-packages/openerp/sql_db.py", line 513, in _locked
return fun(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/openerp/sql_db.py", line 581, in borrow
**connection_info) File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)psycopg2.
OperationalError: FATAL: no pg_hba.conf entry for host "[local]", user "root", database "postgres", SSL off

Its the same I get when running

root@server [/]# systemctl status odoo● 
odoo.service - Odoo Open Source ERP and CRM
Loaded: loaded (/usr/lib/systemd/system/odoo.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2016-12-10 11:43:59 EST; 37min ago
Main PID: 97 (odoo.py) CGroup: /system.slice/odoo.service
└─97 /usr/bin/python /usr/bin/odoo.py --config=/etc/odoo/openerp-server.conf
Dec 10 12:21:15 server odoo.py[97]: return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
Dec 10 12:21:15 server odoo.py[97]: File "/usr/lib/python2.7/site-packages/openerp/sql_db.py", line 164, in __init__
Dec 10 12:21:15 server odoo.py[97]: self._cnx = pool.borrow(dsn)
Dec 10 12:21:15 server odoo.py[97]: File "/usr/lib/python2.7/site-packages/openerp/sql_db.py", line 513, in _locked
Dec 10 12:21:15 server odoo.py[97]: return fun(self, *args, **kwargs)
Dec 10 12:21:15 server odoo.py[97]: File "/usr/lib/python2.7/site-packages/openerp/sql_db.py", line 581, in borrow
Dec 10 12:21:15 server odoo.py[97]: **connection_info)
Dec 10 12:21:15 server odoo.py[97]: File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect
Dec 10 12:21:15 server odoo.py[97]: conn = _connect(dsn, connection_factory=connection_factory, async=async)
Dec 10 12:21:15 server odoo.py[97]: OperationalError: FATAL: no pg_hba.conf entry for host "[local]", user "odoo", database "postgres", SSL off
Avatar
Discard

You should first analyze the corresponding log entries and post them here.

Author

I posted the log files up above in the OP

Best Answer

Why do you touch the database "postgres"???? This database is installed by default and you should not touch it at all. You create a new database and you work with this one only.

Avatar
Discard
Author

What do you mean?

Best Answer

Have you tried shutting down database and then restarting things with just the base modules?

I'm on V10 but mine looks like:

sudo service odoo-server stop
./odoo-bin -d databasename --db-filter databasename -u base
This is what I use when I have a custom module go haywire on me and it brings everything to a halt.
Avatar
Discard
Author

so that command above will shutdown the database and restart it?

oops, I added the shutdown statement before the restart

Author

oh ok...im getting this: root@server [/]# sudo service odoo-server stop

Redirecting to /bin/systemctl stop odoo-server.service

Failed to stop odoo-server.service: Unit odoo-server.service not loaded.

root@server [/]#

your on v9, forgot about that. run the following and look for anything with odoo or openerp in its name and use that after the ./ replacing "odoo-bin" in my script above

<code>service --status-all</code>

Author

Please check my OP for the results to systemctl status odoo

ok

-->sudo service odoo stop

then make sure you are in your odoo directory where odoo.py resides and then

-->./odoo.py -d databasename --db-filter databasename -u base

Author

btw, I get nothing with odoo or openerp when i run service status all. I just get something with the word dovecot in it

if you run top is python running?

Maybe just restart it

sudo reboot -n

Author

Ok i get the same as when I run systemctl status odoo...no entry for local, user root, database postgres, SSL OFF

Author

yes odoo.py is running. I can see it in the top table

what OS is your VM running?

Author

CentOS7

My server was built on Ubuntu, not completely dif, but dif enough try:

/sbin/chkconfig ––list

look for odoo/openerp .py -bin ?

then try

/sbin/service [name] stop

Once stopped, then cd into the odoo-server dir where odoo.py or odoo-bin or openerp.py is and run

./[name] -d databasename --db-filter databasename -u base

If that doesn't work I'm outta brilliant ideas other than reinstall.

Was your installation on your Mac running under OSX or a VM under OSX?

Author

I ran the chkconfig command. i dont have openerp.py but found odoo.py by using find -name and its in ./usr/bin/odoo.py. I can stop it using systemctl stop odoo. As for the last command, should i use my real db or the postgres default db which seems to be causing issues in the pg_hba.conf file? It was on osx using virtual env.

use the db accessed by Odoo.

In looking again at your log files, I'd reinstall the whole OS, bare minimum w/ openssh server and just install for Odoo which means no MySQL no Apache (LAMP). Because Odoo was initially built ontop of debian, I'd install Ubuntu Server 16.04 w/ just ssh server, then use the following install script to get goin.

http://www.odoo.yenthevg.com/installing-odoo-10-ubuntu-16-04/

Once you have the system setup, you can go to blah.com:8069/web/database/manager and upload your old db, connect to it and see if everything is everything.

Author

Damon, I just posted the results from your previous isntructions. As for reinstalling centOS, I dont know if I could do that, its a hosted thing and I dont know how either.

reinstall postgres

yum install postgresql95-server postgresql95

Author

Thx. I got this: root@server [~]# yum install postgresql95-server postgresql95

Loaded plugins: fastestmirror

base | 3.6 kB 00:00:00

epel/x86_64/metalink | 13 kB 00:00:00

epel | 4.3 kB 00:00:00

extras | 3.4 kB 00:00:00

odoo-nightly | 2.9 kB 00:00:00

updates | 3.4 kB 00:00:00

(1/2): epel/x86_64/updateinfo | 682 kB 00:00:00

(2/2): epel/x86_64/primary_db | 4.4 MB 00:00:00

Loading mirror speeds from cached hostfile

* base: centos.mirrors.tds.net

* epel: mirror.nexcess.net

* extras: mirrors.liquidweb.com

* updates: mirror.nexcess.net

No package postgresql95-server available.

No package postgresql95 available.

Error: Nothing to do

sudo yum install postgresql-server postgresql-contrib

beyond this you're on your own. Good luck

Ok thanks!  Could you tell me what that does diffferent from:

yum install postgresql95-server postgresql95


On Sat, Dec 10, 2016 at 2:57 PM, Damon <damon@solutionarts.net> wrote:

sudo yum install postgresql-server postgresql-contrib

beyond this you're on your own. Good luck

--
Damon


Sent by Odoo S.A. using Odoo.




--
Regards/Saludos,

Marcio Valenzuela
www.compasahn.com
Just a non specific version of Postgres which it looks like your repos prefer. 

On Sat, Dec 10, 2016 at 6:38 PM Marcio Valenzuela <info@compasahn.com> wrote:










Ok thanks!  Could you tell me what that does diffferent from:

yum install postgresql95-server postgresql95


On Sat, Dec 10, 2016 at 2:57 PM, Damon <damon@solutionarts.net> wrote:









sudo yum install postgresql-server postgresql-contrib

beyond this you're on your own. Good luck


--
Damon





Sent by

Odoo S.A.

using
Odoo.




--
Regards/Saludos,

Marcio Valenzuela
www.compasahn.com



--
Santiago EV





Sent by

Odoo S.A.

using
Odoo.