These are chat archives for getredash/redash

23rd
Nov 2016
chnet
@coins4me
Nov 23 2016 07:38

seems that the scheduler is running

sudo supervisorctl status
redash_celery                    RUNNING   pid 988, uptime 20:22:21
redash_celery_scheduled          RUNNING   pid 990, uptime 20:22:21
redash_server                    RUNNING   pid 989, uptime 20:22:21

where can i find the schedule logging?
in celery_error.log are no new entrys

chnet
@coins4me
Nov 23 2016 07:50
maybe there something wrong if i do sudo supervisorctl restart alli found the following in elery_error.log
Arik Fraimovich
@arikfr
Nov 23 2016 07:51
If there are no new entries in celery_error.log, it means that the scheduler/workers aren't doing anything... Now that you restarted do you see new entries and queries running?
chnet
@coins4me
Nov 23 2016 07:51
[2016-11-23 08:46:15,061: WARNING/MainProcess] /usr/local/lib/python2.7/dist-packages/celery/apps/worker.py:161: CDeprecationWarning:
Starting from version 3.2 Celery will refuse to accept pickle by default.

The pickle serializer is a security concern as it may give attackers
the ability to execute any command.  It's important to secure
your broker from unauthorized access when using pickle, so we think
that enabling pickle should require a deliberate action and not be
the default choice.

If you depend on pickle then you should set a setting to disable this
warning and to be sure that everything will continue working
when you upgrade to Celery 3.2::

    CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml']

You must only enable the serializers that you will actually use.


  warnings.warn(CDeprecationWarning(W_PICKLE_DEPRECATED))
[2016-11-23 08:46:15,809: ERROR/Beat] Removing corrupted schedule file 'celerybeat-schedule': DBAccessError(13, 'Permission denied')
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 367, in setup_schedule
    writeback=True)
  File "/usr/lib/python2.7/shelve.py", line 243, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/lib/python2.7/shelve.py", line 227, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
  File "/usr/lib/python2.7/anydbm.py", line 85, in open
    return mod.open(file, flag, mode)
  File "/usr/lib/python2.7/dbhash.py", line 18, in open
    return bsddb.hashopen(file, flag, mode)
  File "/usr/lib/python2.7/bsddb/__init__.py", line 364, in hashopen
    d.open(file, db.DB_HASH, flags, mode)
