I've been working with tinyerp-server for a few days and it has been started
and stopped and restarted without problem. Today I needed to reboot the server
and when it came back up I started tinyerp-server:
service tinyerp-server start
then I try to connect with a client but it is showing Could not connect to
server !. In the log I see this:
Fri, 24 Aug 2007 10:18:02 ERROR:web-services:Exception in call: Traceback (most
recent call last):
File /usr/lib/python2.5/site-packages/tinyerp-server/netsvc.py, line 206,
in _dispatch
r=m(*params)
File
/usr/lib/python2.5/site-packages/tinyerp-server/service/web_services.py, line
213, in list
db = sql_db.db_connect('template1')
File /usr/lib/python2.5/site-packages/tinyerp-server/sql_db.py, line 172,
in db_connect
tdb = psycopg.connect('%s %s %s %s %s' % (host, port, name, user,
password), serialize=0, maxconn=maxconn)
OperationalError: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket /tmp/.s.PGSQL.5432?
So I check some things:
[EMAIL PROTECTED] ~]# service tinyerp-server status
tinyerp-server is running...
[EMAIL PROTECTED] ~]# ps -ef | grep tiny
greno 3181 2927 0 09:53 pts/100:00:01 /usr/bin/python
./tinyerp-client.py
tinyerp 3283 1 0 09:56 ?00:00:01 /usr/bin/python
./tinyerp-server.py --pidfile=/var/spool/tinyerp/tinyerp-server.pid
--logfile=/var/log/tinyerp/tinyerp-server.log -c /etc/tinyerp-server.conf
[EMAIL PROTECTED] ~]# ls -l /tmp/.s.PGSQL.5432
ls: cannot access /tmp/.s.PGSQL.5432: No such file or directory
Ok, so the postgresql socket is not there. So something is amiss with
postgresql. It is supposed to start on server boot.
I check postgresql and it has failed to start.
service postgresql status
postmaster is stopped.
So now we are getting closer.
Checking the postgresql log:
FATAL: pre-existing shared memory block (key 5432001, ID 9666575) is still in
use
HINT: If you're sure there are no old server processes still running, remove
the shared memory block with the command ipcclean, ipcrm, or just delete
the file postmaster.pid.
So I check and yes there is an existing postmaster.pid file. I delete it and
then try to start postgresql:
service postgresql start
[ OK ]
So it starts ok now and then I recheck with client and yes, now we can connect.
I post this in case others might run into this issue.
Gerry
___
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users