简体   繁体   English

connectionreseterror: (errno 104) 连接被对等方重置

[英]connectionreseterror: (errno 104) connection reset by peer

I am working on a Django web project.我正在研究 Django web 项目。 One moment before all was good but suddenly django localhost server kept itself reloading and not stopping auto-reloading the pages.前一刻一切都很好,但突然 django 本地主机服务器保持自身重新加载并且没有停止自动重新加载页面。 First I got the following error: connectionreseterror: (errno 104) connection reset by peer And the server just kept reloading itself over and over again.首先,我收到以下错误: connectionreseterror: (errno 104) connection reset by peer而服务器只是一遍又一遍地重新加载自己。 What could be the cause for this?这可能是什么原因? Any help will be appreciated.任何帮助将不胜感激。

What is your Django package version?您的 Django package 版本是什么?

There is exception in django project like yours https://github.com/django/django/commit/934acf1126995f6e6ccba5947ec8f7561633c27f django 项目中存在异常,例如您的 https://github.com/django/django/commit/934acf1126995f6e6ccba5947ec8f7561633c27f

Try to update django to newest version尝试将 django 更新到最新版本

pip install --update django

SOlved .解决了 I was using JQuery autocomplete to search data from backend and wanted to implement onclick functionality that redirects the user to that specific item page.我正在使用 JQuery 自动完成从后端搜索数据,并希望实现 onclick 功能,将用户重定向到该特定项目页面。

 $(document).ready(function() { $("#search").autocomplete({ source: "{% url 'ajax-search' %}", select: function (event, ui) { window.location.href = ui.item.value; } }) window.location.href = '' });
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <div class="search"> <label for="search"></label><input type="text" oninput="" style="height: 36px" class="searchTerm" placeholder="What are you looking for?" name="searchtext" id="search"><input type="hidden" id="project-id"> <button type="submit" class="searchButton"> <i class="fa fa-search"></i> </button> </div>

and Issue was in line:和问题是一致的:

 window.location.href = ''

I removed that line of code and now it's all good:)我删除了那行代码,现在一切都很好:)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ConnectionResetError:[Errno 104]由对等Python 3重置连接 - ConnectionResetError: [Errno 104] Connection reset by peer python 3 Google colab 下载 - ConnectionResetError: [Errno 104] Connection reset by peer - Google colab download - ConnectionResetError: [Errno 104] Connection reset by peer 如何修复“ConnectionResetError: [Errno 104] Connection reset by peer”错误? - How to fix "ConnectionResetError: [Errno 104] Connection reset by peer" error? Python套接字ConnectionResetError:[Errno 54]对等方与socket.error的连接重置:[Errno 104]对等方重置连接 - Python socket ConnectionResetError: [Errno 54] Connection reset by peer vs socket.error: [Errno 104] Connection reset by peer python3.8 http.server - ConnectionResetError: [Errno 104] 对等方重置连接 - python3.8 http.server - ConnectionResetError: [Errno 104] Connection reset by peer ConnectionResetError:[Errno 104] 连接被特定网站的对等方重置 | Python3 - ConnectionResetError: [Errno 104] Connection reset by peer from specific website | Python3 ConnectionResetError:[Errno 104]由对等方和ERR_NAME_NOT_RESOLVED在heroku上重置连接,并通过Selenium进行了移动测试 - ConnectionResetError: [Errno 104] Connection reset by peer and ERR_NAME_NOT_RESOLVED on heroku with mobile testing through Selenium Ariflow [Errno 104]对等重置连接 - Ariflow [Errno 104] Connection reset by peer 在Python中由对等[Errno 104]重置连接 - Connection reset by peer [Errno 104] in Python 在Python 2.7中由peer [errno 104]重置连接 - Connection reset by peer [errno 104] in Python 2.7
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM