In omero-web, I think there may be a race when this :
./bin/omero config set omero.web.server_list "[["omero_server", 4064, "omero"]]"
can be called before the omero user is in the database. The database user creation takes a bit of time specially the first time.
I used a snippet like this to check that the user exists prior to executing the config set:
+ output=`psql -U postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='omero'"`
+ while [ $output != 1 ]; do
+ echo Waiting for omero user to be created in the database
+ sleep 5s
+ done
+