jumpserver / jumpserver

An open-source PAM tool alternative to CyberArk. 广受欢迎的开源堡垒机。
https://jumpserver.com
GNU General Public License v3.0
25.48k stars 5.33k forks source link

[ERRO] register access key failed #3190

Closed RocsSun closed 5 years ago

RocsSun commented 5 years ago

[简述你的问题]

koko启动出错

使用版本

[请提供你使用的Jumpserver版本 1.x.x 注: 0.3.x不再提供支持] jumperserver: 1.4.8
mysql :8.0.17
Python:3.6.8

问题复现步骤
  1. [步骤1]

安装koko,修改配置文件之后,执行koko出现异常

  1. [步骤2]
具体表现[截图可能会更好些,最好能截全]

报错代码如下:

[root@test177 kokodir]# ./koko 
2019-09-04 16:46:18 [ERRO] POST http://127.0.0.1:8080/api/terminal/v2/terminal-registrations/ failed, get code: 500, OperationalError at /api/terminal/v2/terminal-registrations/
(1054, "Unknown column 'users_user.otp_secret_key' in 'field list'")

Request Method: POST
Request URL: http://127.0.0.1:8080/api/terminal/v2/terminal-registrations/
Django Version: 2.1.7
Python Executable: /opt/py3/bin/python3
Python Version: 3.6.8
Python Path: ['/opt/jumpserver', '/opt/jumpserver/apps', '/opt/py3/bin', '/usr/local/lib/python36.zip', '/usr/local/lib/python3.6', '/usr/local/lib/python3.6/lib-dynload', '/opt/py3/lib/python3.6/site-packages', '/opt/jumpserver', '/opt/jumpserver/apps']
Server time: 星期三, 4 九月 2019 16:46:18 +0800
Installed Applications:
['orgs.apps.OrgsConfig',
 'users.apps.UsersConfig',
 'assets.apps.AssetsConfig',
 'perms.apps.PermsConfig',
 'ops.apps.OpsConfig',
 'settings.apps.SettingsConfig',
 'common.apps.CommonConfig',
 'terminal.apps.TerminalConfig',
 'audits.apps.AuditsConfig',
 'authentication.apps.AuthenticationConfig',
 'applications.apps.ApplicationsConfig',
 'rest_framework',
 'rest_framework_swagger',
 'drf_yasg',
 'django_filters',
 'bootstrap3',
 'captcha',
 'django_celery_beat',
 'django.contrib.auth',
 'django.contrib.admin',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'authentication.backends.openid.middleware.OpenIDAuthenticationMiddleware',
 'jumpserver.middleware.TimezoneMiddleware',
 'jumpserver.middleware.DemoMiddleware',
 'jumpserver.middleware.RequestMiddleware',
 'orgs.middleware.OrgMiddleware']

Traceback:

File "/opt/py3/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute
  85.                 return self.cursor.execute(sql, params)

File "/opt/py3/lib/python3.6/site-packages/django/db/backends/mysql/base.py" in execute
  71.             return self.cursor.execute(query, args)

File "/opt/py3/lib/python3.6/site-packages/MySQLdb/cursors.py" in execute
  255.             self.errorhandler(self, exc, value)

File "/opt/py3/lib/python3.6/site-packages/MySQLdb/connections.py" in defaulterrorhandler
  50.         raise errorvalue

File "/opt/py3/lib/python3.6/site-packages/MySQLdb/cursors.py" in execute
  252.             res = self._query(query)

File "/opt/py3/lib/python3.6/site-packages/MySQLdb/cursors.py" in _query
  378.         db.query(q)

File "/opt/py3/lib/python3.6/site-packages/MySQLdb/connections.py" in query
  280.             _mysql.connection.query(self, query)

The above exception ((1054, "Unknown column 'users_user.otp_secret_key' in 'field list'")) was the direct cause of the following exception:

File "/opt/py3/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/opt/py3/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  126.                 response = self.process_exception_by_middleware(e, request)

File "/opt/py3/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  124.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.6/contextlib.py" in inner
  52.                 return func(*args, **kwds)

File "/opt/py3/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
  54.         return view_func(*args, **kwargs)

File "/opt/py3/lib/python3.6/site-packages/django/views/generic/base.py" in view
  68.             return self.dispatch(request, *args, **kwargs)

File "/opt/py3/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
  495.             response = self.handle_exception(exc)

File "/opt/py3/lib/python3.6/site-packages/rest_framework/views.py" in handle_exception
  455.             self.raise_uncaught_exception(exc)

File "/opt/py3/lib/python3.6/site-packages/rest_framework/views.py" in dispatch
  492.             response = handler(request, *args, **kwargs)

File "/opt/py3/lib/python3.6/site-packages/rest_framework/generics.py" in post
  192.         return self.create(request, *args, **kwargs)

File "/opt/jumpserver/apps/terminal/api_v2/terminal.py" in create
  32.         serializer.is_valid(raise_exception=True)

File "/opt/jumpserver/apps/terminal/serializers_v2/terminal.py" in is_valid
  39.         valid = self.sa_serializer.is_valid(raise_exception=True)

File "/opt/py3/lib/python3.6/site-packages/rest_framework/serializers.py" in is_valid
  236.                 self._validated_data = self.run_validation(self.initial_data)

File "/opt/py3/lib/python3.6/site-packages/rest_framework/serializers.py" in run_validation
  434.         value = self.to_internal_value(data)

File "/opt/py3/lib/python3.6/site-packages/rest_framework/serializers.py" in to_internal_value
  493.                     validated_value = validate_method(validated_value)

File "/opt/jumpserver/apps/users/serializers_v2/user.py" in validate_name
  34.         if users.filter(email=email) or \

File "/opt/py3/lib/python3.6/site-packages/django/db/models/query.py" in __bool__
  272.         self._fetch_all()

File "/opt/py3/lib/python3.6/site-packages/django/db/models/query.py" in _fetch_all
  1186.             self._result_cache = list(self._iterable_class(self))

File "/opt/py3/lib/python3.6/site-packages/django/db/models/query.py" in __iter__
  54.         results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)

File "/opt/py3/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in execute_sql
  1065.             cursor.execute(sql, params)

File "/opt/py3/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
  100.             return super().execute(sql, params)

File "/opt/py3/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
  68.         return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)

File "/opt/py3/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute_with_wrappers
  77.         return executor(sql, params, many, context)

File "/opt/py3/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute
  85.                 return self.cursor.execute(sql, params)

File "/opt/py3/lib/python3.6/site-packages/django/db/utils.py" in __exit__
  89.                 raise dj_exc_value.with_traceback(traceback) from exc_value

File "/opt/py3/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute
  85.                 return self.cursor.execute(sql, params)

File "/opt/py3/lib/python3.6/site-packages/django/db/backends/mysql/base.py" in execute
  71.             return self.cursor.execute(query, args)

File "/opt/py3/lib/python3.6/site-packages/MySQLdb/cursors.py" in execute
  255.             self.errorhandler(self, exc, value)

File "/opt/py3/lib/python3.6/site-packages/MySQLdb/connections.py" in defaulterrorhandler
  50.         raise errorvalue

File "/opt/py3/lib/python3.6/site-packages/MySQLdb/cursors.py" in execute
  252.             res = self._query(query)

File "/opt/py3/lib/python3.6/site-packages/MySQLdb/cursors.py" in _query
  378.         db.query(q)

File "/opt/py3/lib/python3.6/site-packages/MySQLdb/connections.py" in query
  280.             _mysql.connection.query(self, query)

Exception Type: OperationalError at /api/terminal/v2/terminal-registrations/
Exception Value: (1054, "Unknown column 'users_user.otp_secret_key' in 'field list'")
Request information:
USER: AnonymousUser

GET: No GET data

POST: No POST data

FILES: No FILES data

COOKIES: No cookie data

META:
CONTENT_LENGTH = '35'
CONTENT_TYPE = 'application/json'
HTTP_ACCEPT_ENCODING = 'gzip'
HTTP_AUTHORIZATION = 'BootstrapToken mQWLcmQSEEySAKcSepsn8Pr7lHiMLa8pR6huyFP0q973btp41'
HTTP_HOST = '127.0.0.1:8080'
HTTP_USER_AGENT = 'koko-client'
HTTP_X_JMS_ORG = 'ROOT'
PATH_INFO = '/api/terminal/v2/terminal-registrations/'
QUERY_STRING = ''
RAW_URI = '/api/terminal/v2/terminal-registrations/'
REMOTE_ADDR = '127.0.0.1'
REMOTE_PORT = '34446'
REQUEST_METHOD = 'POST'
SCRIPT_NAME = ''
SERVER_NAME = '0.0.0.0'
SERVER_PORT = '8080'
SERVER_PROTOCOL = 'HTTP/1.1'
SERVER_SOFTWARE = 'gunicorn/19.9.0'
gunicorn.socket = <socket.socket fd=16, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 8080), raddr=('127.0.0.1', 34446)>
wsgi.errors = <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7fbe88892588>
wsgi.file_wrapper = ''
wsgi.input = <gunicorn.http.body.Body object at 0x7fbe88892518>
wsgi.multiprocess = True
wsgi.multithread = True
wsgi.run_once = False
wsgi.url_scheme = 'http'
wsgi.version = '(1, 0)'

