kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (KYLIN-3697) check port availability when starts kylin instance
Date Tue, 20 Nov 2018 13:46:00 GMT


ASF GitHub Bot commented on KYLIN-3697:

shaofengshi closed pull request #353: KYLIN-3697 Check port availability when starts kylin

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/build/bin/ b/build/bin/
index cd745d4526..5b14e0af7d 100755
--- a/build/bin/
+++ b/build/bin/
@@ -80,4 +80,7 @@ then
         quit "Failed to create $SPARK_HISTORYLOG_DIR. Please make sure the user has right
\ No newline at end of file
+${KYLIN_HOME}/bin/ ||  exit 1;
diff --git a/build/bin/ b/build/bin/
new file mode 100644
index 0000000000..023fdef3b9
--- /dev/null
+++ b/build/bin/
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# See the License for the specific language governing permissions and
+# limitations under the License.
+source $(cd -P -- "$(dirname -- "$0")" && pwd -P)/
+# get port from configuraton
+kylin_port=`grep "<Connector port=" ${KYLIN_HOME}/tomcat/conf/server.xml |grep protocol=\"HTTP/1.1\"
| cut -d '=' -f 2 | cut -d \" -f 2`
+# check the availability of the port
+kylin_port_in_use=`netstat -tlpn | grep "\b${kylin_port}\b"`
+# if not available, prompt error messeage
+[[ -z ${kylin_port_in_use} ]] || quit "ERROR: Port ${kylin_port} is in use, please check
the availability of the port and re-start Kylin"


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:

> check port availability when starts kylin instance
> --------------------------------------------------
>                 Key: KYLIN-3697
>                 URL:
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: v2.5.1
>            Reporter: May Zhou
>            Priority: Minor
> As I ran the script and it turned out with no error message, and I ran the start
script, the console output indicated that a kylin instance had successfully started, but when
I visit the <host>:<port>/kylin, I found another service was running rather than
>   I can only find the error message in the kylin.out, which is not so user-friendly.
> > Caused by: Address already in use (Bind failed)
> 	at Method)
> 	at
> 	at
> I am wondering why check-env does not check the availability of port, and the error message
could be threw out more user-friendly.

This message was sent by Atlassian JIRA

View raw message