kataras / rizla

:eyes: Rizla builds, runs and monitors your Go Applications with ease. See https://github.com/kataras/iris-cli for Iris users.
MIT License
190 stars 17 forks source link

Exit status 1 #15

Open vizo opened 6 years ago

vizo commented 6 years ago

Hey!

I am running rizla inside code (same code as in example) and after changing file i get:

A change has been detected, reloading now...kill: exit status 1 and it's never restarted. Using Ubuntu 17.10

Any idea?

rizla run main.go works as expected

kataras commented 6 years ago

Hello @vizo ,

We don't have rizla run command, you mean rizla main.go? The cli tool is using the rizla/rizla source code to do its job, so I can't find why it's working with cli but not with code, could you please share the code you're using and the path of your main.go file you want to watch and restart? Thank you very much

mythrnr commented 6 years ago

Same error occurred in docker container (golang:1.10.2-alpine3.7). Of course I use the command rizla main.go, I think rizla run main.go is simply mistake. :)

miculprogramator commented 6 years ago

same error for me :(

[INFO] 2018/07/03 11:30 A change has been detected, reloading now... [ERRO] 2018/07/03 11:30 kill: exit status 1

santakdalai90 commented 6 years ago

I usually get this error after some compilation issues

./main.go:42:52: syntax error: unexpected func, expecting comma or )
./main.go:45:3: syntax error: unexpected ) after top level declaration
[ERRO] 2018/08/20 21:54 exit status 2
[INFO] 2018/08/20 21:54 A change has been detected, reloading now...
[ERRO] 2018/08/20 21:54 kill: exit status 1

You may see that first I got compilation errors and exit status 2 and then I got exit status 1 even though the compilation issue is fixed. If I exit rizla and then re-run rizla main.go then it works fine.

hexadecy commented 5 years ago

From the CLI, it dies on every compile error for me. go1.12.1 darwin/amd64 (macOS 10.14.3)

api/authentication.go:33:4: syntax error: unexpected comma after top level declaration
[ERRO] 2019/03/19 20:49 exit status 2
[INFO] 2019/03/19 20:49 A change has been detected, reloading now...
[ERRO] 2019/03/19 20:49 kill: exit status 1
hexadecy commented 5 years ago

https://stackoverflow.com/questions/22470193/why-wont-go-kill-a-child-process-correctly @kataras please have a look at the solution for both mac and linux with syscall.

DevopsDood commented 5 years ago

Same issue here. Rizla will keep the app running but new version isn't run.

% rizla main.go                                                                                                                                                                                                         !8192
Now listening on: http://localhost:8080
Application started. Press CTRL+C to shut down.
[INFO] 2019/05/01 10:09 A change has been detected, reloading now...
[ERRO] 2019/05/01 10:09 kill: exit status 1

I remember when you could just run iris main.go and have iris do it nicely, doesn't seem to be a thing anymore :thinking:

DevopsDood commented 5 years ago

Anyone have a fix for this? I miss just running iris main.go

kataras commented 5 years ago

@DevopsDood on windows: devopsq.

@DevopsDood

I miss just running iris main.go

iris main.go used the rizla main.go under the hoods, wasn't different.


I cant test it on OSX atm but last time a user tested it it worked fine... so, @DevopsDood or @hexadecy can you test it locally on your machine and propose a PR or the correct line to modify in order to that work on you too? The line you have to edit is probably that one :https://github.com/kataras/rizla/blob/master/rizla/rizla.go#L260 or/and that one if you have to set attributes like SysProcAttr to the command before start. Thank you!

jqiris commented 5 years ago

I have encouter this problem too, when I use the command git pull from xxx, the result is:

[INFO] 2019/06/19 17:46 pname:A change has been detected, reloading now..
[ERRO] 2019/06/19 17:46 kill: exit status 1

the rizla version is v0.1.1 the go env is:

GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/goworkspace"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/stargames/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build039680231=/tmp/go-build -gno-record-gcc-switches"

I use the Go-Supervisor to maintain the project. hope to solve the problem, @kataras

kataras commented 5 years ago

I see @jqiris, thanks for the report. I will find some time to fix it. Currently I am in-burn with the upcoming release of Iris itself. Until then, you can use any external tools for restarting your apps on file changes, there are a lot that actually provide ton of features compared to rizla. Rizla is, deliberately, simple and it does the job. I am using rizla for my workflow on both of my machines (fedora 30 and windows 10) and it serves well enough, it is used by others I personally know and never reported a bug like this after the last release. At short; I will look into this but I have to tell you that it is not one of my high-priorities at the moment, fairly honestly.

jqiris commented 5 years ago

@kataras , ok, I hope you can solve the problem as soon as possible!

jqiris commented 5 years ago

I found centos7 suport reload have problems, Is red_hat enterprise is ok? or other operating system show in the pics image (I can find this operating system in aliyun, can’t find the fedora ) @kataras

在 2019年6月21日,上午5:21,Gerasimos (Makis) Maropoulos notifications@github.com 写道:

I see @jqiris https://github.com/jqiris, thanks for the report. I will find some time to fix it. Currently I am in-burn with the upcoming release of Iris itself. Until then, you can use any external tools for restarting your apps on file changes, there are a lot that actually provide ton of features compared to rizla. Rizla is, deliberately, simple and it does the job. I am using rizla for my workflow on both of my machines (fedora 30 and windows 10) and it serves well enough, it is used by others I personally know and never reported a bug like this after the last release. At short; I will look into this but I have to tell you that it is not one of my high-priorities at the moment, fairly honestly.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kataras/rizla/issues/15?email_source=notifications&email_token=ALVFQ6BHXK4IOS4ZJERWUKTP3PYF7A5CNFSM4ETM5G2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYGXMOA#issuecomment-504198712, or mute the thread https://github.com/notifications/unsubscribe-auth/ALVFQ6BATBYV76STGKBFKG3P3PYF7ANCNFSM4ETM5G2A.