Settings:
Using settings module jumpserver.settings
ABSOLUTE_URL_OVERRIDES = {}
ADMINS = []
ALLOWED_HOSTS = ['*']
ANSIBLE_LOG_FILE = '/opt/jumpserver/logs/ansible.log'
APPEND_SLASH = True
ASSETS_PERM_CACHE_ENABLE = False
ASSETS_PERM_CACHE_TIME = 86400
AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
AUTH_LDAP = False
AUTH_LDAP_ALWAYS_UPDATE_USER = True
AUTH_LDAP_BACKEND = 'authentication.backends.ldap.LDAPAuthorizationBackend'
AUTH_LDAP_BIND_DN = 'cn=admin,dc=jumpserver,dc=org'
AUTH_LDAP_BIND_PASSWORD = '********************'
AUTH_LDAP_CONNECTION_OPTIONS = {20482: 30}
AUTH_LDAP_GLOBAL_OPTIONS = {24582: 0}
AUTH_LDAP_GROUP_CACHE_TIMEOUT = 1
AUTH_LDAP_SEARCH_FILTER = '(cn=%(user)s)'
AUTH_LDAP_SEARCH_OU = 'ou=tech,dc=jumpserver,dc=org'
AUTH_LDAP_SERVER_URI = 'ldap://localhost:389'
AUTH_LDAP_START_TLS = False
AUTH_LDAP_USER_ATTR_MAP = {'username': 'cn', 'name': 'sn', 'email': 'mail'}
AUTH_OPENID = False
AUTH_OPENID_BACKENDS = ['authentication.backends.openid.backends.OpenIDAuthorizationPasswordBackend', 'authentication.backends.openid.backends.OpenIDAuthorizationCodeBackend']
AUTH_OPENID_CLIENT_ID = None
AUTH_OPENID_CLIENT_SECRET = '********************'
AUTH_OPENID_IGNORE_SSL_VERIFICATION = True
AUTH_OPENID_REALM_NAME = None
AUTH_OPENID_SERVER_URL = None
AUTH_OPENID_SHARE_SESSION = False
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_RADIUS = False
AUTH_RADIUS_BACKEND = 'authentication.backends.radius.RadiusBackend'
AUTH_USER_MODEL = 'users.User'
BACKEND_ASSET_USER_AUTH_VAULT = False
BASE_DIR = '/opt/jumpserver/apps'
BASE_SITE_URL = None
BOOTSTRAP3 = {'horizontal_label_class': 'col-md-2', 'horizontal_field_class': 'col-md-9', 'set_placeholder': False, 'success_css_class': '', 'required_css_class': 'required'}
BOOTSTRAP_TOKEN = '********************'
CACHES = {'default': {'BACKEND': 'redis_cache.RedisCache', 'LOCATION': 'redis://:@127.0.0.1:6379/4'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
CAPTCHA_FOREGROUND_COLOR = '#001100'
CAPTCHA_IMAGE_SIZE = '(80, 33)'
CAPTCHA_NOISE_FUNCTIONS = "('captcha.helpers.noise_dots',)"
CAPTCHA_TEST_MODE = None
CELERY_ACCEPT_CONTENT = ['json', 'pickle']
CELERY_BROKER_URL = 'redis://:@127.0.0.1:6379/3'
CELERY_LOG_DIR = '/opt/jumpserver/data/celery'
CELERY_RESULT_BACKEND = 'redis://:@127.0.0.1:6379/3'
CELERY_RESULT_EXPIRES = 3600
CELERY_RESULT_SERIALIZER = 'pickle'
CELERY_TASK_EAGER_PROPAGATES = True
CELERY_TASK_SERIALIZER = 'pickle'
CELERY_TASK_SOFT_TIME_LIMIT = 3600
CELERY_WORKER_LOG_FORMAT = '%(message)s'
CELERY_WORKER_MAX_TASKS_PER_CHILD = 40
CELERY_WORKER_REDIRECT_STDOUTS = True
CELERY_WORKER_REDIRECT_STDOUTS_LEVEL = 'INFO'
CELERY_WORKER_TASK_LOG_FORMAT = '%(message)s'
COMMAND_STORAGE = {'ENGINE': 'terminal.backends.command.db'}
CONFIG = {'SECRET_KEY': '********************', 'BOOTSTRAP_TOKEN': '********************', 'DB_ENGINE': 'mysql', 'DB_HOST': '127.0.0.1', 'DB_PORT': 3306, 'DB_USER': 'jumpserver', 'DB_PASSWORD': '********************', 'DB_NAME': 'jumpserver', 'HTTP_BIND_HOST': '0.0.0.0', 'HTTP_LISTEN_PORT': 8080, 'REDIS_HOST': '127.0.0.1', 'REDIS_PORT': 6379}
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_NAME = 'csrftoken'
CSRF_COOKIE_PATH = '/'
CSRF_COOKIE_SAMESITE = 'Lax'
CSRF_COOKIE_SECURE = False
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS = []
CSRF_USE_SESSIONS = False
DATABASES = {'default': {'ENGINE': 'django.db.backends.mysql', 'NAME': 'jumpserver', 'HOST': '127.0.0.1', 'PORT': 3306, 'USER': 'jumpserver', 'PASSWORD': '********************', 'ATOMIC_REQUESTS': True, 'OPTIONS': {'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"}, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
DATABASE_ROUTERS = []
DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS = 10000
DATETIME_FORMAT = 'N j, Y, P'
DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y']
DATE_FORMAT = 'N j, Y'
DATE_INPUT_FORMATS = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y']
DB_CA_PATH = '/opt/jumpserver/data/certs/db_ca.pem'
DB_OPTIONS = {'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"}
DEBUG = True
DEBUG_PROPAGATE_EXCEPTIONS = False
DECIMAL_SEPARATOR = '.'
DEFAULT_CHARSET = 'utf-8'
DEFAULT_CONTENT_TYPE = 'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_EXPIRED_YEARS = 70
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = 'webmaster@localhost'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DEFAULT_TERMINAL_COMMAND_STORAGE = {'default': {'TYPE': 'server'}}
DEFAULT_TERMINAL_REPLAY_STORAGE = {'default': {'TYPE': 'server'}}
DISALLOWED_USER_AGENTS = []
DISPLAY_PER_PAGE = 25
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_CUSTOM_USER_CREATED_BODY = ''
EMAIL_CUSTOM_USER_CREATED_HONORIFIC = ''
EMAIL_CUSTOM_USER_CREATED_SIGNATURE = '********************'
EMAIL_CUSTOM_USER_CREATED_SUBJECT = ''
EMAIL_FROM = ''
EMAIL_HOST = 'smtp.jumpserver.org'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = 'noreply@jumpserver.org'
EMAIL_PORT = 25
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = '********************'
EMAIL_SUBJECT_PREFIX = '[JMS] '
EMAIL_SUFFIX = 'jumpserver.org'
EMAIL_TIMEOUT = None
EMAIL_USE_LOCALTIME = False
EMAIL_USE_SSL = False
EMAIL_USE_TLS = False
FILE_CHARSET = 'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = 493
FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
FILE_UPLOAD_PERMISSIONS = 420
FILE_UPLOAD_TEMP_DIR = None
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = ['/opt/jumpserver/apps/fixtures']
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
GUNICORN_LOG_FILE = '/opt/jumpserver/logs/gunicorn.log'
IGNORABLE_404_URLS = []
INSTALLED_APPS = ['orgs.apps.OrgsConfig', 'users.apps.UsersConfig', 'assets.apps.AssetsConfig', 'perms.apps.PermsConfig', 'ops.apps.OpsConfig', 'settings.apps.SettingsConfig', 'common.apps.CommonConfig', 'terminal.apps.TerminalConfig', 'audits.apps.AuditsConfig', 'authentication.apps.AuthenticationConfig', 'applications.apps.ApplicationsConfig', 'rest_framework', 'rest_framework_swagger', 'drf_yasg', 'django_filters', 'bootstrap3', 'captcha', 'django_celery_beat', 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles']
INTERNAL_IPS = []
JUMPSERVER_LOG_FILE = '/opt/jumpserver/logs/jumpserver.log'
LANGUAGES = [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')]
LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur']
LANGUAGE_CODE = 'zh'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LDAP_CERT_FILE = '/opt/jumpserver/data/certs/ldap_ca.pem'
LOCALE_PATHS = ['/opt/jumpserver/apps/locale']
LOGGING = {'version': 1, 'disable_existing_loggers': False, 'formatters': {'verbose': {'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'}, 'main': {'datefmt': '%Y-%m-%d %H:%M:%S', 'format': '%(asctime)s [%(module)s %(levelname)s] %(message)s'}, 'simple': {'format': '%(levelname)s %(message)s'}, 'msg': {'format': '%(message)s'}}, 'handlers': {'null': {'level': 'DEBUG', 'class': 'logging.NullHandler'}, 'console': {'level': 'DEBUG', 'class': 'logging.StreamHandler', 'formatter': 'main'}, 'file': {'encoding': 'utf8', 'level': 'DEBUG', 'class': 'logging.handlers.RotatingFileHandler', 'maxBytes': 104857600, 'backupCount': 7, 'formatter': 'main', 'filename': '/opt/jumpserver/logs/jumpserver.log'}, 'ansible_logs': {'encoding': 'utf8', 'level': 'DEBUG', 'class': 'logging.handlers.RotatingFileHandler', 'formatter': 'main', 'maxBytes': 104857600, 'backupCount': 7, 'filename': '/opt/jumpserver/logs/ansible.log'}, 'gunicorn_file': {'encoding': 'utf8', 'level': 'DEBUG', 'class': 'logging.handlers.RotatingFileHandler', 'formatter': 'msg', 'maxBytes': 104857600, 'backupCount': 2, 'filename': '/opt/jumpserver/logs/gunicorn.log'}, 'gunicorn_console': {'level': 'DEBUG', 'class': 'logging.StreamHandler', 'formatter': 'msg'}}, 'loggers': {'django': {'handlers': ['null'], 'propagate': False, 'level': 'DEBUG'}, 'django.request': {'handlers': ['console', 'file'], 'level': 'DEBUG', 'propagate': False}, 'django.server': {'handlers': ['console', 'file'], 'level': 'DEBUG', 'propagate': False}, 'jumpserver': {'handlers': ['console', 'file'], 'level': 'DEBUG'}, 'jumpserver.users.api': '********************', 'jumpserver.users.view': {'handlers': ['console', 'file'], 'level': 'DEBUG'}, 'ops.ansible_api': '********************', 'django_auth_ldap': {'handlers': ['console', 'file'], 'level': 'INFO'}, 'gunicorn': {'handlers': ['gunicorn_console', 'gunicorn_file'], 'level': 'INFO'}}}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_LOG_KEEP_DAYS = 90
LOGIN_REDIRECT_URL = '/'
LOGIN_URL = '/auth/login/'
LOGOUT_REDIRECT_URL = None
LOG_DIR = '/opt/jumpserver/logs'
LOG_LEVEL = 'DEBUG'
MANAGERS = []
MEDIA_ROOT = '/opt/jumpserver/data/media/'
MEDIA_URL = '/media/'
MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage'
MIDDLEWARE = ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'authentication.backends.openid.middleware.OpenIDAuthenticationMiddleware', 'jumpserver.middleware.TimezoneMiddleware', 'jumpserver.middleware.DemoMiddleware', 'jumpserver.middleware.RequestMiddleware', 'orgs.middleware.OrgMiddleware']
MIGRATION_MODULES = {}
MONTH_DAY_FORMAT = 'F j'
NUMBER_GROUPING = 0
OTP_ISSUER_NAME = 'Jumpserver'
OTP_VALID_WINDOW = 2
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT_DAYS = '********************'
PERM_SINGLE_ASSET_TO_UNGROUP_NODE = False
PREPEND_WWW = False
PROJECT_DIR = '/opt/jumpserver'
RADIUS_PORT = 1812
RADIUS_SECRET = '********************'
RADIUS_SERVER = 'localhost'
REST_FRAMEWORK = {'DEFAULT_PERMISSION_CLASSES': ('common.permissions.IsOrgAdmin',), 'DEFAULT_RENDERER_CLASSES': ('rest_framework.renderers.JSONRenderer', 'rest_framework.renderers.BrowsableAPIRenderer', 'common.renders.JMSCSVRender'), 'DEFAULT_PARSER_CLASSES': ('rest_framework.parsers.JSONParser', 'rest_framework.parsers.FormParser', 'rest_framework.parsers.MultiPartParser', 'common.parsers.JMSCSVParser', 'rest_framework.parsers.FileUploadParser'), 'DEFAULT_AUTHENTICATION_CLASSES': ('authentication.backends.api.AccessKeyAuthentication', 'authentication.backends.api.AccessTokenAuthentication', 'authentication.backends.api.PrivateTokenAuthentication', 'authentication.backends.api.SessionAuthentication'), 'DEFAULT_FILTER_BACKENDS': ('django_filters.rest_framework.DjangoFilterBackend', 'rest_framework.filters.SearchFilter', 'rest_framework.filters.OrderingFilter'), 'DEFAULT_METADATA_CLASS': 'common.drfmetadata.SimpleMetadataWithFilters', 'ORDERING_PARAM': 'order', 'SEARCH_PARAM': 'search', 'DATETIME_FORMAT': '%Y-%m-%d %H:%M:%S %z', 'DATETIME_INPUT_FORMATS': ['iso-8601', '%Y-%m-%d %H:%M:%S %z']}
ROOT_URLCONF = 'jumpserver.urls'
SECRET_KEY = '********************'
SECURE_BROWSER_XSS_FILTER = False
SECURE_CONTENT_TYPE_NOSNIFF = False
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_HSTS_PRELOAD = False
SECURE_HSTS_SECONDS = 0
SECURE_PROXY_SSL_HEADER = None
SECURE_REDIRECT_EXEMPT = []
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SECURITY_COMMAND_EXECUTION = True
SECURITY_LOGIN_LIMIT_COUNT = 7
SECURITY_LOGIN_LIMIT_TIME = 30
SECURITY_MAX_IDLE_TIME = 30
SECURITY_MFA_AUTH = False
SECURITY_MFA_VERIFY_TTL = 3600
SECURITY_PASSWORD_EXPIRATION_TIME = '********************'
SECURITY_PASSWORD_LOWER_CASE = '********************'
SECURITY_PASSWORD_MIN_LENGTH = '********************'
SECURITY_PASSWORD_NUMBER = '********************'
SECURITY_PASSWORD_RULES = '********************'
SECURITY_PASSWORD_SPECIAL_CHAR = '********************'
SECURITY_PASSWORD_UPPER_CASE = '********************'
SECURITY_SERVICE_ACCOUNT_REGISTRATION = True
SERVER_EMAIL = 'root@localhost'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 86400
SESSION_COOKIE_DOMAIN = None
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_NAME = 'sessionid'
SESSION_COOKIE_PATH = '/'
SESSION_COOKIE_SAMESITE = 'Lax'
SESSION_COOKIE_SECURE = False
SESSION_ENGINE = 'redis_sessions.session'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_FILE_PATH = None
SESSION_REDIS = {'host': '127.0.0.1', 'port': 6379, 'password': '********************', 'db': 5, 'prefix': 'auth_session', 'socket_timeout': 1, 'retry_on_timeout': False}
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'jumpserver.settings'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = []
SITE_URL = 'http://localhost'
STATICFILES_DIRS = "('/opt/jumpserver/apps/static',)"
STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_DIR = '/opt/jumpserver/apps/static'
STATIC_ROOT = '/opt/jumpserver/data/static'
STATIC_URL = '/static/'
SWAGGER_SETTINGS = {'DEFAULT_AUTO_SCHEMA_CLASS': 'jumpserver.swagger.CustomSwaggerAutoSchema', 'SECURITY_DEFINITIONS': {'basic': {'type': 'basic'}}}
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/opt/jumpserver/apps/templates'], 'APP_DIRS': True, 'OPTIONS': {'context_processors': ['django.template.context_processors.i18n', 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.static', 'django.template.context_processors.request', 'django.template.context_processors.media', 'jumpserver.context_processor.jumpserver_processor', 'orgs.context_processor.org_processor']}}]
TERMINAL_ASSET_LIST_PAGE_SIZE = 'auto'
TERMINAL_ASSET_LIST_SORT_BY = 'hostname'
TERMINAL_COMMAND_STORAGE = {}
TERMINAL_HEADER_TITLE = None
TERMINAL_HEARTBEAT_INTERVAL = 20
TERMINAL_HOST_KEY = '********************'
TERMINAL_PASSWORD_AUTH = '********************'
TERMINAL_PUBLIC_KEY_AUTH = '********************'
TERMINAL_REPLAY_STORAGE = {}
TERMINAL_SESSION_KEEP_DURATION = 9999
TERMINAL_TELNET_REGEX = ''
TEST_NON_SERIALIZED_APPS = []
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR = ','
TIME_FORMAT = 'P'
TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE = 'Asia/Shanghai'
TOKEN_EXPIRATION = '********************'
USER_GUIDE_URL = ''
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = True
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
VERSION = '1.5.2'
WSGI_APPLICATION = None
XPACK_CONTEXT_PROCESSOR = []
XPACK_DIR = '/opt/jumpserver/apps/xpack'
XPACK_ENABLED = False
XPACK_TEMPLATES_DIR = []
X_FRAME_OPTIONS = 'SAMEORIGIN'
YEAR_MONTH_FORMAT = 'F Y'

You're seeing this error because you have DEBUG = True in your
Django settings file. Change that to False, and Django will
display a standard page generated by the handler for this status code.

2019-09-04 16:46:18 [ERRO] register access key failed
其他

[注:] 完成后请关闭 issue

LeeEirc commented 5 years ago

@RocsSun koko只支持1.5以上的版本。

RocsSun commented 5 years ago

@RocsSun koko只支持1.5以上的版本。 请问下,版本号在哪里查看

LeeEirc commented 5 years ago

@RocsSun 你使用koko的版本和jumpserver版本需要保持一致。

RocsSun commented 5 years ago

@RocsSun 你使用koko的版本和jumpserver版本需要保持一致。

我使用的这个版本git clone --depth=1 https://github.com/jumpserver/jumpserver.git,不知道这个版本怎么查看,还有koko的版本怎么查看。

jym503558564 commented 5 years ago

jumpserver core的版本查询。页面的右下角或者项目启动的日志都可看: image image

RocsSun commented 5 years ago

jumpserver core的版本查询。页面的右下角或者项目启动的日志都可看: image image

好的。感谢!