INFO - Started Jetty Server, but does not finish

Deadly 提交于 2021-01-27 18:35:46

问题


I am trying to setup Dashbuilder. I have worked through a couple issues already (one with the help of others here, thank you). I am at the point where the program must be compiled, built, and run using command

./buildandrun.sh h2

things start off as expected, but then just stop at "[INFO] Started Jetty Server" in terminal.

I've let it sit for hours, no progress. I tried running with the -X flag, but no extra info for that step appeared. When I try to visit http://localhost:8080/dashbuilder to see if the program started I get a 503 error and see

HTTP ERROR: 503

Problem accessing /dashbuilder. Reason:

Service Unavailable

Powered by Jetty:// 9.3.9.v20160517

How can I see in better detail what and why something like this is happening?

Contents of the SH file are:

#!/bin/bash
if [ "$1" = "" ] ; then
   echo "Build & Run the application for a given database."
   echo ""
   echo "USAGE: buildandrun.sh [h2|postgres]"
else
  echo "-----------------------------------------------------------------"
  echo "Building & Running the application for the '$1' database..."
  echo "------------------------------------------------------------------"

  cd ..
  mvn clean install -P $1,jetty  $2 $3 $4

  export MAVEN_OPTS="-Xms1024M -Xmx2048M -XX:MaxPermSize=512m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
  cd modules/dashboard-showcase/
  mvn jetty:run -P $1,jetty
fi

回答1:


The jetty:run goal of the jetty-maven-plugin does exactly that.

It runs Jetty, normally, and waits for the user to terminate it (either with TERM, KILL, Ctrl+C, use of the Shutdown facilities)

That mvn jetty:run command never returns.

Perhaps you wanted to use mvn jetty:start and mvn jetty:stop

See: https://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html#jetty-start-goal



来源:https://stackoverflow.com/questions/37418408/info-started-jetty-server-but-does-not-finish

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!