Odoo Help

0

Internal Server Error - Website module - Reinstall Odoo or Uninstall Module

By
Marcio Valenzuela P
on 12/9/16, 9:56 PM 3,231 views

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

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

Ermin Trevisan
on 12/10/16, 1:24 AM

I posted the log files up above in the OP

Marcio Valenzuela P
on 12/10/16, 11:43 AM
0

Ermin Trevisan

--Ermin Trevisan--
8271
| 6 5 7
Walchwil, Switzerland
--Ermin Trevisan--


Ermin Trevisan
On 12/11/16, 9:15 AM

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.

What do you mean?

Marcio Valenzuela P
on 12/11/16, 10:01 AM
0
Damon
On 12/10/16, 11:41 AM

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.

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

Marcio Valenzuela P
on 12/10/16, 11:45 AM

oops, I added the shutdown statement before the restart

Damon
on 12/10/16, 11:47 AM

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 [/]#

Marcio Valenzuela P
on 12/10/16, 12:06 PM

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>

Damon
on 12/10/16, 12:22 PM

Please check my OP for the results to systemctl status odoo

Marcio Valenzuela P
on 12/10/16, 12:26 PM

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

Damon
on 12/10/16, 12:37 PM

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

Marcio Valenzuela P
on 12/10/16, 12:40 PM

if you run top is python running?

Maybe just restart it

sudo reboot -n

Damon
on 12/10/16, 12:42 PM

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

Marcio Valenzuela P
on 12/10/16, 12:43 PM

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

Marcio Valenzuela P
on 12/10/16, 12:49 PM

what OS is your VM running?

Damon
on 12/10/16, 1:48 PM

CentOS7

Marcio Valenzuela P
on 12/10/16, 1:58 PM

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?

Damon
on 12/10/16, 2:06 PM

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.

Marcio Valenzuela P
on 12/10/16, 2:30 PM

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.

Damon
on 12/10/16, 2:39 PM

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.

Marcio Valenzuela P
on 12/10/16, 2:42 PM

reinstall postgres

yum install postgresql95-server postgresql95

Damon
on 12/10/16, 2:48 PM

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

Marcio Valenzuela P
on 12/10/16, 3:40 PM

sudo yum install postgresql-server postgresql-contrib

beyond this you're on your own. Good luck

Damon
on 12/10/16, 3:57 PM
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
Marcio Valenzuela P
on 12/10/16, 9:37 PM
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.



Damon
on 12/10/16, 8:53 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)

Stats

Asked: 12/9/16, 9:56 PM
Seen: 3231 times
Last updated: 12/11/16, 9:15 AM