Found the offending code.

/opt/graylog/service/graylog-server/run

Hardcoded mongodb to be localhost, even though graylog.conf has it set to 
the primary mongodb.

#!/bin/sh
exec 2>&1

umask 077

if [ -f "/opt/graylog/embedded/share/graylog/installation-source.sh" ]; then
    . "/opt/graylog/embedded/share/graylog/installation-source.sh"
fi

export JAVA_HOME=/opt/graylog/embedded/jre
export GRAYLOG_SERVER_JAVA_OPTS="-Xms1g -Xmx1500m -XX:NewRatio=1 -server 
-XX:+ResizeTLAB -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled 
-XX:+CMSClassUnloadingEnabled -XX:+UseParNewGC 
-XX:-OmitStackTraceInFastThrow"

# check if mongodb is up
timeout 600 bash -c "until curl -s http://*127.0.0.1*:27017; do sleep 1; 
done"
exec chpst -P -U graylog -u graylog /opt/graylog/embedded/bin/authbind 
$JAVA_HOME/bin/java $GRAYLOG_SERVER_JAVA_OPTS -jar -Dlog4j.configurationFile
=file:///opt/graylog/conf/log4j2.xml 
-Djava.library.path=/opt/graylog/server/lib/sigar/ 
-Dgraylog2.installation_source=${GRAYLOG_INSTALLATION_SOURCE:=unknown} 
/opt/graylog/server/graylog.jar server -f /opt/graylog/conf/graylog.conf



I changed 127.0.0.1 to 10.20.1.229 (address of mongodb) and the server is 
running fine

I would consider this an oversight and suggest to reopen
https://github.com/Graylog2/graylog2-server/issues/2370

I'll update that ticket with this info.

Thanks for helping to narrow it down.


-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/7a168454-fe7f-4412-8da6-335c385c66dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to