Have you tried starting up with nsd-postgres instead, like this?
/usr/local/aolserver40r10/bin/nsd-postgres -u jack -g web -ft /var/openacs-5.1.5/etc/config.tcl
Could also be a missing username in the config.tcl file or a missing postgres environment variable.