Comments (22)
@gmartsenkov are you having the same issue?
I'm unsure if this could have been caused by some kind of recent OS upgrade. It was working fine prior to running apt upgrade
on my servers.
from inspeqtor.
The code is reading /proc/<pid>/status
and looking for the VmRSS
line. That error would occur if there was an empty line in the output. Can you show me what /proc/1357/status
looks like?
from inspeqtor.
@mperham Hi Mike, here you go:
Name: ruby
State: S (sleeping)
Tgid: 1357
Ngid: 0
Pid: 1357
PPid: 1
TracerPid: 0
Uid: 1001 1001 1001 1001
Gid: 1002 1002 1002 1002
FDSize: 256
Groups: 1001 1002
NStgid: 1357
NSpid: 1357
NSpgid: 1357
NSsid: 1357
VmPeak: 200632 kB
VmSize: 140688 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 17856 kB
VmRSS: 17856 kB
VmData: 78352 kB
VmStk: 8188 kB
VmExe: 3188 kB
VmLib: 6704 kB
VmPTE: 156 kB
VmPMD: 12 kB
VmSwap: 0 kB
HugetlbPages: 0 kB
Threads: 3
SigQ: 0/7930
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000000000
SigCgt: 00000001c2317e4f
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000003fffffffff
CapAmb: 0000000000000000
Seccomp: 0
Speculation_Store_Bypass: vulnerable
Cpus_allowed: 7fff
Cpus_allowed_list: 0-14
Mems_allowed: 00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 13074
nonvoluntary_ctxt_switches: 415
from inspeqtor.
Yep, there's the blank line.
from inspeqtor.
Oh I see you made a fix, awesome! My ansible role is using apt to install. Are you going to cut a release as well?
Thanks so much!
from inspeqtor.
I'm working on #146 and will release 2.0 with the Pro functionality sometime soon.
from inspeqtor.
Great, and in the meantime, is there a way to patch the issue on my side?
from inspeqtor.
@mperham So I compiled by hand and now I'm getting this:
May 31 21:07:22 app-01 inspeqtor[16443]: panic: runtime error: index out of range
May 31 21:07:22 app-01 inspeqtor[16443]: goroutine 15 [running]:
May 31 21:07:22 app-01 inspeqtor[16443]: github.com/mperham/inspeqtor/metrics.totalRssCollector(0x54d, 0xc42001c7d0, 0x0, 0x0)
May 31 21:07:22 app-01 inspeqtor[16443]: /Users/allaire/.go/src/github.com/mperham/inspeqtor/metrics/process.go:158 +0x785
May 31 21:07:22 app-01 inspeqtor[16443]: github.com/mperham/inspeqtor/metrics.(*processStorage).Collect(0xc42001c7d0, 0x54d, 0x848dc0, 0xc420065ef0)
May 31 21:07:22 app-01 inspeqtor[16443]: /Users/allaire/.go/src/github.com/mperham/inspeqtor/metrics/process.go:238 +0x12f
May 31 21:07:22 app-01 inspeqtor[16443]: github.com/mperham/inspeqtor.(*Service).Collect(0xc420065ef0, 0x847900, 0xc4200532a0)
May 31 21:07:22 app-01 inspeqtor[16443]: /Users/allaire/.go/src/github.com/mperham/inspeqtor/types.go:148 +0x1a1
May 31 21:07:22 app-01 inspeqtor[16443]: created by github.com/mperham/inspeqtor.(*Inspeqtor).scan
May 31 21:07:22 app-01 inspeqtor[16443]: /Users/allaire/.go/src/github.com/mperham/inspeqtor/inspeqtor.go:293 +0x186
May 31 21:07:22 app-01 systemd[1]: inspeqtor.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
May 31 21:07:22 app-01 systemd[1]: inspeqtor.service: Unit entered failed state.
May 31 21:07:22 app-01 systemd[1]: inspeqtor.service: Failed with result 'exit-code'.
May 31 21:07:23 app-01 systemd[1]: inspeqtor.service: Service hold-off time over, scheduling restart.
May 31 21:07:23 app-01 systemd[1]: Stopped Inspeqtor.
May 31 21:07:23 app-01 systemd[1]: inspeqtor.service: Start request repeated too quickly.
from inspeqtor.
So I'm no Go expert (never used it before), but I took your fix:
if len(line) == 0 {
continue
}
and I copied it where I found for _, line := range lines {
in process.go
, and now it works. 🤷♂️
from inspeqtor.
Good call, updated.
from inspeqtor.
I was getting a similar error, but for nginx - basically, if the status endpoint does not exist inspeqtor fails to start with a vague error, had to dig in through the code to figure it out
from inspeqtor.
from inspeqtor.
@mperham AFAIK ngx_http_stub_status_module
is not built/setup by default.
http://nginx.org/en/docs/http/ngx_http_stub_status_module.html
https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/
Maybe @gmartsenkov thought that nginx exposed this endpoint by default.
from inspeqtor.
Oh, I was thinking of /etc/<pid>/status
. Nevermind. Didn't realize you were talking about nginx-specific metric collection. That's a separate issue, not this one.
from inspeqtor.
I was also running into this with inspeqtor-1.0.1-1 on Ubuntu Xenial and Linux 4.4.0-128-generic.
Compiling Inspeqtor from master and replacing the binary on the server fixed the problem.
from inspeqtor.
+1 have same issue
from inspeqtor.
sudo service inspeqtor status
● inspeqtor.service - Inspeqtor
Loaded: loaded (/lib/systemd/system/inspeqtor.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Tue 2018-06-19 20:31:37 UTC; 2s ago
Process: 19189 ExecStart=/usr/bin/inspeqtor -c /etc/inspeqtor -s /var/run/inspeqtor.sock (code=exited, status=2)
Process: 19186 ExecStartPre=/bin/rm -f /var/run/inspeqtor.sock (code=exited, status=0/SUCCESS)
Main PID: 19189 (code=exited, status=2)
Jun 19 20:31:36 ip-172-31-20-112 inspeqtor[19189]: /Users/mike/src/github.com/mperham/inspeqtor/types.go:148 +0x21d
Jun 19 20:31:36 ip-172-31-20-112 inspeqtor[19189]: created by github.com/mperham/inspeqtor.(*Inspeqtor).scan
Jun 19 20:31:36 ip-172-31-20-112 inspeqtor[19189]: /Users/mike/src/github.com/mperham/inspeqtor/inspeqtor.go:295 +0x217
Jun 19 20:31:36 ip-172-31-20-112 systemd[1]: inspeqtor.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 19 20:31:36 ip-172-31-20-112 systemd[1]: inspeqtor.service: Unit entered failed state.
Jun 19 20:31:36 ip-172-31-20-112 systemd[1]: inspeqtor.service: Failed with result 'exit-code'.
Jun 19 20:31:37 ip-172-31-20-112 systemd[1]: inspeqtor.service: Service hold-off time over, scheduling restart.
Jun 19 20:31:37 ip-172-31-20-112 systemd[1]: Stopped Inspeqtor.
Jun 19 20:31:37 ip-172-31-20-112 systemd[1]: inspeqtor.service: Start request repeated too quickly.
Jun 19 20:31:37 ip-172-31-20-112 systemd[1]: Failed to start Inspeqtor.
from inspeqtor.
How to fix it?
from inspeqtor.
inspeqtor -v
Inspeqtor 1.0.1
from inspeqtor.
How to fix it?
- Install golang and make
- Clone the inspeqtor repo
- Run
make
- Copy
inspeqtor
to/usr/bin/inspeqtor
- Restart inspeqtor service
Or wait for a new release…
from inspeqtor.
Master is now 2.0.0-rc. If someone wants to rebuild, smoke test it on their server and give me a thumbs up, I'll release 2.0.0.
from inspeqtor.
I've installed the latest build from master on a server, I'll see how it goes.
from inspeqtor.
Related Issues (20)
- Suggestions for monitoring systemd-exported foreman services? HOT 4
- Inspeqtor appears to lose track of running process (does not exist: no such process). HOT 3
- Alerting via Amazon SES HOT 1
- Monitoring Passenger when it's automatically started by nginx HOT 2
- No sidekiq service in "sudo inspeqtorctl status"
- Inspecqtor won't start if alert config missing HOT 6
- Getting a swap alert when swap is at 0 HOT 10
- Support for sending via Amazon SES API
- Inspeqtor repo is down HOT 3
- packagecloud too many requests / Bandwidth or Storage Limit Exceeded HOT 1
- Better CPU / Memory accounting using CGroups
- Simplify or document build process
- monitor mysql failed on Ubuntu 16.04
- Error in S0: When running on Arch Linux
- Unable to install on Ubuntu 18.04.1 HOT 1
- INQ Configuration question HOT 3
- metrics explanation needed HOT 1
- How to target a service instance that has @ symbole ?
- inspeqtorctl fails with nc: invalid option -- 'U' (workaround possible) HOT 3
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 inspeqtor.