IoTDB Edge: stop-edge.sh does not stop its own process when IOTDB_HOME is set, and reports success
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Bắt đầu với các dòng 23-24 của sbin/start-edge.sh và sbin/stop-edge.sh, đặc biệt là is_same_edge_home ở các dòng 27-37, sau đó tái hiện trường hợp cài đặt được liên kết bằng symlink với IOTDB_HOME được thiết lập. Xác minh rằng tiến trình được khởi động thông qua đường dẫn môi trường được dừng, tệp PID được xử lý chính xác và chuỗi dừng/khởi động lại không còn để tiến trình cũ tiếp tục phục vụ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Search before asking
- I searched in the issues and found nothing similar.
Version
master (1106d85, the merge of #18538). Not present in any release yet.
Describe the bug and provide the minimal reproduce step
sbin/stop-edge.sh can decline to stop its own Edge process, report success, and
delete the PID file, leaving the process running.
start-edge.sh honours an IOTDB_HOME taken from the environment:
:23 if [ -z "${IOTDB_HOME}" ]; then
:24 export IOTDB_HOME="$(cd "$(dirname "$0")"/.. && pwd)"
and passes that value to the JVM as -DIOTDB_HOME=.... stop-edge.sh recomputes
it unconditionally from its own location:
:23 IOTDB_HOME="$(cd "$(dirname "$0")"/.. && pwd)"
and is_same_edge_home (:27-37) matches the process command line against that
string. When the two differ, the match fails.
A versioned install behind a symlink is enough. With $ROOT standing in for the
install parent, $ROOT/iotdb symlinked to $ROOT/apache-iotdb-2.0.11-SNAPSHOT-edge-bin:
process command line -DIOTDB_HOME=$ROOT/iotdb
stop-edge.sh computes $ROOT/apache-iotdb-2.0.11-SNAPSHOT-edge-bin
$ $ROOT/apache-iotdb-2.0.11-SNAPSHOT-edge-bin/sbin/stop-edge.sh
Ignoring stale PID file $ROOT/apache-iotdb-2.0.11-SNAPSHOT-edge-bin/edge.pid; PID 63474 does not belong to this IoTDB Edge installation.
No IoTDB Edge process from $ROOT/apache-iotdb-2.0.11-SNAPSHOT-edge-bin is running.
$ echo $?
0
pid 63474 still running, 10710 and 6667 both still listening
Because :96 has already removed the PID file, a second attempt prints only the
last line, which is byte-identical to what the script prints when nothing was
ever started.
What did you expect to see?
stop-edge.sh stops the Edge process started from the same installation, and a
restart under a service manager picks up configuration changes.
What did you see instead?
A restart under a service manager reports success at both ends while nothing
happens. Simulating Environment=IOTDB_HOME=$ROOT/iotdb with ExecStart and
ExecStop given the real install path, and changing dn_rpc_port from 6667 to
6668 in between:
1) ExecStart exit=0 pid 6669 up, 6667 listening
2) operator edits dn_rpc_port to 6668
3) ExecStop exit=0 pid 6669 still running
4) ExecStart exit=0 "The cn_internal_port 10710 is already occupied, PID: 6669"
"Exit because there are occupied ports."
5) result the old process is still serving with the old configuration
6668 never listens, 6667 still does, edge.pid is now empty
checkConfigNodePortUsages also exits 0 when ports are occupied, so both halves
of the restart look successful. The configuration change silently never takes
effect and nothing is logged.
Anything else?
Four start/stop environment combinations, each from a fresh extraction of the
packaged Edge archive. Every row was confirmed to have 10710 actually listening
before the stop was issued:
start with IOTDB_HOME stop with IOTDB_HOME result
---------------------- --------------------- --------------------
symlink real path process still running
symlink unset process still running
unset symlink stopped
unset unset stopped
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Ngôn ngữ chính
- Java
- Star
- 6.4k
- Fork
- 1.2k
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 152
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/iotdb
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
apache/iotdb#18655 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] 执行start-all.sh后无法启动集群问题Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] findColumn throws NullPointerException instead of SQLException for an unknown column nameĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
checkstyle/checkstyle#21755 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/copilot-sdk#2782 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make docs website more visibleĐang mởdocumentation Good for newcomer quick win
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CodeForPhilly/benefit-decision-toolkit#519 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area-deployment triage:bot-seen triage:needs-human
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/aspire#20533 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày