-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sherlock/objects endpoint throwing 500 #232
Comments
Hi Austin
Thanks for trying out the API service. Sorry about the problem you see, it is because of a Edinburgh-wide power cut a couple of days ago, from which we are still digging out. I'll notify you when it works again.
Roy
…---
Royal Observatory Edinburgh
[email protected]
07542 869986
________________________________
From: Austin Riba [[email protected]]
Sent: 10 February 2021 7:54 PM
To: lsst-uk/lasair
Cc: Subscribed
Subject: [lsst-uk/lasair] Sherlock/objects endpoint throwing 500 (#232)
Hello,
I'm trying to use the /api/sherlock/objects/ endpoint as documented here: https://lasair-iris.roe.ac.uk/api
The example code results in a 500. I'm using my person api token.
In [6]: import requests, json
...: headers = { 'Authorization': 'Token <redacted>' }
...: url = 'https://lasair-iris.roe.ac.uk/api/sherlock/objects/'
...: data = { 'objectIds': 'ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt', 'lite':True }
...: r = requests.post(url, data, headers=headers)
...: if r.status_code == 200:
...: response = r.json()
...: s = json.dumps(response, indent=2)
...: print(s)
...: else:
...: print(r.status_code)
...: print(r.text)
...:
500
ConnectionError at /api/sherlock/objects/
HTTPConnectionPool(host='192.168.0.25', port=80): Max retries exceeded with url: /object/ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt?lite=true (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f01b416c208>: Failed to establish a new connection: [Errno 113] No route to host'))
Request Method: POST
Request URL: https://lasair-iris.roe.ac.uk/api/sherlock/objects/
Django Version: 2.2.6
Python Executable: /usr/bin/python3
Python Version: 3.7.3
Python Path: ['/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair', '/home/ubuntu/lasair-lsst-web/src', '/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python37.zip', '/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7', '/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/lib-dynload', '/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages']
Server time: Wed, 10 Feb 2021 19:50:51 +0000
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'lasair',
'lasairapi',
'django.contrib.admin',
'rest_framework',
'rest_framework.authtoken']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connection.py" in _new_conn
160. (self._dns_host, self.port), self.timeout, **extra_kw
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/util/connection.py" in create_connection
84. raise err
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/util/connection.py" in create_connection
74. sock.connect(sa)
During handling of the above exception ([Errno 113] No route to host), another exception occurred:
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connectionpool.py" in urlopen
677. chunked=chunked,
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connectionpool.py" in _make_request
392. conn.request(method, url, **httplib_request_kw)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in request
1229. self._send_request(method, url, body, headers, encode_chunked)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in _send_request
1275. self.endheaders(body, encode_chunked=encode_chunked)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in endheaders
1224. self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in _send_output
1016. self.send(msg)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in send
956. self.connect()
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connection.py" in connect
187. conn = self._new_conn()
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connection.py" in _new_conn
172. self, "Failed to establish a new connection: %s" % e
During handling of the above exception (<urllib3.connection.HTTPConnection object at 0x7f01b416c208>: Failed to establish a new connection: [Errno 113] No route to host), another exception occurred:
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/adapters.py" in send
449. timeout=timeout
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connectionpool.py" in urlopen
727. method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/util/retry.py" in increment
439. raise MaxRetryError(_pool, url, error or ResponseError(cause))
During handling of the above exception (HTTPConnectionPool(host='192.168.0.25', port=80): Max retries exceeded with url: /object/ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt?lite=true (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f01b416c208>: Failed to establish a new connection: [Errno 113] No route to host'))), another exception occurred:
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
54. return view_func(*args, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/views/generic/base.py" in view
71. return self.dispatch(request, *args, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/rest_framework/views.py" in dispatch
505. response = self.handle_exception(exc)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/rest_framework/views.py" in handle_exception
465. self.raise_uncaught_exception(exc)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/rest_framework/views.py" in raise_uncaught_exception
476. raise exc
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/rest_framework/views.py" in dispatch
502. response = handler(request, *args, **kwargs)
File "/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/lasairapi/views.py" in post
107. message = serializer.save()
File "/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/lasairapi/serializers.py" in save
102. r = requests.get(url)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/api.py" in get
76. return request('get', url, params=params, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/api.py" in request
61. return session.request(method=method, url=url, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/sessions.py" in request
530. resp = self.send(prep, **send_kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/sessions.py" in send
643. r = adapter.send(request, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/adapters.py" in send
516. raise ConnectionError(e, request=request)
Exception Type: ConnectionError at /api/sherlock/objects/
Exception Value: HTTPConnectionPool(host='192.168.0.25', port=80): Max retries exceeded with url: /object/ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt?lite=true (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f01b416c208>: Failed to establish a new connection: [Errno 113] No route to host'))
Request information:
USER: [email protected]
GET: No GET data
POST:
objectIds = 'ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt'
lite = 'True'
FILES: No FILES data
COOKIES: No cookie data
META:
CONTENT_LENGTH = '62'
CONTENT_TYPE = 'application/x-www-form-urlencoded'
CONTEXT_DOCUMENT_ROOT = '/home/ubuntu/lasair-lsst-web/'
CONTEXT_PREFIX = ''
DOCUMENT_ROOT = '/home/ubuntu/lasair-lsst-web/'
GATEWAY_INTERFACE = 'CGI/1.1'
HTTP_ACCEPT = '*/*'
HTTP_ACCEPT_ENCODING = 'gzip, deflate'
HTTP_AUTHORIZATION = 'Token ce46061d6480b4d376acdb62e201f92b8108ce7e'
HTTP_CONNECTION = 'keep-alive'
HTTP_HOST = 'lasair-iris.roe.ac.uk'
HTTP_USER_AGENT = 'python-requests/2.15.1'
PATH_INFO = '/api/sherlock/objects/'
PATH_TRANSLATED = '/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/lasair/wsgi.py/api/sherlock/objects/'
QUERY_STRING = ''
REMOTE_ADDR = '98.185.236.18'
REMOTE_PORT = '59789'
REQUEST_METHOD = 'POST'
REQUEST_SCHEME = 'https'
REQUEST_URI = '/api/sherlock/objects/'
SCRIPT_FILENAME = '/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/lasair/wsgi.py'
SCRIPT_NAME = ''
SERVER_ADDR = '192.168.0.22'
SERVER_ADMIN = '[email protected]'
SERVER_NAME = 'lasair-iris.roe.ac.uk'
SERVER_PORT = '443'
SERVER_PROTOCOL = 'HTTP/1.1'
SERVER_SIGNATURE = '<address>Apache/2.4.29 (Ubuntu) Server at lasair-iris.roe.ac.uk Port 443</address>\n'
SERVER_SOFTWARE = 'Apache/2.4.29 (Ubuntu)'
SSL_TLS_SNI = 'lasair-iris.roe.ac.uk'
apache.version = '(2, 4, 29)'
mod_wsgi.application_group = ''
mod_wsgi.callable_object = 'application'
mod_wsgi.connection_id = 'Jo8vuHhLt90'
mod_wsgi.daemon_connects = '1'
mod_wsgi.daemon_restarts = '0'
mod_wsgi.daemon_start = '1612986648267232'
mod_wsgi.enable_sendfile = '0'
mod_wsgi.handler_script = ''
mod_wsgi.ignore_activity = '0'
mod_wsgi.listener_host = ''
mod_wsgi.listener_port = '443'
mod_wsgi.path_info = '/api/sherlock/objects/'
mod_wsgi.process_group = 'lasair-iris.roe.ac.uk'
mod_wsgi.queue_start = '1612986648266953'
mod_wsgi.request_handler = 'wsgi-script'
mod_wsgi.request_id = 'uocyuHhLt90'
mod_wsgi.request_start = '1612986648266682'
mod_wsgi.script_name = ''
mod_wsgi.script_reloading = '1'
mod_wsgi.script_start = '1612986648267453'
mod_wsgi.thread_id = 1
mod_wsgi.thread_requests = 127
mod_wsgi.total_requests = 127
mod_wsgi.version = '(4, 6, 8)'
wsgi.errors = <_io.TextIOWrapper name='<wsgi.errors>' encoding='utf-8'>
wsgi.file_wrapper = ''
wsgi.input = <mod_wsgi.Input object at 0x7f01b40a7260>
wsgi.input_terminated = True
wsgi.multiprocess = True
wsgi.multithread = False
wsgi.run_once = False
wsgi.url_scheme = 'https'
wsgi.version = '(1, 0)'
Settings:
Using settings module lasair.settings
ABSOLUTE_URL_OVERRIDES = {}
ADMINS = []
ALLOWED_HOSTS = ['*']
APPEND_SLASH = True
AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'auth.User'
BASE_DIR = '/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair'
BLOB_STORE_ROOT = '/mnt/cephfs/roy'
CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
CASSANDRA = None
CITIZEN_SCIENCE_KEY = '********************'
CITIZEN_SCIENCE_USERID = 69
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': 'ztf', 'USER': 'ztf', 'PASSWORD': '********************', 'HOST': 'lasair-db', 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None, 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
DATABASE_ROUTERS = []
DATA_UPLOAD_MAX_MEMORY_SIZE = 26214400
DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
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_HOST = 'lasair-db'
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_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = '[email protected]'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DISALLOWED_USER_AGENTS = []
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = ''
EMAIL_PORT = 25
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = '********************'
EMAIL_SUBJECT_PREFIX = '[Django] '
EMAIL_TIMEOUT = None
EMAIL_USE_LOCALTIME = False
EMAIL_USE_SSL = False
EMAIL_USE_TLS = False
FILE_CHARSET = 'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
FILE_UPLOAD_PERMISSIONS = None
FILE_UPLOAD_TEMP_DIR = None
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
IGNORABLE_404_URLS = []
INSTALLED_APPS = ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'lasair', 'lasairapi', 'django.contrib.admin', 'rest_framework', 'rest_framework.authtoken']
INTERNAL_IPS = []
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'), ('hy', 'Armenian'), ('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 = 'en-us'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LASAIR_ROOT = '/home/ubuntu/'
LOCALE_PATHS = []
LOGGING = {}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = '/'
LOGIN_URL = '/accounts/login/'
LOGOUT_REDIRECT_URL = None
MANAGERS = []
MEDIA_ROOT = ''
MEDIA_URL = ''
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE = ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware']
MIGRATION_MODULES = {}
MONTH_DAY_FORMAT = 'F j'
NUMBER_GROUPING = 0
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT_DAYS = '********************'
PREPEND_WWW = False
QUERY_CACHE = '/home/ubuntu/query_cache'
READONLY_PASS = '********************'
READONLY_USER = 'readonly_ztf2'
READWRITE_PASS = '********************'
READWRITE_USER = 'ztf'
REST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ['rest_framework.authentication.TokenAuthentication'], 'DEFAULT_THROTTLE_CLASSES': ('rest_framework.throttling.UserRateThrottle', 'lasairapi.throttle.UserClassRateThrottle'), 'DEFAULT_THROTTLE_RATES': {'user': '1000000/hour'}, 'EXCEPTION_HANDLER': 'lasairapi.throttle.custom_exception_handler', 'ANON_THROTTLE_RATES': {'user': '10/hour'}, 'USER_THROTTLE_RATES': {'user': '100/hour'}, 'POWER_THROTTLE_RATES': {'user': '10000/hour'}}
ROOT_URLCONF = 'lasair.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
SERVER_EMAIL = 'root@localhost'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 1209600
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 = 'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'lasair.settings'
SHERLOCK_SERVICE = '192.168.0.25'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = []
STATICFILES_DIRS = "('/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/staticfiles',)"
STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/static'
STATIC_URL = '/lasair/static/'
SYSTEM_STATUS = '/mnt/cephfs/roy/system_status.json'
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['./templates', '../lasairapi/templates'], 'APP_DIRS': True, 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'lasair.context-processors.dev']}}]
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 = 'UTC'
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = True
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
WEB_DOMAIN = 'lasair-iris'
WSGI_APPLICATION = 'lasair.wsgi.application'
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.
-
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#232>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACDZRULH2F6HRVRA6QEFJDLS6LP6ZANCNFSM4XNSIMJA>.
|
Thanks Roy! Really enjoying working with the rest of the service.
… On Feb 11, 2021, at 6:45 AM, Roy Williams ***@***.***> wrote:
Hi Austin
Thanks for trying out the API service. Sorry about the problem you see, it is because of a Edinburgh-wide power cut a couple of days ago, from which we are still digging out. I'll notify you when it works again.
Roy
---
Royal Observatory Edinburgh
***@***.***
07542 869986
________________________________
From: Austin Riba ***@***.***
Sent: 10 February 2021 7:54 PM
To: lsst-uk/lasair
Cc: Subscribed
Subject: [lsst-uk/lasair] Sherlock/objects endpoint throwing 500 (#232)
Hello,
I'm trying to use the /api/sherlock/objects/ endpoint as documented here: https://lasair-iris.roe.ac.uk/api
The example code results in a 500. I'm using my person api token.
In [6]: import requests, json
...: headers = { 'Authorization': 'Token <redacted>' }
...: url = 'https://lasair-iris.roe.ac.uk/api/sherlock/objects/'
...: data = { 'objectIds': 'ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt', 'lite':True }
...: r = requests.post(url, data, headers=headers)
...: if r.status_code == 200:
...: response = r.json()
...: s = json.dumps(response, indent=2)
...: print(s)
...: else:
...: print(r.status_code)
...: print(r.text)
...:
500
ConnectionError at /api/sherlock/objects/
HTTPConnectionPool(host='192.168.0.25', port=80): Max retries exceeded with url: /object/ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt?lite=true (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f01b416c208>: Failed to establish a new connection: [Errno 113] No route to host'))
Request Method: POST
Request URL: https://lasair-iris.roe.ac.uk/api/sherlock/objects/
Django Version: 2.2.6
Python Executable: /usr/bin/python3
Python Version: 3.7.3
Python Path: ['/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair', '/home/ubuntu/lasair-lsst-web/src', '/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python37.zip', '/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7', '/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/lib-dynload', '/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages']
Server time: Wed, 10 Feb 2021 19:50:51 +0000
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'lasair',
'lasairapi',
'django.contrib.admin',
'rest_framework',
'rest_framework.authtoken']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connection.py" in _new_conn
160. (self._dns_host, self.port), self.timeout, **extra_kw
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/util/connection.py" in create_connection
84. raise err
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/util/connection.py" in create_connection
74. sock.connect(sa)
During handling of the above exception ([Errno 113] No route to host), another exception occurred:
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connectionpool.py" in urlopen
677. chunked=chunked,
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connectionpool.py" in _make_request
392. conn.request(method, url, **httplib_request_kw)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in request
1229. self._send_request(method, url, body, headers, encode_chunked)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in _send_request
1275. self.endheaders(body, encode_chunked=encode_chunked)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in endheaders
1224. self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in _send_output
1016. self.send(msg)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in send
956. self.connect()
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connection.py" in connect
187. conn = self._new_conn()
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connection.py" in _new_conn
172. self, "Failed to establish a new connection: %s" % e
During handling of the above exception (<urllib3.connection.HTTPConnection object at 0x7f01b416c208>: Failed to establish a new connection: [Errno 113] No route to host), another exception occurred:
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/adapters.py" in send
449. timeout=timeout
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connectionpool.py" in urlopen
727. method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/util/retry.py" in increment
439. raise MaxRetryError(_pool, url, error or ResponseError(cause))
During handling of the above exception (HTTPConnectionPool(host='192.168.0.25', port=80): Max retries exceeded with url: /object/ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt?lite=true (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f01b416c208>: Failed to establish a new connection: [Errno 113] No route to host'))), another exception occurred:
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
54. return view_func(*args, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/views/generic/base.py" in view
71. return self.dispatch(request, *args, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/rest_framework/views.py" in dispatch
505. response = self.handle_exception(exc)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/rest_framework/views.py" in handle_exception
465. self.raise_uncaught_exception(exc)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/rest_framework/views.py" in raise_uncaught_exception
476. raise exc
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/rest_framework/views.py" in dispatch
502. response = handler(request, *args, **kwargs)
File "/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/lasairapi/views.py" in post
107. message = serializer.save()
File "/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/lasairapi/serializers.py" in save
102. r = requests.get(url)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/api.py" in get
76. return request('get', url, params=params, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/api.py" in request
61. return session.request(method=method, url=url, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/sessions.py" in request
530. resp = self.send(prep, **send_kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/sessions.py" in send
643. r = adapter.send(request, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/adapters.py" in send
516. raise ConnectionError(e, request=request)
Exception Type: ConnectionError at /api/sherlock/objects/
Exception Value: HTTPConnectionPool(host='192.168.0.25', port=80): Max retries exceeded with url: /object/ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt?lite=true (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f01b416c208>: Failed to establish a new connection: [Errno 113] No route to host'))
Request information:
USER: ***@***.***
GET: No GET data
POST:
objectIds = 'ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt'
lite = 'True'
FILES: No FILES data
COOKIES: No cookie data
META:
CONTENT_LENGTH = '62'
CONTENT_TYPE = 'application/x-www-form-urlencoded'
CONTEXT_DOCUMENT_ROOT = '/home/ubuntu/lasair-lsst-web/'
CONTEXT_PREFIX = ''
DOCUMENT_ROOT = '/home/ubuntu/lasair-lsst-web/'
GATEWAY_INTERFACE = 'CGI/1.1'
HTTP_ACCEPT = '*/*'
HTTP_ACCEPT_ENCODING = 'gzip, deflate'
HTTP_AUTHORIZATION = 'Token ce46061d6480b4d376acdb62e201f92b8108ce7e'
HTTP_CONNECTION = 'keep-alive'
HTTP_HOST = 'lasair-iris.roe.ac.uk'
HTTP_USER_AGENT = 'python-requests/2.15.1'
PATH_INFO = '/api/sherlock/objects/'
PATH_TRANSLATED = '/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/lasair/wsgi.py/api/sherlock/objects/'
QUERY_STRING = ''
REMOTE_ADDR = '98.185.236.18'
REMOTE_PORT = '59789'
REQUEST_METHOD = 'POST'
REQUEST_SCHEME = 'https'
REQUEST_URI = '/api/sherlock/objects/'
SCRIPT_FILENAME = '/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/lasair/wsgi.py'
SCRIPT_NAME = ''
SERVER_ADDR = '192.168.0.22'
SERVER_ADMIN = ***@***.***'
SERVER_NAME = 'lasair-iris.roe.ac.uk'
SERVER_PORT = '443'
SERVER_PROTOCOL = 'HTTP/1.1'
SERVER_SIGNATURE = '<address>Apache/2.4.29 (Ubuntu) Server at lasair-iris.roe.ac.uk Port 443</address>\n'
SERVER_SOFTWARE = 'Apache/2.4.29 (Ubuntu)'
SSL_TLS_SNI = 'lasair-iris.roe.ac.uk'
apache.version = '(2, 4, 29)'
mod_wsgi.application_group = ''
mod_wsgi.callable_object = 'application'
mod_wsgi.connection_id = 'Jo8vuHhLt90'
mod_wsgi.daemon_connects = '1'
mod_wsgi.daemon_restarts = '0'
mod_wsgi.daemon_start = '1612986648267232'
mod_wsgi.enable_sendfile = '0'
mod_wsgi.handler_script = ''
mod_wsgi.ignore_activity = '0'
mod_wsgi.listener_host = ''
mod_wsgi.listener_port = '443'
mod_wsgi.path_info = '/api/sherlock/objects/'
mod_wsgi.process_group = 'lasair-iris.roe.ac.uk'
mod_wsgi.queue_start = '1612986648266953'
mod_wsgi.request_handler = 'wsgi-script'
mod_wsgi.request_id = 'uocyuHhLt90'
mod_wsgi.request_start = '1612986648266682'
mod_wsgi.script_name = ''
mod_wsgi.script_reloading = '1'
mod_wsgi.script_start = '1612986648267453'
mod_wsgi.thread_id = 1
mod_wsgi.thread_requests = 127
mod_wsgi.total_requests = 127
mod_wsgi.version = '(4, 6, 8)'
wsgi.errors = <_io.TextIOWrapper name='<wsgi.errors>' encoding='utf-8'>
wsgi.file_wrapper = ''
wsgi.input = <mod_wsgi.Input object at 0x7f01b40a7260>
wsgi.input_terminated = True
wsgi.multiprocess = True
wsgi.multithread = False
wsgi.run_once = False
wsgi.url_scheme = 'https'
wsgi.version = '(1, 0)'
Settings:
Using settings module lasair.settings
ABSOLUTE_URL_OVERRIDES = {}
ADMINS = []
ALLOWED_HOSTS = ['*']
APPEND_SLASH = True
AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'auth.User'
BASE_DIR = '/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair'
BLOB_STORE_ROOT = '/mnt/cephfs/roy'
CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
CASSANDRA = None
CITIZEN_SCIENCE_KEY = '********************'
CITIZEN_SCIENCE_USERID = 69
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': 'ztf', 'USER': 'ztf', 'PASSWORD': '********************', 'HOST': 'lasair-db', 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None, 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
DATABASE_ROUTERS = []
DATA_UPLOAD_MAX_MEMORY_SIZE = 26214400
DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
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_HOST = 'lasair-db'
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_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = ***@***.***'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DISALLOWED_USER_AGENTS = []
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = ''
EMAIL_PORT = 25
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = '********************'
EMAIL_SUBJECT_PREFIX = '[Django] '
EMAIL_TIMEOUT = None
EMAIL_USE_LOCALTIME = False
EMAIL_USE_SSL = False
EMAIL_USE_TLS = False
FILE_CHARSET = 'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
FILE_UPLOAD_PERMISSIONS = None
FILE_UPLOAD_TEMP_DIR = None
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
IGNORABLE_404_URLS = []
INSTALLED_APPS = ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'lasair', 'lasairapi', 'django.contrib.admin', 'rest_framework', 'rest_framework.authtoken']
INTERNAL_IPS = []
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'), ('hy', 'Armenian'), ('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 = 'en-us'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LASAIR_ROOT = '/home/ubuntu/'
LOCALE_PATHS = []
LOGGING = {}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = '/'
LOGIN_URL = '/accounts/login/'
LOGOUT_REDIRECT_URL = None
MANAGERS = []
MEDIA_ROOT = ''
MEDIA_URL = ''
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE = ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware']
MIGRATION_MODULES = {}
MONTH_DAY_FORMAT = 'F j'
NUMBER_GROUPING = 0
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT_DAYS = '********************'
PREPEND_WWW = False
QUERY_CACHE = '/home/ubuntu/query_cache'
READONLY_PASS = '********************'
READONLY_USER = 'readonly_ztf2'
READWRITE_PASS = '********************'
READWRITE_USER = 'ztf'
REST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ['rest_framework.authentication.TokenAuthentication'], 'DEFAULT_THROTTLE_CLASSES': ('rest_framework.throttling.UserRateThrottle', 'lasairapi.throttle.UserClassRateThrottle'), 'DEFAULT_THROTTLE_RATES': {'user': '1000000/hour'}, 'EXCEPTION_HANDLER': 'lasairapi.throttle.custom_exception_handler', 'ANON_THROTTLE_RATES': {'user': '10/hour'}, 'USER_THROTTLE_RATES': {'user': '100/hour'}, 'POWER_THROTTLE_RATES': {'user': '10000/hour'}}
ROOT_URLCONF = 'lasair.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
SERVER_EMAIL = ***@***.***'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 1209600
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 = 'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'lasair.settings'
SHERLOCK_SERVICE = '192.168.0.25'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = []
STATICFILES_DIRS = "('/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/staticfiles',)"
STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/static'
STATIC_URL = '/lasair/static/'
SYSTEM_STATUS = '/mnt/cephfs/roy/system_status.json'
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['./templates', '../lasairapi/templates'], 'APP_DIRS': True, 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'lasair.context-processors.dev']}}]
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 = 'UTC'
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = True
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
WEB_DOMAIN = 'lasair-iris'
WSGI_APPLICATION = 'lasair.wsgi.application'
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.
-
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#232>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACDZRULH2F6HRVRA6QEFJDLS6LP6ZANCNFSM4XNSIMJA>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Austin
Should be fixed now.
Please try again.
Would appreciate any comments you have on the API in general.
Roy
…---
Royal Observatory Edinburgh
[email protected]
07542 869986
________________________________
From: Austin Riba [[email protected]]
Sent: 10 February 2021 7:54 PM
To: lsst-uk/lasair
Cc: Subscribed
Subject: [lsst-uk/lasair] Sherlock/objects endpoint throwing 500 (#232)
Hello,
I'm trying to use the /api/sherlock/objects/ endpoint as documented here: https://lasair-iris.roe.ac.uk/api
The example code results in a 500. I'm using my person api token.
In [6]: import requests, json
...: headers = { 'Authorization': 'Token <redacted>' }
...: url = 'https://lasair-iris.roe.ac.uk/api/sherlock/objects/'
...: data = { 'objectIds': 'ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt', 'lite':True }
...: r = requests.post(url, data, headers=headers)
...: if r.status_code == 200:
...: response = r.json()
...: s = json.dumps(response, indent=2)
...: print(s)
...: else:
...: print(r.status_code)
...: print(r.text)
...:
500
ConnectionError at /api/sherlock/objects/
HTTPConnectionPool(host='192.168.0.25', port=80): Max retries exceeded with url: /object/ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt?lite=true (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f01b416c208>: Failed to establish a new connection: [Errno 113] No route to host'))
Request Method: POST
Request URL: https://lasair-iris.roe.ac.uk/api/sherlock/objects/
Django Version: 2.2.6
Python Executable: /usr/bin/python3
Python Version: 3.7.3
Python Path: ['/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair', '/home/ubuntu/lasair-lsst-web/src', '/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python37.zip', '/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7', '/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/lib-dynload', '/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages']
Server time: Wed, 10 Feb 2021 19:50:51 +0000
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'lasair',
'lasairapi',
'django.contrib.admin',
'rest_framework',
'rest_framework.authtoken']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connection.py" in _new_conn
160. (self._dns_host, self.port), self.timeout, **extra_kw
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/util/connection.py" in create_connection
84. raise err
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/util/connection.py" in create_connection
74. sock.connect(sa)
During handling of the above exception ([Errno 113] No route to host), another exception occurred:
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connectionpool.py" in urlopen
677. chunked=chunked,
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connectionpool.py" in _make_request
392. conn.request(method, url, **httplib_request_kw)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in request
1229. self._send_request(method, url, body, headers, encode_chunked)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in _send_request
1275. self.endheaders(body, encode_chunked=encode_chunked)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in endheaders
1224. self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in _send_output
1016. self.send(msg)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/http/client.py" in send
956. self.connect()
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connection.py" in connect
187. conn = self._new_conn()
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connection.py" in _new_conn
172. self, "Failed to establish a new connection: %s" % e
During handling of the above exception (<urllib3.connection.HTTPConnection object at 0x7f01b416c208>: Failed to establish a new connection: [Errno 113] No route to host), another exception occurred:
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/adapters.py" in send
449. timeout=timeout
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/connectionpool.py" in urlopen
727. method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/urllib3/util/retry.py" in increment
439. raise MaxRetryError(_pool, url, error or ResponseError(cause))
During handling of the above exception (HTTPConnectionPool(host='192.168.0.25', port=80): Max retries exceeded with url: /object/ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt?lite=true (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f01b416c208>: Failed to establish a new connection: [Errno 113] No route to host'))), another exception occurred:
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
54. return view_func(*args, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/django/views/generic/base.py" in view
71. return self.dispatch(request, *args, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/rest_framework/views.py" in dispatch
505. response = self.handle_exception(exc)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/rest_framework/views.py" in handle_exception
465. self.raise_uncaught_exception(exc)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/rest_framework/views.py" in raise_uncaught_exception
476. raise exc
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/rest_framework/views.py" in dispatch
502. response = handler(request, *args, **kwargs)
File "/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/lasairapi/views.py" in post
107. message = serializer.save()
File "/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/lasairapi/serializers.py" in save
102. r = requests.get(url)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/api.py" in get
76. return request('get', url, params=params, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/api.py" in request
61. return session.request(method=method, url=url, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/sessions.py" in request
530. resp = self.send(prep, **send_kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/sessions.py" in send
643. r = adapter.send(request, **kwargs)
File "/home/ubuntu/anaconda3/envs/lasair-ssl-test/lib/python3.7/site-packages/requests/adapters.py" in send
516. raise ConnectionError(e, request=request)
Exception Type: ConnectionError at /api/sherlock/objects/
Exception Value: HTTPConnectionPool(host='192.168.0.25', port=80): Max retries exceeded with url: /object/ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt?lite=true (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f01b416c208>: Failed to establish a new connection: [Errno 113] No route to host'))
Request information:
USER: [email protected]
GET: No GET data
POST:
objectIds = 'ZTF20acpwljl,ZTF20acqqbkl,ZTF20acplggt'
lite = 'True'
FILES: No FILES data
COOKIES: No cookie data
META:
CONTENT_LENGTH = '62'
CONTENT_TYPE = 'application/x-www-form-urlencoded'
CONTEXT_DOCUMENT_ROOT = '/home/ubuntu/lasair-lsst-web/'
CONTEXT_PREFIX = ''
DOCUMENT_ROOT = '/home/ubuntu/lasair-lsst-web/'
GATEWAY_INTERFACE = 'CGI/1.1'
HTTP_ACCEPT = '*/*'
HTTP_ACCEPT_ENCODING = 'gzip, deflate'
HTTP_AUTHORIZATION = 'Token ce46061d6480b4d376acdb62e201f92b8108ce7e'
HTTP_CONNECTION = 'keep-alive'
HTTP_HOST = 'lasair-iris.roe.ac.uk'
HTTP_USER_AGENT = 'python-requests/2.15.1'
PATH_INFO = '/api/sherlock/objects/'
PATH_TRANSLATED = '/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/lasair/wsgi.py/api/sherlock/objects/'
QUERY_STRING = ''
REMOTE_ADDR = '98.185.236.18'
REMOTE_PORT = '59789'
REQUEST_METHOD = 'POST'
REQUEST_SCHEME = 'https'
REQUEST_URI = '/api/sherlock/objects/'
SCRIPT_FILENAME = '/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/lasair/wsgi.py'
SCRIPT_NAME = ''
SERVER_ADDR = '192.168.0.22'
SERVER_ADMIN = '[email protected]'
SERVER_NAME = 'lasair-iris.roe.ac.uk'
SERVER_PORT = '443'
SERVER_PROTOCOL = 'HTTP/1.1'
SERVER_SIGNATURE = '<address>Apache/2.4.29 (Ubuntu) Server at lasair-iris.roe.ac.uk Port 443</address>\n'
SERVER_SOFTWARE = 'Apache/2.4.29 (Ubuntu)'
SSL_TLS_SNI = 'lasair-iris.roe.ac.uk'
apache.version = '(2, 4, 29)'
mod_wsgi.application_group = ''
mod_wsgi.callable_object = 'application'
mod_wsgi.connection_id = 'Jo8vuHhLt90'
mod_wsgi.daemon_connects = '1'
mod_wsgi.daemon_restarts = '0'
mod_wsgi.daemon_start = '1612986648267232'
mod_wsgi.enable_sendfile = '0'
mod_wsgi.handler_script = ''
mod_wsgi.ignore_activity = '0'
mod_wsgi.listener_host = ''
mod_wsgi.listener_port = '443'
mod_wsgi.path_info = '/api/sherlock/objects/'
mod_wsgi.process_group = 'lasair-iris.roe.ac.uk'
mod_wsgi.queue_start = '1612986648266953'
mod_wsgi.request_handler = 'wsgi-script'
mod_wsgi.request_id = 'uocyuHhLt90'
mod_wsgi.request_start = '1612986648266682'
mod_wsgi.script_name = ''
mod_wsgi.script_reloading = '1'
mod_wsgi.script_start = '1612986648267453'
mod_wsgi.thread_id = 1
mod_wsgi.thread_requests = 127
mod_wsgi.total_requests = 127
mod_wsgi.version = '(4, 6, 8)'
wsgi.errors = <_io.TextIOWrapper name='<wsgi.errors>' encoding='utf-8'>
wsgi.file_wrapper = ''
wsgi.input = <mod_wsgi.Input object at 0x7f01b40a7260>
wsgi.input_terminated = True
wsgi.multiprocess = True
wsgi.multithread = False
wsgi.run_once = False
wsgi.url_scheme = 'https'
wsgi.version = '(1, 0)'
Settings:
Using settings module lasair.settings
ABSOLUTE_URL_OVERRIDES = {}
ADMINS = []
ALLOWED_HOSTS = ['*']
APPEND_SLASH = True
AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'auth.User'
BASE_DIR = '/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair'
BLOB_STORE_ROOT = '/mnt/cephfs/roy'
CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
CASSANDRA = None
CITIZEN_SCIENCE_KEY = '********************'
CITIZEN_SCIENCE_USERID = 69
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': 'ztf', 'USER': 'ztf', 'PASSWORD': '********************', 'HOST': 'lasair-db', 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None, 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
DATABASE_ROUTERS = []
DATA_UPLOAD_MAX_MEMORY_SIZE = 26214400
DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
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_HOST = 'lasair-db'
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_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = '[email protected]'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DISALLOWED_USER_AGENTS = []
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = ''
EMAIL_PORT = 25
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = '********************'
EMAIL_SUBJECT_PREFIX = '[Django] '
EMAIL_TIMEOUT = None
EMAIL_USE_LOCALTIME = False
EMAIL_USE_SSL = False
EMAIL_USE_TLS = False
FILE_CHARSET = 'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
FILE_UPLOAD_PERMISSIONS = None
FILE_UPLOAD_TEMP_DIR = None
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
IGNORABLE_404_URLS = []
INSTALLED_APPS = ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'lasair', 'lasairapi', 'django.contrib.admin', 'rest_framework', 'rest_framework.authtoken']
INTERNAL_IPS = []
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'), ('hy', 'Armenian'), ('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 = 'en-us'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LASAIR_ROOT = '/home/ubuntu/'
LOCALE_PATHS = []
LOGGING = {}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = '/'
LOGIN_URL = '/accounts/login/'
LOGOUT_REDIRECT_URL = None
MANAGERS = []
MEDIA_ROOT = ''
MEDIA_URL = ''
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE = ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware']
MIGRATION_MODULES = {}
MONTH_DAY_FORMAT = 'F j'
NUMBER_GROUPING = 0
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT_DAYS = '********************'
PREPEND_WWW = False
QUERY_CACHE = '/home/ubuntu/query_cache'
READONLY_PASS = '********************'
READONLY_USER = 'readonly_ztf2'
READWRITE_PASS = '********************'
READWRITE_USER = 'ztf'
REST_FRAMEWORK = {'DEFAULT_AUTHENTICATION_CLASSES': ['rest_framework.authentication.TokenAuthentication'], 'DEFAULT_THROTTLE_CLASSES': ('rest_framework.throttling.UserRateThrottle', 'lasairapi.throttle.UserClassRateThrottle'), 'DEFAULT_THROTTLE_RATES': {'user': '1000000/hour'}, 'EXCEPTION_HANDLER': 'lasairapi.throttle.custom_exception_handler', 'ANON_THROTTLE_RATES': {'user': '10/hour'}, 'USER_THROTTLE_RATES': {'user': '100/hour'}, 'POWER_THROTTLE_RATES': {'user': '10000/hour'}}
ROOT_URLCONF = 'lasair.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
SERVER_EMAIL = 'root@localhost'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 1209600
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 = 'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'lasair.settings'
SHERLOCK_SERVICE = '192.168.0.25'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = []
STATICFILES_DIRS = "('/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/staticfiles',)"
STATICFILES_FINDERS = ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/home/ubuntu/lasair-lsst-web/src/lasair-webapp/lasair/static'
STATIC_URL = '/lasair/static/'
SYSTEM_STATUS = '/mnt/cephfs/roy/system_status.json'
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['./templates', '../lasairapi/templates'], 'APP_DIRS': True, 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'lasair.context-processors.dev']}}]
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 = 'UTC'
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = True
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
WEB_DOMAIN = 'lasair-iris'
WSGI_APPLICATION = 'lasair.wsgi.application'
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.
-
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#232>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACDZRULH2F6HRVRA6QEFJDLS6LP6ZANCNFSM4XNSIMJA>.
|
Hi Roy, This appears to still be an issue as of Feb 23rd. |
Sorry Austin, its back now. We have been doing a lot of heavy lifting on lasair-iris recently, so it been a bit volatile.
…---
Royal Observatory Edinburgh
[email protected]
07542 869986
________________________________
From: Austin Riba [[email protected]]
Sent: 23 February 2021 7:30 PM
To: lsst-uk/lasair
Cc: Roy Williams; Comment
Subject: Re: [lsst-uk/lasair] Sherlock/objects endpoint throwing 500 (#232)
Hi Roy,
This appears to still be an issue as of Feb 23rd.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#232 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACDZRUJ7S5PLAYVZG2DFBUTTAP64JANCNFSM4XNSIMJA>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm trying to use the /api/sherlock/objects/ endpoint as documented here: https://lasair-iris.roe.ac.uk/api
The example code results in a 500. I'm using my person api token.
The text was updated successfully, but these errors were encountered: