Comments (7)
What distro is this and did you build a package?
from diamond.
CentOS release 6.2 (Final), built using make buildrpm
using the latest git
from diamond.
I think 63d28b3 might do the trick, or at least help us track it down
from diamond.
$ grep "Failed to write pid." /usr/bin/diamond < -- check to be sure the new package is installed
print >> sys.stderr, "Failed to write pid." % (e)
$ sudo rm /var/log/diamond/*.log*
$ sudo /etc/init.d/diamond start
Starting diamond: Error occurs when initialize logging: [Errno 13] Permission denied: '/var/log/diamond/diamond.log'
[ OK ]
$ pgrep -fl diamond <-- process running? no
$ sudo su -
# touch /var/log/diamond/diamond.log && chown nobody:nobody /var/log/diamond/diamond.log && ls -alh /var/log/diamond/diamond.log
-rw-r--r-- 1 nobody nobody 0 Jul 19 06:29 /var/log/diamond/diamond.log
# /etc/init.d/diamond start
Starting diamond: [ OK ]
# pgrep -fl diamond <-- still not running
# cd /var/log/diamond/
# ls -alh
total 12K
drwxr-xr-x 2 root root 4.0K Jul 19 06:29 .
drwxr-xr-x. 12 root root 4.0K Jul 15 03:26 ..
-rw-r--r-- 1 nobody nobody 140 Jul 19 06:29 diamond.log
-rw-r--r-- 1 root root 0 Jul 16 18:30 .keep
# cat diamond.log
[2012-07-19 06:29:47,920] [MainThread] Changed UID: 99 (nobody) GID: 99 (nobody).
[2012-07-19 06:29:47,920] [MainThread] Detaching Process.
from diamond.
running in foreground works. the process runs as nobody:nobody and submits its stats.
in background. note that your "Failed to write pid" check won't work as you're attempting to write to stderr after closing it. so change it to log.error()
or something. also you forgot a %s
, now your code yields a not all arguments converted during string formatting
btw in /var/log/messages i'm getting these:
Jul 19 06:51:42 nyvimeodfs1 python: abrt: detected unhandled Python exception in /usr/bin/diamond
Jul 19 06:51:42 nyvimeodfs1 abrtd: New client connected
Jul 19 06:51:42 nyvimeodfs1 abrt-server[29092]: Saved Python crash dump of pid 29090 to /var/spool/abrt/pyhook-2012-07-19-06:51:42-29090
Jul 19 06:51:42 nyvimeodfs1 abrtd: Directory 'pyhook-2012-07-19-06:51:42-29090' creation detected
Jul 19 06:51:42 nyvimeodfs1 abrt-server[29092]: statvfs('(null)'): Bad address
Jul 19 06:51:42 nyvimeodfs1 abrtd: Package 'diamond' isn't signed with proper key
Jul 19 06:51:42 nyvimeodfs1 abrtd: Corrupted or bad dump /var/spool/abrt/pyhook-2012-07-19-06:51:42-29090 (res:2), deleting
unfortunately there's nothing in /var/spool/abrt/
Anyway, after fixing the pidfile stderr stuff got:
Failed to write pid: [Errno 13] Permission denied: '/var/run/diamond.pid'
maybe you should first create it as the user invoked as (root), before dropping privileges. not sure...
from diamond.
deployed a new rpm built from your personal fork, seems to work fine!
from diamond.
Awesome!
from diamond.
Related Issues (20)
- please add more per-node metrics to ElasticSearchCollector HOT 1
- MongoDBCollector auth issue pymongo 3.0.3 HOT 5
- Document threading HOT 3
- Doesn't work in python3.5 HOT 1
- Castome HOT 5
- BrightcoveOs/Diamond Libvirtkvm Collector is Not working In KVM Hypervisor HOT 1
- Load averages do not contain scaled versions
- Unable to send solrColletor data to graphite HOT 3
- RedisCollector: failed to connect to localhost:6379. __init__() got an unexpected keyword argument 'unix_socket_path'. HOT 2
- Error: I/O operation in RabbitMQ Collector HOT 1
- CPU collector not precise HOT 2
- ElasticSearch collector doesn't work on ElasticSearch 2.0 HOT 2
- cephstats.py not support ceph version 10.2.2 HOT 1
- Start in SUSE error HOT 5
- Missing PuppetDBCollector example HOT 1
- Diamond not getting started HOT 2
- mongodb collector is not working HOT 2
- ProcessStatCollector must not calculate derivative of procs_running and procs_blocked HOT 2
- Change project description to say about depreciation HOT 1
- Building deb package from source 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 diamond.