Starting openfire from init.d causing setting mode

While starting the openfire from /opt/openfire/bin/openfire.sh starts the server normally, starting it from init.d/openfire always starts setting screen in the admin url. What is causing this problem? Is there a way to fix?