diff --git a/tools/genenotebook/launch_gnb.sh b/tools/genenotebook/launch_gnb.sh
index b667b01..4c1ad3d 100755
--- a/tools/genenotebook/launch_gnb.sh
+++ b/tools/genenotebook/launch_gnb.sh
@@ -2,17 +2,26 @@
set -e
-mongod --dbpath ./mongo_db/ --unixSocketPrefix `pwd` --bind_ip fake_socket --logpath ./mongod.log --pidfilepath ./mongo.pid &
+echo "Running mongod: "
+mongod --dbpath ./mongo_db/ --unixSocketPrefix "$(pwd)" --bind_ip fake_socket --logpath ./mongod.log --pidfilepath ./mongo.pid &
-sleep 8
+echo "Waiting while mongod starts up"
+
+tries=0
# "Listening on" is for mongodb 5x
-if ! grep -q "Listening on" ./mongod.log; then
- echo "Failed to launch MongoDB:" 1>&2;
- cat ./mongod.log 1>&2;
- kill $GNB_PID;
- exit 1;
-fi;
+while ! grep -q "Listening on" ./mongod.log; do
+
+ tries=$((tries + 1))
+
+ if [ "$tries" -ge 30 ]; then
+ echo "Failed to launch MongoDB:" 1>&2;
+ cat ./mongod.log 1>&2;
+ exit 1;
+ fi
+
+ sleep 3
+done;
TMP_STORAGE=$(pwd)/tmp_storage
mkdir "$TMP_STORAGE"
@@ -23,11 +32,18 @@ genoboo run --storage-path "$TMP_STORAGE" --port ${GNB_PORT} --mongo-url mongodb
export GNB_PID=$!
-sleep 15
+tries_gnb=0
+
+while ! grep -q "GeneNoteBook server started, serving" ./gnb.log; do
+
+ tries_gnb=$((tries_gnb + 1))
+
+ if [ "$tries_gnb" -ge 30 ]; then
+ echo "Failed to launch GeneNoteBook:" 1>&2;
+ cat ./gnb.log 1>&2;
+ kill $GNB_PID $(<"./mongo.pid");
+ exit 1;
+ fi
-if ! grep -q "GeneNoteBook server started, serving" ./gnb.log; then
- echo "Failed to launch GeneNoteBook:" 1>&2;
- cat ./gnb.log 1>&2;
- kill $GNB_PID $(<"./mongo.pid");
- exit 1;
-fi;
+ sleep 3
+done;
diff --git a/tools/genenotebook/macros.xml b/tools/genenotebook/macros.xml
index f48bca6..6cfcbc8 100644
--- a/tools/genenotebook/macros.xml
+++ b/tools/genenotebook/macros.xml
@@ -7,7 +7,7 @@
- 0.4.9
+ 0.4.12
@TOOL_VERSION@+galaxy0
diff --git a/tools/genenotebook/test-data/output/genome.tar.bz2 b/tools/genenotebook/test-data/output/genome.tar.bz2
index 27c59b0..ff6ce22 100644
Binary files a/tools/genenotebook/test-data/output/genome.tar.bz2 and b/tools/genenotebook/test-data/output/genome.tar.bz2 differ
diff --git a/tools/genenotebook/test-data/output/genome_annot.tar.bz2 b/tools/genenotebook/test-data/output/genome_annot.tar.bz2
index 769751d..4048204 100644
Binary files a/tools/genenotebook/test-data/output/genome_annot.tar.bz2 and b/tools/genenotebook/test-data/output/genome_annot.tar.bz2 differ
diff --git a/tools/genenotebook/test-data/output/genome_annot_ips.tar.bz2 b/tools/genenotebook/test-data/output/genome_annot_ips.tar.bz2
index af786d7..ca1f0e7 100644
Binary files a/tools/genenotebook/test-data/output/genome_annot_ips.tar.bz2 and b/tools/genenotebook/test-data/output/genome_annot_ips.tar.bz2 differ
diff --git a/tools/genenotebook/test-data/output/genome_annot_ips_en.tar.bz2 b/tools/genenotebook/test-data/output/genome_annot_ips_en.tar.bz2
index b8b6dd4..d428654 100644
Binary files a/tools/genenotebook/test-data/output/genome_annot_ips_en.tar.bz2 and b/tools/genenotebook/test-data/output/genome_annot_ips_en.tar.bz2 differ
diff --git a/tools/genenotebook/test-data/output/genome_annot_ips_en_bl_exp.tar.bz2 b/tools/genenotebook/test-data/output/genome_annot_ips_en_bl_exp.tar.bz2
index 0f13be7..04efafd 100644
Binary files a/tools/genenotebook/test-data/output/genome_annot_ips_en_bl_exp.tar.bz2 and b/tools/genenotebook/test-data/output/genome_annot_ips_en_bl_exp.tar.bz2 differ
diff --git a/tools/genenotebook/test-data/output/genome_reload.tar.bz2 b/tools/genenotebook/test-data/output/genome_reload.tar.bz2
index 9503975..33c7b87 100644
Binary files a/tools/genenotebook/test-data/output/genome_reload.tar.bz2 and b/tools/genenotebook/test-data/output/genome_reload.tar.bz2 differ