Hi all,

we have a problem trying to stop a BaseX HTTP server with the Windows task scheduler. The server ist started with a maven profile, calling

mvn exec:java -Pstart

pom.xml extract see below, and can also be stopped directly with the corresponding stop profile by a batch file:

cd /D "%~dp0"
mvn exec:java -Pstop

But calling this batch profile in task scheduler works fine on our local computers, but does not work on the server (Windows Server 2012). On this machine, executing the stop profile by the task scheduler results in a message

HTTP server was started (port: 8985).

in the console window of the process to be stopped, but it continues running anyway.

Any ideas regarding this strange behavior?

Can we stop the server with a simple HTTP request? Calling localhost:8985 in the browser also results only in the message above.

Thanks in advance for any hints.

Best regards,

  Markus


Extract from pom.xml:


    <profile>
      <id>start</id>
      <build>
        <plugins>
          <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
            <version>1.4.0</version>
            <configuration>
<mainClass>org.basex.BaseXHTTP</mainClass>
              <arguments>
                <argument>-h9894</argument>
                <argument>-s8985</argument>
                <argument>-p1985</argument>
                <argument>-Urestxq</argument>
              </arguments>
              <additionalClasspathElements>
<additionalClasspathElement>src/main/resources</additionalClasspathElement>
              </additionalClasspathElements>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>stop</id>
      <build>
        <plugins>
          <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
            <version>1.4.0</version>
            <configuration>
<mainClass>org.basex.BaseXHTTP</mainClass>
              <arguments>
                <argument>-s8985</argument>
                <argument>stop</argument>
              </arguments>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>


--
Markus Wittenberg

Tel +49 (0)341 248 475 36
Mail [email protected]

----

axxepta solutions GmbH
Lehmgrubenweg 17, 88131 Lindau

Amtsgericht Berlin HRB 97544B
Geschäftsführer: Karsten Becke, Maximilian Gärber

Reply via email to