Browse Source

debug CI problems

marko asplund 10 years ago
parent
commit
f8753d4864
2 changed files with 10 additions and 1 deletions
  1. 5 1
      frameworks/Java/servlet3-cass/setup.py
  2. 5 0
      toolset/setup/linux/installer.py

+ 5 - 1
frameworks/Java/servlet3-cass/setup.py

@@ -20,7 +20,11 @@ def start(args, logfile, errfile):
     # output config + verify database connection
     subprocess.call("echo servlet3-cass application.properties", shell=True, stderr=errfile, stdout=logfile)
     subprocess.check_call("cat src/main/resources/application.properties", shell=True, cwd="servlet3-cass", stderr=errfile, stdout=logfile)
-    subprocess.call("for i in 1 2 3 4 5; do nc -vz "+args.database_host+" 9160  && echo 'c* ok' && break || echo 'waiting for c*'; sleep 2; done", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("echo checking connection to TFB DB host: "+args.database_host, shell=True, stderr=errfile, stdout=logfile)
+    # next two are for debugging
+    subprocess.call("uname -a", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("ps -ef", shell=True, stderr=errfile, stdout=logfile)
+    subprocess.call("for i in 1 2 3 4 5; do nc -vz "+args.database_host+" 9160  && echo 'C* ok' && break || echo 'waiting for C*'; sleep 2; if [ $i -eq '5' ]; then echo 'ERROR: failed to connect to Cassandra'; fi; done", shell=True, stderr=errfile, stdout=logfile)
     subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True, stderr=errfile, stdout=logfile)
     return 0
   except subprocess.CalledProcessError:

+ 5 - 0
toolset/setup/linux/installer.py

@@ -236,6 +236,11 @@ class Installer:
     apache-cassandra-$CASS_V/bin/cqlsh -f cassandra/tfb-data.cql {database_host}
     rm -rf apache-cassandra-*-bin.tar.gz cassandra
 
+    # next lines are for debugging
+    uname -a
+    ps -ef
+    ifconfig
+
     ##############################
     # Redis
     ##############################