Changeset 30534

2016-05-13T18:18:56+12:00 (8 years ago)
  1. BUGFIX. When running full-rebuild on a solr collection when the GS3 server is not running, the needs to start up and stop the tomcat server to get the solr server (off tomcat) to run and ingest the documents. However, once the tomcat is started up, it does not return ( is stuck in a while loop waiting for further output from ant start). The problem was with JDK version 1.7.0_55, as using the JRE 1.7.0_72 included with the GS307 binary works and so too does JDK 1.8.*. Dr Bainbridge solved the problem more generally by making the while loop exit when the Build Successful message of the ant start command is encountered. Dr Bainbridge also found that the call to fork() (which I'd copied into solrserver from solrjettyserver off which it was based) was no longer applicable and that the child process may similarly have got stuck. The fixes will ensure that the code will work regardless of whether anyone uses it conjunction with the buggy Java 1.7.0_55. 2. With this commit I have tested the recent refactoring of into (and changes to by testing full-rebuild and against both an already running GS3 server and when the server was not running. Works.
1 edited


  • gs3-extensions/solr/trunk/src/perllib/

    r29711 r30534  
    415415    while (defined($line=<STARTIN>)) {     
    417         #if ($line =~ m/^(BUILD FAILED/) {
     417        #if ($line =~ m/^(BUILD FAILED)/) {
    418418        print "Tomcat startup: $line";
    419419        #}
    420     }
     420        if ($line =~ m/^BUILD SUCCESSFUL/) {
     421            last;
     422        }
     423    }
     425    close(STARTIN);
    421427    if ($self->server_running()) {
    422428        $server_status = "explicitly-started";
    456462    print " $server_host:$server_port\n";
    458     # now we know the server is ready to accept connections, fork a
    459     # child process that continues to listen to the output and
    460     # prints out any lines that are not INFO lines
    462     if (fork()==0) {
    463         # child process
    465         my $line;
    466         while (defined ($line = <STARTIN>)) {
    468         # if here, then some non-trival message has been logged
    469         print "Tomcat/Solr processing: $line";
    470         }
    471         close(STARTIN);
    473         # And now stop nicely
    474         exit 0;
    475     }
    476     # otherwise let the parent continue on
     464    # now we know the server is ready to accept connections
    477465    }
    478466    elsif ($server_status eq "already-running") {
Note: See TracChangeset for help on using the changeset viewer.