This is an automated email from the ASF dual-hosted git repository.
imbajin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hugegraph.git
The following commit(s) were added to refs/heads/master by this push:
new bcaa5f1ae fix(server): fix check_port port extraction for schemeless
URLs (#3005)
bcaa5f1ae is described below
commit bcaa5f1ae5655dde3e73137c27cbd9c88e6c542f
Author: Himanshu Verma <[email protected]>
AuthorDate: Sat Apr 25 12:44:03 2026 +0530
fix(server): fix check_port port extraction for schemeless URLs (#3005)
---
hugegraph-pd/hg-pd-dist/src/assembly/static/bin/util.sh | 2 +-
hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh | 2 +-
hugegraph-store/hg-store-dist/src/assembly/static/bin/util.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/util.sh
b/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/util.sh
index 5cc0c355b..0b7ad0f0f 100644
--- a/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/util.sh
+++ b/hugegraph-pd/hg-pd-dist/src/assembly/static/bin/util.sh
@@ -83,7 +83,7 @@ function process_id() {
# check the port of rest server is occupied
function check_port() {
- local port=`echo $1 | awk -F':' '{print $3}'`
+ local port=$(echo "$1" | sed 's|.*:||' | sed 's|/.*||')
if ! command_available "lsof"; then
echo "Required lsof but it is unavailable"
exit 1
diff --git a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh
b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh
index 11979b648..e2655c69d 100755
--- a/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh
+++ b/hugegraph-server/hugegraph-dist/src/assembly/static/bin/util.sh
@@ -81,7 +81,7 @@ function process_id() {
# check the port of rest server is occupied
function check_port() {
- local port=$(echo "$1" | awk -F':' '{print $3}')
+ local port=$(echo "$1" | sed 's|.*:||' | sed 's|/.*||')
if ! command_available "lsof"; then
echo "Required lsof but it is unavailable"
exit 1
diff --git a/hugegraph-store/hg-store-dist/src/assembly/static/bin/util.sh
b/hugegraph-store/hg-store-dist/src/assembly/static/bin/util.sh
index 93b55311c..3b3d66010 100644
--- a/hugegraph-store/hg-store-dist/src/assembly/static/bin/util.sh
+++ b/hugegraph-store/hg-store-dist/src/assembly/static/bin/util.sh
@@ -82,7 +82,7 @@ function process_id() {
# check the port of rest server is occupied
function check_port() {
- local port=`echo $1 | awk -F':' '{print $3}'`
+ local port=$(echo "$1" | sed 's|.*:||' | sed 's|/.*||')
if ! command_available "lsof"; then
echo "Required lsof but it is unavailable"
exit 1