graphite报错:DatabaseError: no such table: auth_user
通过docker启动graphite和grafana,在本地使用一切正常,将镜像放到线上k8s上,访问graphite报如下错误:该错误在github上是一个已知的bug:https://github.com/SamSaffron/graphite_docker/issues/27解决方法:进入容器,找到manage.py文件,然后执行如下命令:python manage.py syncdb --
·
通过docker启动graphite和grafana,在本地使用一切正常,将镜像放到线上k8s上,访问graphite报如下错误:
该错误在github上是一个已知的bug:https://github.com/SamSaffron/graphite_docker/issues/27
解决方法:
进入容器,找到manage.py文件,然后执行如下命令:
python manage.py syncdb --noinput
执行后会创建一系列表。
查看manage.py都有哪些指令如下:
# cd /opt/graphite/webapp/graphite
root@test-product-0:/opt/graphite/webapp/graphite# python manage.py --help
Usage: manage.py subcommand [options] [args]
Options:
-v VERBOSITY, --verbosity=VERBOSITY
Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output
--settings=SETTINGS The Python path to a settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used.
--pythonpath=PYTHONPATH
A directory to add to the Python path, e.g. "/home/djangoprojects/myproject".
--traceback Print traceback on exception
--version show program's version number and exit
-h, --help show this help message and exit
Type 'manage.py help <subcommand>' for help on a specific subcommand.
Available subcommands:
[auth]
changepassword
createsuperuser
[django]
cleanup
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
runfcgi
shell
sql
sqlall
sqlclear
sqlcustom
sqlflush
sqlindexes
sqlinitialdata
sqlsequencereset
startapp
startproject
syncdb
test
testserver
validate
[sessions]
clearsessions
[staticfiles]
collectstatic
findstatic
runserver
参考:
python 2.7 - Graphite Web Error Log, OperationalError: no such table: auth_user - Stack Overflow
更多推荐
已为社区贡献1条内容
所有评论(0)