You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/07/24 14:55:46 UTC

[GitHub] htynkn closed pull request #4: Fix bugs: class no found for servlet; no applications, services... menu entries; no log output. enhance script start.sh

htynkn closed pull request #4: Fix bugs: class no found for servlet; no applications, services... menu entries; no log output. enhance script start.sh
URL: https://github.com/apache/incubator-dubbo-ops/pull/4
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/dubbo-monitor-simple/pom.xml b/dubbo-monitor-simple/pom.xml
index 0443934..0a422d3 100644
--- a/dubbo-monitor-simple/pom.xml
+++ b/dubbo-monitor-simple/pom.xml
@@ -58,10 +58,13 @@ limitations under the License.
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
         </dependency>
+        <dependency>
+           <groupId>org.slf4j</groupId>
+           <artifactId>slf4j-log4j12</artifactId>
+        </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>javax.servlet-api</artifactId>
-            <scope>provided</scope>
         </dependency>
     </dependencies>
     <build>
diff --git a/dubbo-monitor-simple/src/main/resources/META-INF/assembly/bin/start.sh b/dubbo-monitor-simple/src/main/resources/META-INF/assembly/bin/start.sh
index 3b491f0..026903a 100755
--- a/dubbo-monitor-simple/src/main/resources/META-INF/assembly/bin/start.sh
+++ b/dubbo-monitor-simple/src/main/resources/META-INF/assembly/bin/start.sh
@@ -5,10 +5,16 @@ cd ..
 DEPLOY_DIR=`pwd`
 CONF_DIR=$DEPLOY_DIR/conf
 
+
 SERVER_NAME=`sed '/dubbo.application.name/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
 SERVER_PROTOCOL=`sed '/dubbo.protocol.name/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
-SERVER_HOST=`sed '/dubbo.protocol.host/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
-SERVER_PORT=`sed '/dubbo.protocol.port/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
+if [ -z "$SERVER_HOST" ]; then
+    SERVER_HOST=`sed '/dubbo.protocol.host/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
+fi
+
+if [ -z "$SERVER_PORT" ]; then
+    SERVER_PORT=`sed '/dubbo.protocol.port/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
+fi
 LOGS_FILE=`sed '/dubbo.log4j.file/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'`
 
 if [ -z "$SERVER_HOST" ]; then
@@ -48,7 +54,7 @@ STDOUT_FILE=$LOGS_DIR/stdout.log
 LIB_DIR=$DEPLOY_DIR/lib
 LIB_JARS=`ls $LIB_DIR|grep .jar|awk '{print "'$LIB_DIR'/"$0}'|tr "\n" ":"`
 
-JAVA_OPTS=" -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true "
+JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true "
 JAVA_DEBUG_OPTS=""
 if [ "$1" = "debug" ]; then
     JAVA_DEBUG_OPTS=" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n "
@@ -90,3 +96,11 @@ echo "OK!"
 PIDS=`ps -f | grep java | grep -v grep | grep "$DEPLOY_DIR" | awk '{print $2}'`
 echo "PID: $PIDS"
 echo "STDOUT: $STDOUT_FILE"
+
+if [ "$1" = "run" ]; then
+    while ps -p $PIDS > /dev/null
+    do
+        echo -e ".\c"
+        sleep 1 
+    done
+fi
diff --git a/dubbo-monitor-simple/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.container.Container b/dubbo-monitor-simple/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.container.Container
index 2e6beaa..b3bfcf6 100644
--- a/dubbo-monitor-simple/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.container.Container
+++ b/dubbo-monitor-simple/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.container.Container
@@ -1,2 +1,2 @@
 registry=com.alibaba.dubbo.monitor.simple.container.RegistryContainer
-jetty=com.alibaba.dubbo.monitor.simple.container.JettyContainer
\ No newline at end of file
+jetty-monitor=com.alibaba.dubbo.monitor.simple.container.JettyContainer
\ No newline at end of file
diff --git a/dubbo-monitor-simple/src/main/resources/conf/dubbo.properties b/dubbo-monitor-simple/src/main/resources/conf/dubbo.properties
index ef75f17..9bece5f 100644
--- a/dubbo-monitor-simple/src/main/resources/conf/dubbo.properties
+++ b/dubbo-monitor-simple/src/main/resources/conf/dubbo.properties
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-dubbo.container=log4j,spring,registry,jetty
+dubbo.container=log4j,spring,registry,jetty-monitor
 dubbo.application.name=simple-monitor
 dubbo.application.owner=dubbo
 #dubbo.registry.address=multicast://224.5.6.7:1234
@@ -23,7 +23,7 @@ dubbo.registry.address=zookeeper://127.0.0.1:2181
 dubbo.protocol.port=7070
 dubbo.jetty.port=8080
 dubbo.jetty.directory=${user.home}/monitor
-dubbo.charts.directory=${dubbo.jetty.directory}/charts
+dubbo.charts.directory=${user.home}/monitor/charts
 dubbo.statistics.directory=${user.home}/monitor/statistics
 dubbo.log4j.file=logs/dubbo-monitor-simple.log
 dubbo.log4j.level=WARN
\ No newline at end of file


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org