ocsigenserver.opt fails on startup with Unix.ECONNREFUSED

338 views Asked by At

My ocsigen server has been working fine for a while, but just as I'm about to show it off to someone, it spews this on startup and then exits with failure:

ocsigenserver.opt: ocsipersist:dbm: Cannot connect to Ocsidbm. Will continue without persistent session support. Error message is: Connection refused in connect() .Have a look at the logs to see if there is an error message from the Ocsidbm process.
ocsigenserver.opt: ocsigen:main: Fatal - While loading /home/unhammer/.opam/4.02.1/lib/ocsigenserver/extensions/ocsipersist-dbm.cmxs: Unix.Unix_error(Unix.ECONNREFUSED, "connect", "")

how do I fix this?

1

There are 1 answers

2
unhammer On

Start up ocsigenserver.opt with -V (very verbose), if it says something like

ocsigenserver.opt: ocsipersist:dbm: Launching a new Ocsidbm process: /home/unhammer/.opam/4.02.1/lib/ocsigenserver/extensions/ocsidbm.opt on directory /usr/local/var/data/PROJECT/ocsipersist.

then you could try rm -f /usr/local/var/data/PROJECT/ocsipersist/socket (or, if you have no important data there, even rm -rf /usr/local/var/data/PROJECT). This worked for me.