Odoo Help

Welcome!

This community 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.

0

Getting Internal server Error after restarting openerp server

By
Srivishnu
on 9/14/14, 3:33 AM 2,052 views

Hi all,

I am able to install openerp v7.0 with nginx reverse proxy on ubuntu 14.04 LTS everything works fine without any issues after installation.but when i restart openerp service i am getting "Internal server error" . I am posting logs and steps i have tried 

Logs

***************************************************************************************************************************

Internal Server Error

{"message": "OpenERP Server Error", "code": 200, "data": {"debug": "Server Traceback (most recent call last):\n File \"/usr/lib/pymodules/python2.7/openerp/addons/web/session.py\", line 89, in send\n return openerp.netsvc.dispatch_rpc(service_name, method, args)\n File \"/usr/lib/pymodules/python2.7/openerp/netsvc.py\", line 296, in dispatch_rpc\n result = ExportService.getService(service_name).dispatch(method, params)\n File \"/usr/lib/pymodules/python2.7/openerp/service/web_services.py\", line 122, in dispatch\n return fn(*params)\n File \"/usr/lib/pymodules/python2.7/openerp/service/web_services.py\", line 359, in exp_list\n cr = db.cursor()\n File \"/usr/lib/pymodules/python2.7/openerp/sql_db.py\", line 484, in cursor\n return Cursor(self.__pool, self.dbname, serialized=serialized)\n File \"/usr/lib/pymodules/python2.7/openerp/sql_db.py\", line 182, in __init__\n self._cnx = pool.borrow(dsn(dbname))\n File \"/usr/lib/pymodules/python2.7/openerp/sql_db.py\", line 377, in _locked\n return fun(self, *args, **kwargs)\n File \"/usr/lib/pymodules/python2.7/openerp/sql_db.py\", line 440, in borrow\n result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)\n File \"/usr/lib/python2.7/dist-packages/psycopg2/__init__.py\", line 179, in connect\n connection_factory=connection_factory, async=async)\nOperationalError: FATAL: Peer authentication failed for user \"erpadmin\"\n\n\nClient Traceback (most recent call last):\n File \"/usr/lib/pymodules/python2.7/openerp/addons/web/http.py\", line 285, in dispatch\n r = method(self, **self.params)\n File \"/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py\", line 570, in index\n db, redir = db_monodb_redirect(req)\n File \"/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py\", line 98, in db_monodb_redirect\n return db_redirect(req, not config['list_db'])\n File \"/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py\", line 109, in db_redirect\n dbs = db_list(req, True)\n File \"/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py\", line 90, in db_list\n dbs = proxy.list(force)\n File \"/usr/lib/pymodules/python2.7/openerp/addons/web/session.py\", line 30, in proxy_method\n result = self.session.send(self.service_name, method, *args)\n File \"/usr/lib/pymodules/python2.7/openerp/addons/web/session.py\", line 103, in send\n raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)\nFault: <Fault FATAL: Peer authentication failed for user \"erpadmin\"\n: 'Traceback (most recent call last):\\n File \"/usr/lib/pymodules/python2.7/openerp/addons/web/session.py\", line 89, in send\\n return openerp.netsvc.dispatch_rpc(service_name, method, args)\\n File \"/usr/lib/pymodules/python2.7/openerp/netsvc.py\", line 296, in dispatch_rpc\\n result = ExportService.getService(service_name).dispatch(method, params)\\n File \"/usr/lib/pymodules/python2.7/openerp/service/web_services.py\", line 122, in dispatch\\n return fn(*params)\\n File \"/usr/lib/pymodules/python2.7/openerp/service/web_services.py\", line 359, in exp_list\\n cr = db.cursor()\\n File \"/usr/lib/pymodules/python2.7/openerp/sql_db.py\", line 484, in cursor\\n return Cursor(self.__pool, self.dbname, serialized=serialized)\\n File \"/usr/lib/pymodules/python2.7/openerp/sql_db.py\", line 182, in __init__\\n self._cnx = pool.borrow(dsn(dbname))\\n File \"/usr/lib/pymodules/python2.7/openerp/sql_db.py\", line 377, in _locked\\n return fun(self, *args, **kwargs)\\n File \"/usr/lib/pymodules/python2.7/openerp/sql_db.py\", line 440, in borrow\\n result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)\\n File \"/usr/lib/python2.7/dist-packages/psycopg2/__init__.py\", line 179, in connect\\n connection_factory=connection_factory, async=async)\\nOperationalError: FATAL: Peer authentication failed for user \"erpadmin\"\\n\\n'>\n", "fault_code": "FATAL: Peer authentication failed for user \"erpadmin\"\n", "type": "server_exception"}}

***************************************************************************************************************************

Steps tried

* Postgresql is running

root@erp:~# /etc/init.d/postgresql status
9.3/main (port 5432): online

peer authuntication is allowed for local in pg_hba.conf file

everything works fine after installation,When i change title in main.py and chrome.js it does not reflect so i try to restart open erp service then it crashes.I have reinstalled Ubuntu 14.04 and tried it works fine after openerp install and when i restart openerp service same error. Thanks in advance

 

Regards,

Srivishnu.K

 

0
Srivishnu
On 9/15/14, 2:54 PM

Hi John,

Thanks for your reply. Openerp is running under root and user name for database is erpadmin,may be thats the issue. I will create same username for host and database and give it a go. will keep you posted thanks again :)

Regards.

Srivishnu.K

0

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 9/15/14, 9:51 AM

Srivishu, peer authentication for PostgreSQL means that the Operating System user that you are using to access the database and the database user MUST be have the same user ID.

Check whether you have erpadmin user in the database and check whether after you restart the database the openerp process is working under erpadmin user.

Hi John, I installed fresh copy of openerp using erpadmin as username on host and database user erpadmin everything worked fine after install.but when i restart the service under erpadmin user on host again it goes to peer authentication failure.i don't see any info on log files either :(

Srivishnu
on 9/15/14, 4:20 PM

From http://www.postgresql.org/docs/9.1/static/auth-methods.html, peer authentication works only for localhost connection. Check your connection from OpenERP to the database, whether it is using full IP address or localhost/127.0.0.1. In general, it is not advisable to use peer authentication. Use MD5 or other authentication that requires password/key instead.

Ivan
on 9/16/14, 1:02 AM

hi john, connection to database through openerp is localhost.i have tried wan ip with md5 but no luck i get database authentication failure. Regards, Srivishnu.K

Srivishnu
on 9/16/14, 2:03 PM

Have you tried to use psql to connect? Using the same IP address (-h) username (-U) connecting to the same database name? Do it while logging in as the user who should be running OpenERP (use su to do so).

Ivan
on 9/17/14, 12:35 AM

hi john, I had tried psql and was able to connect to database through terminal. I have reinstalled openerp without nginx reverse proxy and everything seems to be fine.i am able to run openerp on port 8069 without any issues even after restarting server or service.ill try to configure apache redirect and see how it goes.will keep you posted thank you so much for you assistance john. Regards, Srivishnu.K

Srivishnu
on 9/17/14, 1:26 AM

hi john, I had tried psql and was able to connect to database through terminal. I have reinstalled openerp without nginx reverse proxy and everything seems to be fine.i am able to run openerp on port 8069 without any issues even after restarting server or service.ill try to configure apache redirect and see how it goes.will keep you posted thank you so much for you assistance john. Regards, Srivishnu.K

Srivishnu
on 9/17/14, 1:26 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/14/14, 3:33 AM
Seen: 2052 times
Last updated: 3/16/15, 8:10 AM