-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
服务进程杀死后,再启动提示端口被占用 #1212
Comments
This issue has been marked as invalid question, please give more information by following the |
Windows 有 |
编译在windows,执行在Ubuntu。 |
|
试了下,看日志提示 |
不是只执行就 OK 了,执行完要看下是否还有进程在,方便的话可以放一下执行前后的截图 |
这是正好可以执行的情况,这是整个我操作的,一个是操作截图,一个是日志截图。您看是不是哪里有问题 |
netstat 之后是 |
还是不行 |
已解决了 |
有用的经验,方便的话可以分享下哦 |
服务进程通过kill-2 kill-9 关停后,重新通过nohup ./xxx & 提示端口号被占用
日志:panic: create netpoll listener fail: listen tcp 0.0.0.0:8523: bind: address already in use
-2 也看到了优雅停机的日志:
2024/10/14 17:45:08.359425 hertz.go:113: [Info] HERTZ: Received signal: interrupt
2024/10/14 17:45:08.359502 hertz.go:77: [Info] HERTZ: Begin graceful shutdown, wait at most num=5 seconds...
2024/10/14 17:45:08.361387 registry.go:121: [Info] HERTZ: deregister instance success
2024/10/14 17:45:08.361504 engine.go:314: [Info] HERTZ: Execute OnShutdownHooks finish
能否麻烦看看如何能正常重启服务
hertz版本:0.9.3
服务器环境:Ubuntu 22.04.3 LTS
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\jim\AppData\Local\go-build
set GOENV=C:\Users\jim\AppData\Roaming\go\env
set GOEXE=
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\jim\go_workplace\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=linux
set GOPATH=C:\jim\go_workplace;C:\Users\jim\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=C:/jim/dev_file/go/1.23.1
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\jim\dev_file\go\1.23.1\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.23.1
set GODEBUG=
set GOTELEMETRY=local
set GOTELEMETRYDIR=C:\Users\jim\AppData\Roaming\go\telemetry
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=C:\jim\work_place\ea\zang-purchase-complaint\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\jim\AppData\Local\Temp\go-build2843335204=/tmp/go-build -gno-record-gcc-switches
整体是在windows机器上执行go build -ldflags '-w -s -X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn'打包
二进制复制到测试服务器上执行启动
The text was updated successfully, but these errors were encountered: