Comments (4)
probably option -r
from immortal.
currently testing with option -r
and in the config with retries
defaults to 0 which means unlimited
cmd: sleep 3
wait: 1
retries: 3
test using: immortal -c run.yml
from immortal.
Getting runtime error: invalid memory address or nil pointer dereference
when sending exit
signal and using immortaldir
The socket is created but the process is down or terminated, and when trying to get the pid the panic occurs:
4 func (d *Daemon) HandleStatus(w http.ResponseWriter, r *http.Request) {
3 status := Status{
2 Cmd: strings.Join(d.cfg.command, " "),
1 Fpid: d.fpid,
44 Pid: d.process.Pid(),
1 Count: atomic.LoadUint32(&d.count),
2 }
panic output:
Jan 5 11:53:24 M20160001 immortal[32915]: http: panic serving : runtime error: invalid memory address or nil pointer dereference
goroutine 18 [running]:
net/http.(*conn).serve.func1(0xc420128000)
/usr/local/Cellar/go/1.9.2/libexec/src/net/http/server.go:1697 +0xd0
panic(0x12e5260, 0x14de060)
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/panic.go:491 +0x283
github.com/immortal/immortal.(*process).Pid(...)
/Users/nbari/projects/go/src/github.com/immortal/immortal/process.go:158
github.com/immortal/immortal.(*Daemon).HandleStatus(0xc4200606c0, 0x14b4920, 0xc42013a000, 0xc420130000)
/Users/nbari/projects/go/src/github.com/immortal/immortal/socket.go:44 +0x90
github.com/immortal/immortal.(*Daemon).HandleStatus-fm(0x14b4920, 0xc42013a000, 0xc420130000)
/Users/nbari/projects/go/src/github.com/immortal/immortal/socket.go:33 +0x48
net/http.HandlerFunc.ServeHTTP(0xc420042cb0, 0x14b4920, 0xc42013a000, 0xc420130000)
/usr/local/Cellar/go/1.9.2/libexec/src/net/http/server.go:1918 +0x44
github.com/nbari/violetear.(*Router).ServeHTTP(0xc4200f9110, 0x14b4920, 0xc42013a000, 0xc420130000)
/Users/nbari/projects/go/src/github.com/nbari/violetear/violetear.go:285 +0x43c
net/http.serverHandler.ServeHTTP(0xc420112000, 0x14b4920, 0xc42013a000, 0xc420130000)
/usr/local/Cellar/go/1.9.2/libexec/src/net/http/server.go:2619 +0xb4
net/http.(*conn).serve(0xc420128000, 0x14b4e60, 0xc420116100)
/usr/local/Cellar/go/1.9.2/libexec/src/net/http/server.go:1801 +0x71d
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.9.2/libexec/src/net/http/server.go:2720 +0x288
This happens wuen using wait
, there will be no process after X ammount of time:
Jan 5 12:59:32 M20160001 immortal[65951]: runtime error: invalid memory address or nil pointer dereference
Jan 5 12:59:32 M20160001 immortal[65951]: d = &{cfg:0xc4200b0500 count:1 lock:1 lockOnce:0 fpid:false process:<nil> quit:0xc420078120
So need to check if the process exists before trying to get the PID.
from immortal.
fixed in 0.18.0
from immortal.
Related Issues (20)
- How do you stop a process? HOT 3
- Have a lot of Defunct process when running immortal in a docker container HOT 1
- validate config file HOT 6
- Immortal on Raspberry HOT 13
- as Docker container process manager HOT 1
- Log files reopening HOT 3
- immortaldir should stop all services on exit HOT 1
- Improve web docs HOT 3
- Custom 'cleanup' action HOT 12
- immortaldir crashes with a high number of processes HOT 3
- immortal 0.24.0/0.24.1 upgrade issue HOT 5
- Are packagecloud immortal packages still maintained? HOT 2
- Lack of orthogonality: cmd vs require_cmd HOT 2
- Stopping a process HOT 2
- Custom immortaldir with wildcard? HOT 1
- Failing to install Immortal based on packagecloud.io HOT 2
- Require network
- jammy build HOT 2
- curl -s https://packagecloud.io/install/repositories/immortal/immortal/script.rpm.sh | sudo bash (Fails)
- option to keep trying and only stop when exit 0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from immortal.