Diagnosing Formbird Server
The following is to help you get your Formbird server running if it's not working
Items to check
1. Ensure you have navigated to https:// address not http. eg. https://192.168.0.10
2. The first item to check is whether Formbird has started. This can be done by running
You must be logged into the user that formbird has been installed under. If you have downloaded the Formbird VM, then this is the ubuntu user.
pm2 logs
to restart the the Formbird web app run (with sudo you will need to enter the password for ubuntu - ie. formbird123)
sudo redis-cli flushall
pm2 restart web-app
The log files can be found in (depending on your install location)
cd /home/ubuntu/app/formbird-web-app/server/log
more ./formbird.log
Reading the formbird.log should provide a good indication of what is not working. The most common issue is connection to MongoDB.
3. Confirm mongodb is running
If you run "mongo" you will login to the mongo shell - if that is successful then type "exit" to exit the shell.
mongo
If mongo is not running, try restarting mongo by performing the following
sudo systemctl restart mongod
4. Confirm elasticsearch is running
To confirm that elasticsearch is operating type
curl localhost:9200
Elasticsearch should return details on the operating server. If it is not running then try restarting with.
sudo systemctl restart elasticsearch
Navigate to elasticsearch head to confirm that it is up and running with the base document load in it, it should look something like the following (replace your IP address)
http://192.168.0.10/_plugin/head
5. Reload base formbird database
The following step will upload the default / seed database that is provided with the install. Warning - this will wipe any existing mongodb of the same name, it is also assumed that the name of the database is going to be formbird. It is also assumed that you have maintained the default ports for elasticsearch (9200) and mongodb (27017).
As user ubuntu.
cd ~/app
curl -XDELETE http://localhost:9200/formbird/
curl -XDELETE http://localhost:9200/mongodb_meta/
curl -H "Content-Type: application/json" -X POST --data @./formbird-web-app/utils/elastic/elastic-template.json 'http://localhost:9200/formbird'
cd ~/app/formbird-web-app/utils/mongodb/formbird-mongodb-base.dmp/
mongorestore --db formbird --drop ./formbird
Once loaded please confirm elasticsearch documents have been indexesd as per 4.
If either mongo or elasticsearch was not functioning and did start after the restart, please return to 1. and restart the Formbird web-app.