OperationalError at /privacy

could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 5432?
Request Method: GET
Request URL: https://www.hostapet.com/privacy
Django Version: 1.9.13
Exception Type: OperationalError
Exception Value:
could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 5432?
Exception Location: /home/ubuntu/.virtualenvs/pet_api_project/local/lib/python2.7/site-packages/psycopg2/__init__.py in connect, line 126
Python Executable: /usr/local/bin/uwsgi
Python Version: 2.7.12
Python Path:
['.',
 '',
 '/home/ubuntu/.virtualenvs/pet_api_project/lib/python2.7',
 '/home/ubuntu/.virtualenvs/pet_api_project/lib/python2.7/plat-x86_64-linux-gnu',
 '/home/ubuntu/.virtualenvs/pet_api_project/lib/python2.7/lib-tk',
 '/home/ubuntu/.virtualenvs/pet_api_project/lib/python2.7/lib-old',
 '/home/ubuntu/.virtualenvs/pet_api_project/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/home/ubuntu/.virtualenvs/pet_api_project/local/lib/python2.7/site-packages',
 '/home/ubuntu/.virtualenvs/pet_api_project/lib/python2.7/site-packages']
Server time: Mar, 19 Mar 2024 08:35:28 -0600

Traceback Switch to copy-and-paste view



Request information

GET

No GET data

POST

No POST data

FILES

No FILES data

No cookie data

META

Variable Value
wsgi.multiprocess
True
SCRIPT_NAME
u''
REQUEST_METHOD
'GET'
PATH_INFO
u'/privacy'
SERVER_PROTOCOL
'HTTP/1.1'
QUERY_STRING
''
CONTENT_LENGTH
''
HTTP_USER_AGENT
'claudebot'
SERVER_NAME
'www.hostapet.com,'
REMOTE_ADDR
'3.230.128.106'
wsgi.url_scheme
'https'
SERVER_PORT
'443'
uwsgi.node
'ip-172-31-30-8'
DOCUMENT_ROOT
'/usr/share/nginx/html'
wsgi.input
<uwsgi._Input object at 0x7f81bf37bb28>
HTTP_HOST
'www.hostapet.com'
HTTPS
'on'
wsgi.multithread
False
REQUEST_URI
'/privacy'
HTTP_ACCEPT
'*/*'
wsgi.version
(1, 0)
wsgi.run_once
False
wsgi.errors
<open file 'wsgi_errors', mode 'w' at 0x7f81bf303660>
REMOTE_PORT
'40598'
REQUEST_SCHEME
'https'
uwsgi.version
'2.0.15'
CONTENT_TYPE
''
wsgi.file_wrapper
''

Settings

Using settings module pet_api_project.settings.production

Setting Value
SECURE_BROWSER_XSS_FILTER
False
USE_X_FORWARDED_PORT
False
USE_THOUSAND_SEPARATOR
False
CSRF_COOKIE_SECURE
False
LANGUAGE_CODE
'es-mx'
ROOT_URLCONF
'pet_api_project.urls'
MANAGERS
[]
BROKER_URL
u'amqp://guest:guest@localhost:5672/'
BASE_DIR
Path('/home/ubuntu/pet_api_project/pet_api_project')
SILENCED_SYSTEM_CHECKS
[]
DEFAULT_CHARSET
'utf-8'
DEFAULT_INDEX_TABLESPACE
''
STATIC_ROOT
u'/home/ubuntu/static'
CELERYBEAT_SCHEDULER
'djcelery.schedulers:DatabaseScheduler'
ALLOWED_HOSTS
['*', u'172.31.30.8', '13.52.63.213']
GOOGLE_MAPS_API_KEY
u'********************'
MESSAGE_STORAGE
'django.contrib.messages.storage.fallback.FallbackStorage'
EMAIL_SUBJECT_PREFIX
''
SERVER_EMAIL
'soporte@hostapet.com'
SECURE_HSTS_SECONDS
0
STATICFILES_FINDERS
['django.contrib.staticfiles.finders.FileSystemFinder',
 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
AWS_TRANSCODER_HLS_BUCKET
u'host-a-pet-video-hls'
SESSION_CACHE_ALIAS
'default'
CELERY_IMPORTS
('celery.task.http',
 'core.tasks',
 'services.controllers',
 'services.tasks',
 'hosts.controllers',
 'email_app.controllers')
SESSION_COOKIE_DOMAIN
None
SESSION_COOKIE_NAME
'sessionid'
LOCALE_PATHS
[Path('/home/ubuntu/pet_api_project/pet_api_project/locale')]
AWS_STORAGE_BUCKET_NAME
u'host-a-pet-p'
TIME_INPUT_FORMATS
['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
SECURE_REDIRECT_EXEMPT
[]
DATABASES
{'default': {'ATOMIC_REQUESTS': False,
             'AUTOCOMMIT': True,
             'CONN_MAX_AGE': 0,
             'ENGINE': 'django.contrib.gis.db.backends.postgis',
             'HOST': u'localhost',
             'NAME': u'hap',
             'OPTIONS': {},
             'PASSWORD': u'********************',
             'PORT': u'5432',
             'TEST': {'CHARSET': None,
                      'COLLATION': None,
                      'MIRROR': None,
                      'NAME': None},
             'TIME_ZONE': None,
             'USER': u'hap'}}
EMAIL_SSL_KEYFILE
u'********************'
FILE_UPLOAD_DIRECTORY_PERMISSIONS
None
FILE_UPLOAD_PERMISSIONS
None
FILE_UPLOAD_HANDLERS
['django.core.files.uploadhandler.MemoryFileUploadHandler',
 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
DEFAULT_CONTENT_TYPE
'text/html'
API_TRANSACTION_KEY
u'********************'
TEST_RUNNER
'django.test.runner.DiscoverRunner'
APPEND_SLASH
True
FIRST_DAY_OF_WEEK
0
DATABASE_ROUTERS
[]
DEFAULT_TABLESPACE
''
YEAR_MONTH_FORMAT
'F Y'
STATICFILES_STORAGE
'django.contrib.staticfiles.storage.StaticFilesStorage'
CACHES
{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
SESSION_COOKIE_PATH
'/'
EMAIL_HOST_PASSWORD
u'********************'
SLACK_CHANNEL_ID
u'GD9M5ATTP'
SECURE_CONTENT_TYPE_NOSNIFF
False
MIDDLEWARE_CLASSES
[u'raven.contrib.django.middleware.DjangoRestFrameworkCompatMiddleware',
 u'raven.contrib.django.middleware.SentryMiddleware',
 '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.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.http.ConditionalGetMiddleware',
 'core.exceptions.ExceptionMiddleware.ExceptionMiddleware',
 'core.middleware.CORSMiddleware.CORSMiddleware',
 'django_globals.middleware.Global',
 'core.middleware.LoggingMiddleware.LoggingMiddleware']
SLACK_NEW_USERS_CHANNEL_ID
u'GDY6K0JAY'
THOUSAND_SEPARATOR
','
SECRET_KEY
u'********************'
LANGUAGE_COOKIE_NAME
'django_language'
FILE_UPLOAD_TEMP_DIR
None
LOGGING_CONFIG
'logging.config.dictConfig'
SESSION_COOKIE_AGE
1209600
TEMPLATE_LOADERS
['django.template.loaders.filesystem.Loader',
 'django.template.loaders.app_directories.Loader']
AWS_TRANSCODER_PIPELINE_ID
u'1528431800810-57qrmi'
WSGI_APPLICATION
'pet_api_project.wsgi.application'
TEMPLATE_DEBUG
False
X_FRAME_OPTIONS
'SAMEORIGIN'
CSRF_COOKIE_NAME
'csrftoken'
HUBSPOT_HAPKEY
u'********************'
FORCE_SCRIPT_NAME
None
USE_X_FORWARDED_HOST
False
AWS_S3_SECURE_URLS
True
CSRF_HEADER_NAME
'HTTP_X_CSRFTOKEN'
EMAIL_TIMEOUT
None
SECURE_SSL_HOST
None
SIGNING_BACKEND
'django.core.signing.TimestampSigner'
SESSION_COOKIE_SECURE
False
EC2_PRIVATE_IP
u'172.31.30.8'
FILE_CHARSET
'utf-8'
DEBUG
True
CSRF_TRUSTED_ORIGINS
[]
INTERNAL_IPS
[]
AWS_ACCESS_KEY_ID
u'********************'
DEFAULT_FILE_STORAGE
'storages.backends.s3boto.S3BotoStorage'
INSTALLED_APPS
['balances.apps.BalancesConfig',
 'charges',
 'chats',
 'configuration.apps.ConfigurationConfig',
 'core',
 'coupons',
 'error_messages',
 'faqs',
 'geography',
 'hosts',
 'media_mentions',
 'pets',
 'profiles.apps.ProfilesConfig',
 'referrals',
 'reports',
 'services',
 'terms',
 'users',
 'web',
 'email_app',
 'language',
 'djcelery',
 'widget_tweaks',
 'rest_framework',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.gis',
 'django.contrib.postgres',
 'raven.contrib.django.raven_compat']
LANGUAGES_BIDI
['he', 'ar', 'fa', 'ur']
USE_L10N
True
FCM_KEY
u'********************'
AWS_TRANSCODER_PRESET_ID
u'1528433656047-15pzlk'
STATICFILES_DIRS
(Path('/home/ubuntu/pet_api_project/pet_api_project/static'),
 Path('/home/ubuntu/pet_api_project/pet_api_project/templates'))
PREPEND_WWW
False
SECURE_PROXY_SSL_HEADER
None
LANGUAGE_COOKIE_AGE
None
SESSION_COOKIE_HTTPONLY
True
AWS_SECRET_ACCESS_KEY
u'********************'
DEBUG_PROPAGATE_EXCEPTIONS
False
CSRF_COOKIE_DOMAIN
None
MONTH_DAY_FORMAT
'F j'
AWS_QUERYSTRING_AUTH
False
LOGIN_URL
'/accounts/login/'
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
RAVEN_CONFIG
{'dsn': u'https://8dd0592046f64fecb38793f2324beae3@sentry.io/1292350'}
TIME_FORMAT
'P'
AUTH_USER_MODEL
'auth.User'
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']
AWS_TRANSCODER_THUMBNAIL_BUCKET
u'host-a-pet-video-thumbnails'
SESSION_SERIALIZER
'django.contrib.sessions.serializers.JSONSerializer'
AUTHENTICATION_BACKENDS
['django.contrib.auth.backends.ModelBackend']
AUTH_PASSWORD_VALIDATORS
u'********************'
CELERY_DISABLE_RATE_LIMITS
True
PASSWORD_RESET_TIMEOUT_DAYS
u'********************'
LANGUAGE_COOKIE_DOMAIN
None
CACHE_MIDDLEWARE_ALIAS
'default'
SESSION_SAVE_EVERY_REQUEST
False
NUMBER_GROUPING
0
GOOGLE_ANDROID_CLIENT_ID
u'293702277119-dgurlkpn0k8mc9cmop83uoigrmmhmuf7.apps.googleusercontent.com'
SESSION_ENGINE
'django.contrib.sessions.backends.db'
CSRF_FAILURE_VIEW
'django.views.csrf.csrf_failure'
EMAIL_ADDRESS_INTERNAL
u'Host a Pet <soporte@hostapet.com>'
LOGIN_REDIRECT_URL
'/accounts/profile/'
ABSOLUTE_URL_OVERRIDES
{}
GOOGLE_WEB_CLIENT_ID
u'293702277119-p9ise3df0ic73llq3qven768taie6iqm.apps.googleusercontent.com'
DECIMAL_SEPARATOR
'.'
CACHE_MIDDLEWARE_KEY_PREFIX
u'********************'
CSRF_COOKIE_PATH
'/'
TEMPLATE_STRING_IF_INVALID
''
SESSION_FILE_PATH
None
LOGOUT_URL
'/accounts/logout/'
EMAIL_USE_TLS
True
CONEKTA_PUBLIC_KEY
u'********************'
CONEKTA_PRIVATE_KEY
u'********************'
FIXTURE_DIRS
[]
EMAIL_HOST
u'email-smtp.us-east-1.amazonaws.com'
DATE_FORMAT
'N j, Y'
MEDIA_ROOT
Path('/home/ubuntu/pet_api_project/pet_api_project/media')
DEFAULT_EXCEPTION_REPORTER_FILTER
'django.views.debug.SafeExceptionReporterFilter'
ADMINS
[]
SLACK_TOKEN_BOT
u'********************'
FORMAT_MODULE_PATH
None
DEFAULT_FROM_EMAIL
'webmaster@localhost'
SECURE_HSTS_INCLUDE_SUBDOMAINS
False
REST_FRAMEWORK
{'DEFAULT_AUTHENTICATION_CLASSES': ('core.restframework.auth.HAPTokenAuthentication',
                                    'rest_framework.authentication.SessionAuthentication',
                                    'rest_framework.authentication.BasicAuthentication'),
 'DEFAULT_PERMISSION_CLASSES': ('core.restframework.permission.IsHAPAuthenticated',),
 'DEFAULT_RENDERER_CLASSES': ('rest_framework.renderers.JSONRenderer',)}
MEDIA_URL
'/media/'
DATETIME_FORMAT
'N j, Y, P'
TEMPLATE_DIRS
[]
CELERY_ACCEPT_CONTENT
['pickle', 'json']
SLACK_ERROR_CHANNEL_ID
u'GDCC6B3KN'
CYPHER_SECRET
u'********************'
DISALLOWED_USER_AGENTS
[]
ALLOWED_INCLUDE_ROOTS
[]
USE_I18N
True
WEB_HOST
'https://hostapet.com'
LOGGING
{'disable_existing_loggers': False,
 'formatters': {'verbose': {'format': '%(asctime)s | %(levelname)s | %(message)s'}},
 'handlers': {'console': {'class': 'logging.StreamHandler',
                          'formatter': 'verbose',
                          'level': 'DEBUG'},
              'file': {'class': 'logging.FileHandler',
                       'filename': u'/home/ubuntu/.host_a_pet/core/log/log_file.log',
                       'formatter': 'verbose',
                       'level': 'DEBUG'}},
 'loggers': {'django.request': {'handlers': ['file'],
                                'level': 'DEBUG',
                                'propagate': True}},
 'version': 1}
SHORT_DATE_FORMAT
'm/d/Y'
TEMPLATES
[{'APP_DIRS': True,
  'BACKEND': 'django.template.backends.django.DjangoTemplates',
  'DIRS': [Path('/home/ubuntu/pet_api_project/pet_api_project/static'),
           Path('/home/ubuntu/pet_api_project/pet_api_project/templates')],
  'OPTIONS': {'context_processors': ['django.template.context_processors.static',
                                     'django.template.context_processors.media',
                                     'django.template.context_processors.debug',
                                     'django.template.context_processors.request',
                                     'django.contrib.auth.context_processors.auth',
                                     'django.contrib.messages.context_processors.messages']}}]
CORE_LOGGING_PATH_FILE
u'/home/ubuntu/.host_a_pet/core/log/log_file.log'
GOOGLE_IOS_CLIENT_ID
u'293702277119-06c1kviasu8fvdeahqmga98fhrvepmq7.apps.googleusercontent.com'
STRIPE_PRIVATE_KEY
u'********************'
IGNORABLE_404_URLS
[]
SECURE_SSL_REDIRECT
False
TIME_ZONE
'America/Mexico_City'
FILE_UPLOAD_MAX_MEMORY_SIZE
2621440
EMAIL_BACKEND
'django_smtp_ssl.SSLEmailBackend'
EMAIL_USE_SSL
False
TEMPLATE_CONTEXT_PROCESSORS
['django.contrib.auth.context_processors.auth',
 'django.template.context_processors.debug',
 'django.template.context_processors.i18n',
 'django.template.context_processors.media',
 'django.template.context_processors.static',
 'django.template.context_processors.tz',
 'django.contrib.messages.context_processors.messages']
MIGRATION_MODULES
{}
API_LOGIN
u'********************'
SETTINGS_MODULE
'pet_api_project.settings.production'
USE_ETAGS
False
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'),
 ('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'),
 ('hu', 'Hungarian'),
 ('ia', 'Interlingua'),
 ('id', 'Indonesian'),
 ('io', 'Ido'),
 ('is', 'Icelandic'),
 ('it', 'Italian'),
 ('ja', 'Japanese'),
 ('ka', 'Georgian'),
 ('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 Bokmal'),
 ('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')]
AWS_TRANSCODER_REGION
u'us-west-1'
CSRF_COOKIE_AGE
31449600
STATIC_URL
'/static/'
EMAIL_PORT
465
USE_TZ
True
SHORT_DATETIME_FORMAT
'm/d/Y P'
CELERY_RESULT_BACKEND
'amqp'
TEST_NON_SERIALIZED_APPS
[]
PASSWORD_HASHERS
u'********************'
EMAIL_ADDRESS_STAFF
u'Host a Pet <soporte.hostapet@gmail.com>'
LANGUAGE_COOKIE_PATH
'/'
CACHE_MIDDLEWARE_SECONDS
600
EMAIL_SSL_CERTFILE
None
CSRF_COOKIE_HTTPONLY
False
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']
EMAIL_HOST_USER
u'AKIAI6D2V4LHOXKTC2FQ'

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.