DBAccessError: (13, 'Permission denied')
[2016-11-23 08:46:15,811: ERROR/Beat] Process Beat
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/billiard/process.py", line 292, in _bootstrap
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 527, in run
    self.service.start(embedded_process=True)
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 453, in start
    humanize_seconds(self.scheduler.max_interval))
  File "/usr/local/lib/python2.7/dist-packages/kombu/utils/__init__.py", line 325, in __get__
    value = obj.__dict__[self.__name__] = self.__get(obj)
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 491, in scheduler
    return self.get_scheduler()
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 486, in get_scheduler
    lazy=lazy)
  File "/usr/local/lib/python2.7/dist-packages/celery/utils/imports.py", line 53, in instantiate
    return symbol_by_name(name)(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 357, in __init__
    Scheduler.__init__(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 184, in __init__
    self.setup_schedule()
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 373, in setup_schedule
    writeback=True)
  File "/usr/lib/python2.7/shelve.py", line 243, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/lib/python2.7/shelve.py", line 227, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
  File "/usr/lib/python2.7/anydbm.py", line 85, in open
    return mod.open(file, flag, mode)
  File "/usr/lib/python2.7/dbhash.py", line 18, in open
    return bsddb.hashopen(file, flag, mode)
  File "/usr/lib/python2.7/bsddb/__init__.py", line 364, in hashopen
    d.open(file, db.DB_HASH, flags, mode)
DBAccessError: (13, 'Permission denied')
[2016-11-23 08:46:17,557: WARNING/MainProcess] celery@dbs ready.
[2016-11-23 08:46:17,825: WARNING/MainProcess] /usr/local/lib/python2.7/dist-packages/celery/apps/worker.py:161: CDeprecationWarning:
Starting from version 3.2 Celery will refuse to accept pickle by default.

The pickle serializer is a security concern as it may give attackers
Arik Fraimovich
@arikfr
Nov 23 2016 07:52
delete the scheduler file (/opt/redash/current/celerybeat-schedule) and restart again.
chnet
@coins4me
Nov 23 2016 07:59
Bildschirmfoto 2016-11-23 um 08.58.18.png
there is no celerybeat-schedule file
maybe I should just do a reinstall?
Arik Fraimovich
@arikfr
Nov 23 2016 08:40
maybe it has a different path. try searching for it under the /opt/redash path.
chnet
@coins4me
Nov 23 2016 09:37

i searched for it - find / -type f -name "celerybeat-schedule" but it's not there

i tried to run the migration script again to avoid the :
[2016-11-23 10:34:29,783: ERROR/Beat] Removing corrupted schedule file 'celerybeat-schedule': DBAccessError(13, 'Permission denied')

postgres@dbs:/opt/redash/current$ PYTHONPATH=. python migrations/0015_add_schedule_query_permission.py



[2016-11-23 10:29:14,223][PID:9187][ERROR][peewee] SELECT "t1"."id", "t1"."permissions" FROM "groups" AS t1 WHERE ("t1"."name" = %s) [u'default']
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/playhouse/postgres_ext.py", line 360, in execute_sql
    cursor.execute(sql, params or ())
ProgrammingError: relation "groups" does not exist
LINE 1: SELECT "t1"."id", "t1"."permissions" FROM "groups" AS t1 WHE...
                                                  ^
Arik Fraimovich
@arikfr
Nov 23 2016 09:38
it's not related to migrations. it's a file celery keeps track of scheduled tasks in. maybe it was deleted by now? try restarting again and checking logs
chnet
@coins4me
Nov 23 2016 09:39
root@dbs:/opt# tail -f /opt/redash/logs/celery_error.log
[2016-11-23 10:38:59,977: WARNING/MainProcess] /usr/local/lib/python2.7/dist-packages/celery/apps/worker.py:161: CDeprecationWarning:
Starting from version 3.2 Celery will refuse to accept pickle by default.

The pickle serializer is a security concern as it may give attackers
the ability to execute any command.  It's important to secure
your broker from unauthorized access when using pickle, so we think
that enabling pickle should require a deliberate action and not be
the default choice.

If you depend on pickle then you should set a setting to disable this
warning and to be sure that everything will continue working
when you upgrade to Celery 3.2::

    CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml']

You must only enable the serializers that you will actually use.


  warnings.warn(CDeprecationWarning(W_PICKLE_DEPRECATED))
[2016-11-23 10:39:00,079: ERROR/Beat] Removing corrupted schedule file 'celerybeat-schedule': DBAccessError(13, 'Permission denied')
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 367, in setup_schedule
    writeback=True)
  File "/usr/lib/python2.7/shelve.py", line 243, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/lib/python2.7/shelve.py", line 227, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
  File "/usr/lib/python2.7/anydbm.py", line 85, in open
    return mod.open(file, flag, mode)
  File "/usr/lib/python2.7/dbhash.py", line 18, in open
    return bsddb.hashopen(file, flag, mode)
  File "/usr/lib/python2.7/bsddb/__init__.py", line 364, in hashopen
    d.open(file, db.DB_HASH, flags, mode)
DBAccessError: (13, 'Permission denied')
[2016-11-23 10:39:00,085: ERROR/Beat] Process Beat
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/billiard/process.py", line 292, in _bootstrap
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 527, in run
    self.service.start(embedded_process=True)
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 453, in start
    humanize_seconds(self.scheduler.max_interval))
  File "/usr/local/lib/python2.7/dist-packages/kombu/utils/__init__.py", line 325, in __get__
    value = obj.__dict__[self.__name__] = self.__get(obj)
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 491, in scheduler
    return self.get_scheduler()
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 486, in get_scheduler
    lazy=lazy)
  File "/usr/local/lib/python2.7/dist-packages/celery/utils/imports.py", line 53, in instantiate
    return symbol_by_name(name)(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 357, in __init__
    Scheduler.__init__(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 184, in __init__
    self.setup_schedule()
  File "/usr/local/lib/python2.7/dist-packages/celery/beat.py", line 373, in setup_schedule
    writeback=True)
  File "/usr/lib/python2.7/shelve.py", line 243, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/lib/python2.7/shelve.py", line 227, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
  File "/usr/lib/python2.7/anydbm.py", line 85, in open
    return mod.open(file, flag, mode)
  File "/usr/lib/python2.7/dbhash.py", line 18, in open
    return bsddb.hashopen(file, flag, mode)
  File "/usr/lib/python2.7/bsddb/__init__.py", line 364, in hashopen
    d.open(file, db.DB_HASH, flags, mode)
DBAccessError: (13, 'Permission denied')
[2016-11-23 10:39:01,883: WARNING/MainProcess] celery@dbs ready.
[2016-11-23 10:39:02,930: WARNING/MainProcess] /usr/local/lib/python2.7/dist-packages/celery/apps/worker.py:161: CDeprecationWarning:
Starting from version 3.2 Celery will refuse to accept pickle by default.

The pickle
Arik Fraimovich
@arikfr
Nov 23 2016 09:57
@coins4me try running it with higher logging level, maybe it will tell you where it's looking for the file.