Changeset 26994

Show
Ignore:
Timestamp:
05.03.2013 10:36:41 (7 years ago)
Author:
jmt12
Message:

Adding some more debug messages to ensure TDBServer is starting on the correct host. Eventually found I had localhost hardcoded in the TDBServer.pl launcher and that isn't the write interface for compute nodes to see it (needs to be on medusa.local)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/tdb-edit/trunk/src/perllib/dbutil/tdbserver.pm

    r26085 r26994  
    6868 
    6969  my $server_lockfile_path =  &util::filename_cat($ENV{'GSDLHOME'},'collect',$collection,'tmp','tdbserver.lock'); 
    70   #rint " * Searching for lockfile: " . $server_lockfile_path . "\n"; 
     70  print " * Searching for TDBServer lockfile...\n"; 
    7171  if (!-e $server_lockfile_path) 
    7272  { 
     73    print "Not found.\n"; 
    7374    # We need to lock here to ensure only one thread enters the following code, 
    7475    # sees a missing TDBServer, and launches it 
     
    8283      # ...start it! 
    8384      my $launch_cmd = 'TDBServer.pl "' . $$ . '" "' . $collection . '"'; 
    84       print "* Starting TDBServer for: " . $collection . " [" . $launch_cmd . "]\n"; 
     85      print "* Starting TDBServer for: " . $collection . " [" . $launch_cmd . "]... "; 
    8586      # @note I once had the below pipe ending with 2>&1 |, but that then blocks 
    8687      #       indefinitely when looping and reading <SERVERIN>. 
     
    8990      my $line = ''; 
    9091      my $server_lock_file_created = 0; 
     92      my $server_host = ''; 
     93      my $server_port = ''; 
    9194      while ($line = <SERVERIN>) 
    9295      { 
    9396        # - watch for the line indicating a lock file has been created and 
    9497        #   populated with a sexy port number 
    95         if ($line =~ /Server now listening/) 
     98        if ($line =~ /Server now listening on ([^:]+):(\d+)/) 
    9699        { 
     100          $server_host = $1; 
     101          $server_port = $2; 
    97102          $server_lock_file_created = 1; 
    98103        } 
     
    114119        die("Error! TDBServer failed to create lock file. Check server logs."); 
    115120      } 
     121      else 
     122      { 
     123        print "Running on " . $server_host . ":" . $server_port . "\n"; 
     124      } 
    116125      # record this for later 
    117126      $created_server_lockfile_paths{$server_lockfile_path} = 1; 
     
    120129    close($tmp_lockfile_path); 
    121130    unlink($tmp_lockfile_path); 
     131  } 
     132  else 
     133  { 
     134    print "Found!\n"; 
    122135  } 
    123136  # record this for later