Wednesday, August 28, 2019

Please help me to resolve this issue .............................[WinError 10061] No connection could be made because the target machine actively refused it

Environment:


Request Method: POST
Request URL: http://127.0.0.1:8000/accounts/register/

Django Version: 2.2.4
Python Version: 3.7.1
Installed Applications:
['crispy_forms',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'registration',
 'django.contrib.admin',
 'user',
 'bootstrap4']
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 "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\handlers\exception.py" in inner
  34.             response = get_response(request)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\handlers\base.py" in _get_response
  115.                 response = self.process_exception_by_middleware(e, request)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\handlers\base.py" in _get_response
  113.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\views\generic\base.py" in view
  71.             return self.dispatch(request, *args, **kwargs)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\decorators.py" in _wrapper
  45.         return bound_method(*args, **kwargs)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\views\decorators\debug.py" in sensitive_post_parameters_wrapper
  76.             return view(request, *args, **kwargs)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\registration\views.py" in dispatch
  53.         return super(RegistrationView, self).dispatch(request, *args, **kwargs)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\views\generic\base.py" in dispatch
  97.         return handler(request, *args, **kwargs)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\views\generic\edit.py" in post
  142.             return self.form_valid(form)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\registration\views.py" in form_valid
  56.         new_user = self.register(form)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\registration\backends\default\views.py" in register
  100.             request=self.request,

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\registration\models.py" in create_inactive_user
  193.                     lambda: registration_profile.send_activation_email(

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\transaction.py" in __exit__
  284.                     connection.set_autocommit(True)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py" in set_autocommit
  410.             self.run_and_clear_commit_hooks()

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py" in run_and_clear_commit_hooks
  636.             func()

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\registration\models.py" in <lambda>
  194.                         site, request)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\registration\models.py" in send_activation_email
  451.         email_message.send()

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\mail\message.py" in send
  291.         return self.get_connection(fail_silently).send_messages([self])

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\mail\backends\smtp.py" in send_messages
  103.             new_conn_created = self.open()

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\mail\backends\smtp.py" in open
  63.             self.connection = self.connection_class(self.host, self.port, **connection_params)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\smtplib.py" in __init__
  251.             (code, msg) = self.connect(host, port)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\smtplib.py" in connect
  336.         self.sock = self._get_socket(host, port, self.timeout)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\smtplib.py" in _get_socket
  307.                                         self.source_address)

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\socket.py" in create_connection
  727.         raise err

File "C:\Users\Waqas Ahmad\AppData\Local\Programs\Python\Python37\lib\socket.py" in create_connection
  716.             sock.connect(sa)

Exception Type: ConnectionRefusedError at /accounts/register/
Exception Value: [WinError 10061] No connection could be made because the target machine actively refused it

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6e7a0868-5452-4eb2-acf8-c64bc89c6f79%40googlegroups.com.

No comments:

Post a Comment