Giter Club home page Giter Club logo

docker-graphite's Issues

Update to Django 1.9.x Breaks Supervisor Config

I am using supervisor to start the graphite webapp on a docker container. The command

/usr/bin/gunicorn_django -b127.0.0.1:8000 -w2 graphite/settings.py

actuall doesnt run the app anymore.

gunicorn recommands that following commands to be used

/usr/bin/gunicorn webapp.wsgi:application -b127.0.0.1:8000 -w2

however, I cant figure out the name of the app to call wsgi:application on, i tried "webapp", "graphite", "graphite-webapp" , but django would complain with

ImportError: No module named graphite-web.wsgi

How do I fix this startup command?

also in the original command, the last argument graphite/settings.py , is that the settings file being loaded in? What does that actually do? the latest stable gunicorn actually doesnt allow that. How do I get around this?

UNIQUE constraint failed: account_profile.user_id

On docker run -p 80:8080 -p 2003 -p 2004 -p 7002 nickstenning/graphite after attempt to login admin:admin:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/var/lib/graphite/webapp/graphite/composer/views.py", line 35, in composer
    profile = getProfile(request)
  File "/var/lib/graphite/webapp/graphite/util.py", line 66, in getProfile
    profile.save()
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 545, in save
    force_update=force_update, update_fields=update_fields)
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 573, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 654, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 687, in _do_insert
    using=using, raw=raw)
  File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py", line 232, in _insert
    return insert_query(self.model, objs, fields, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 1511, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 898, in execute_sql
    cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py", line 450, in execute
    return Database.Cursor.execute(self, query, params)
IntegrityError: UNIQUE constraint failed: account_profile.user_id

Login redirects to wrong port

I run the docker container using docker-compose, mapping the port 80 on the container to the port 9000 on the host. Accessing the graphite-web via http://localhost:9000 works, and the login link points to the login page. But, after entering the credentials and confirming I end up on http://localhost.

The problem here is that the port is lost in the nginx setup.

Please add URL_PREFIX

It looks like graphite 0.10 (finally) supports URL_PREFIX (via -e option?) so that I can run graphite-web UI on non-root location. Please add support for this option with docker-graphite!

stale pid files for carbon-cache left

On subsequent runs of the container that has exited, stale pid files are kept in the GRAPHITE_STORAGE_DIR per the code in lib/carbon/conf.py.

Supervisord should have a cleanup method to rm -f GRAPHITE_STORAGE_DIR/*.pid on startup.

PID left in ephemeral docker volume from last run of container:

root@b8b663787929:/var/lib/graphite# ls -la /var/lib/graphite/storage/*.pid
-rw-r--r-- 1 www-data www-data 1 Jan 19 21:49 /var/lib/graphite/storage/carbon-cache-a.pid

Error observed:

root@b8b663787929:/var/lib/graphite# tail /var/log/supervisor/carbon-cache.log
carbon-cache (instance a) is already running with pid 9
carbon-cache (instance a) is already running with pid 9
carbon-cache (instance a) is already running with pid 9
carbon-cache (instance a) is already running with pid 9
carbon-cache (instance a) is already running with pid 9
carbon-cache (instance a) is already running with pid 9
carbon-cache (instance a) is already running with pid 9
carbon-cache (instance a) is already running with pid 9
carbon-cache (instance a) is already running with pid 9
carbon-cache (instance a) is already running with pid 9

no data written

I'm running on Ubunutu 14.04 with docker 1.0.1.

docker run -v /data/graphite:/var/lib/graphite/storage/whisper -p 80:80 -p 2003:2003 -p 2004:2004 -p 7002:7002 -d nickstenning/graphite

The startup is fine, and graphite-web is running. Now I send some data:

echo "test.uwe 4 date +%s" | nc -q0 127.0.0.1 2003

But /data/graphite is still empty and also in the web interface no metrics are present.

docker logs is looking fine though:

2014-06-23 09:26:19,767 CRIT Supervisor running as root (no user in config file)
2014-06-23 09:26:19,767 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2014-06-23 09:26:19,780 INFO RPC interface 'supervisor' initialized
2014-06-23 09:26:19,780 WARN cElementTree not installed, using slower XML parser for XML-RPC
2014-06-23 09:26:19,780 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2014-06-23 09:26:19,780 INFO supervisord started with pid 1
2014-06-23 09:26:20,783 INFO spawned: 'nginx' with pid 7
2014-06-23 09:26:20,786 INFO spawned: 'carbon-cache' with pid 8
2014-06-23 09:26:20,787 INFO spawned: 'graphite-webapp' with pid 9
2014-06-23 09:26:21,888 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2014-06-23 09:26:21,888 INFO success: carbon-cache entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2014-06-23 09:26:21,888 INFO success: graphite-webapp entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

carbon-cache fails

Tried running this on a 14.04 host with docker 0.9.1 and got the following:

root@betty:~# docker run -d nickstenning/graphite
e055abee754e8599e9e0bf032060f8b4d4340a232a5e2fd24f13653b810d17ce
root@betty:~# docker logs e05
2014-06-06 21:19:53,478 CRIT Supervisor running as root (no user in config file)
2014-06-06 21:19:53,479 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2014-06-06 21:19:53,506 INFO RPC interface 'supervisor' initialized
2014-06-06 21:19:53,507 WARN cElementTree not installed, using slower XML parser for XML-RPC
2014-06-06 21:19:53,507 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2014-06-06 21:19:53,507 INFO supervisord started with pid 1
2014-06-06 21:19:54,510 INFO spawned: 'nginx' with pid 7
2014-06-06 21:19:54,513 INFO spawned: 'carbon-cache' with pid 8
2014-06-06 21:19:54,519 INFO spawned: 'graphite-webapp' with pid 9
2014-06-06 21:19:54,536 INFO exited: carbon-cache (exit status 127; not expected)
2014-06-06 21:19:54,537 INFO exited: graphite-webapp (exit status 127; not expected)
2014-06-06 21:19:55,540 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2014-06-06 21:19:55,542 INFO spawned: 'carbon-cache' with pid 11
2014-06-06 21:19:55,544 INFO spawned: 'graphite-webapp' with pid 12
2014-06-06 21:19:55,556 INFO exited: carbon-cache (exit status 127; not expected)
2014-06-06 21:19:55,557 INFO exited: graphite-webapp (exit status 127; not expected)
2014-06-06 21:19:57,561 INFO spawned: 'carbon-cache' with pid 13
2014-06-06 21:19:57,563 INFO spawned: 'graphite-webapp' with pid 14
2014-06-06 21:19:57,575 INFO exited: carbon-cache (exit status 127; not expected)
2014-06-06 21:19:57,576 INFO exited: graphite-webapp (exit status 127; not expected)
2014-06-06 21:20:00,582 INFO spawned: 'carbon-cache' with pid 15
2014-06-06 21:20:00,584 INFO spawned: 'graphite-webapp' with pid 16
2014-06-06 21:20:00,595 INFO exited: graphite-webapp (exit status 127; not expected)
2014-06-06 21:20:00,596 INFO gave up: graphite-webapp entered FATAL state, too many start retries too quickly
2014-06-06 21:20:00,596 INFO exited: carbon-cache (exit status 127; not expected)
2014-06-06 21:20:01,598 INFO gave up: carbon-cache entered FATAL state, too many start retries too quickly

Can't Access Graphite-web from the host

Hi,

I'm running the latest Docker native client(Version 1.12.0-rc3-beta18) for MacOS.
Did docker run -d nickstenning/graphite and the container started successfully.

However, I can't seem to reach the Graphite-Web interface from http://127.0.0.1 nor from the container's IP addr http://172.17.0.2. Maybe I'm missing something simple. Any help is appreciated.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.