new graphite install not showing graphs

Asked by JD

I've installed graphite and carbon from yum on CentOS 6.6 (using the EPEL repo). I compiled collectd from source. Collectd is running, and carbon-cache, carbon-aggregator, and carbon-relay are running. I can see wsp files getting updated under /var/lib/carbon.

But the graphite web interface doesn't show anything in the tree on the left. I see "Graphite", "My Graphs", and "User Graphs", but there's nothing under Graphite and the other two just show "No saved graphs". The search tab doesn't return anything, and the auto-completer doesn't autocomplete anything.

The only thing I can find that looks like an obvious problem is in /var/log/httpd/error.log:
[Tue Jul 28 16:03:49 2015] [error] Traceback (most recent call last):
[Tue Jul 28 16:03:49 2015] [error] File "/usr/lib64/python2.6/logging/handlers.py", line 77, in emit
[Tue Jul 28 16:03:49 2015] [error] self.doRollover()
[Tue Jul 28 16:03:49 2015] [error] File "/usr/lib64/python2.6/logging/handlers.py", line 329, in doRollover
[Tue Jul 28 16:03:49 2015] [error] os.rename(self.baseFilename, dfn)
[Tue Jul 28 16:03:49 2015] [error] OSError: [Errno 13] Permission denied

Any suggestions for where I should look?

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
JD
Solved:
Last query:
Last reply:
Revision history for this message
Piotr Popieluch (piotr1212) said :
#1

strange, it should work.

Could you check your permissions?
/var/lib/graphite-web (should be apache 755dirs/644 files
/var/lib/whisper/ (should be carbon 755dirs/644 files

Revision history for this message
Jason Dixon (jason-dixongroup) said :
#2

Disable SELinux.

Revision history for this message
Piotr Popieluch (piotr1212) said :
#3

it should work with selinux in enforcing mode.

Revision history for this message
JD (jdweiner) said :
#4

SELinux isn't on:
[root@vmperf121att17 ~]# getenforce
Disabled

The permissions and ownership on /var/lib/graphite-web look good:
[root@vmperf121att17 ~]# stat /var/lib/graphite-web/
  File: `/var/lib/graphite-web/'
  Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: fd00h/64768d Inode: 654558 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 48/ apache) Gid: ( 48/ apache)

but there are no files under it.

There is no /var/lib/whisper. There are wsp files under /var/lib/carbon/whisper; is that what you were referring to? Permissions and ownership there look OK.

[root@vmperf121att17 ~]# stat /var/lib/carbon/whisper/
  File: `/var/lib/carbon/whisper/'
  Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: fd00h/64768d Inode: 656737 Links: 8
Access: (0755/drwxr-xr-x) Uid: ( 497/ carbon) Gid: ( 497/ carbon)

[root@vmperf121att17 ~]# stat /var/lib/carbon/whisper/collectd/localhost/memory/memory-free.wsp
  File: `/var/lib/carbon/whisper/collectd/localhost/memory/memory-free.wsp'
  Size: 855412 Blocks: 1680 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 656792 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 497/ carbon) Gid: ( 497/ carbon)

Revision history for this message
Piotr Popieluch (piotr1212) said :
#5

yes I ment /var/lib/carbon/whisper

have you run?

  # /usr/bin/graphite-manage syncdb --noinput

that should create the files in /var/lib/graphite-web

Revision history for this message
JD (jdweiner) said :
#6

On Redhat/Centos it's manage.py, I think. I ran it and got this output, but the UI has not changed. (BTW, I have not bothered to change SECRET_KEY because this is just a test installation.)

[root@vmperf121att17 graphite]# vi /usr/lib/python2.6/site-packages/graphite/local_settings.py
[root@vmperf121att17 graphite]# ./manage.py syncdb --noinput
/usr/lib/python2.6/site-packages/graphite/settings.py:231: UserWarning: SECRET_KEY is set to an unsafe default. This should be set in local_settings.py for better security
  warn('SECRET_KEY is set to an unsafe default. This should be set in local_settings.py for better security')
/usr/lib/python2.6/site-packages/django/conf/__init__.py:75: DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
  "use STATIC_URL instead.", DeprecationWarning)
/usr/lib/python2.6/site-packages/django/core/cache/__init__.py:82: DeprecationWarning: settings.CACHE_* is deprecated; use settings.CACHES instead.
  DeprecationWarning
Creating tables ...
Creating table account_profile
Creating table account_variable
Creating table account_view
Creating table account_window
Creating table account_mygraph
Creating table dashboard_dashboard_owners
Creating table dashboard_dashboard
Creating table events_event
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table django_session
Creating table django_admin_log
Creating table django_content_type
Creating table tagging_tag
Creating table tagging_taggeditem
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Revision history for this message
JD (jdweiner) said :
#7

Minor update: but there IS a file under /var/lib/graphite-web now:

[root@vmperf121att17 graphite]# ls -l /var/lib/graphite-web/
total 68
-rw-r--r-- 1 root root 65536 Jul 29 11:26 graphite.db

Revision history for this message
Jason Dixon (jason-dixongroup) said :
#8

The db file needs to be writeable by the webserver user.

Revision history for this message
JD (jdweiner) said :
#9

I chown'ed the file, and didn't see any change. I tried restarting Apache and got a "database locked" error, but another stop/start cycle got things working! Thanks very much for the help.