question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ConnectionRefusedError, Error 10061 on demo project

See original GitHub issue

Hello,

I am using a Windows 10 PC from my workplace and invested some hours to get all install scripts etc. working. I finally managed to get everything installed and can run the Django server.

I can connect to the server via localhost:8000 and see the main page. Though, the connection does not work with http://127.0.0.1:8000. It seems like Django is running without problems, but when I go to any example page, the server console always outputs a ConnectionRefusedError. When I go to the page of example 2, it even shows error 10061 (ConnectionError at _demo-two.pdf). After any of these errors occurs, the server does not work anymore and needs to be restarted.

It seems like the ports are blocked or something similar. I found related issues, but they did not state this exact problem. Inputting this into the requirements.txt and dev_requirements.txt did also not help: https://github.com/GibbsConsulting/django-plotly-dash/issues/126#issuecomment-472019350

Next, I tried to resolve all version conflicts and downgrade several versions of different packages, but then, the server did not even start anymore.

I tried out the server without any network connection, inside the company’s internal and external network.

One thing that I can not change is that there is McAfee Endpoint Security installed. It cannot be closed or deactivated (or I just did not find a way to do that with my Admin privileges).

This are the batch files i wrote for installation and starting the server:

installer.bat

` @echo off cd %~dp0 echo. echo Welcome! echo. echo This is a Windows install script for Python, Django and Django Plotly Dash. echo. echo. echo. echo Current directory: %CD% echo. :directory set /P c=Did you run this script from the desired installation directory? [Y/N] if /I “%c%” EQU “Y” goto :directory_yes if /I “%c%” EQU “N” goto :directory_no goto :directory

:directory_no echo. echo Please move this file to the desired installation directory. echo Press any key to exit. pause exit

:directory_yes echo. echo. :python set /P c=Is Python 3 installed? [Y/N] if /I “%c%” EQU “Y” goto :python_yes if /I “%c%” EQU “N” goto :python_no goto :python

:python_no echo. echo Please download and install Python 3. start “” https://www.python.org/downloads/ echo. echo. goto :python

:python_yes echo. echo. :cpp set /P c=Are the Visual C^+^+ Build Tools installed? [Y/N] if /I “%c%” EQU “Y” goto :cpp_yes if /I “%c%” EQU “N” goto :cpp_no goto :cpp

:cpp_no echo. echo. echo Please download the Visual C^+^+ Build Tools: echo Go to: Tools for Visual Studio 2019 -^> Build Tools for Visual Studio 2019. echo. echo Download and run the application echo Install: Workloads -^> C^+^±Buildtools timeout /t 3 /nobreak > NUL start “” https://visualstudio.microsoft.com/de/downloads/ echo. echo. goto :cpp

:cpp_yes echo. echo. echo Current directory: %CD% :project set /P c=Did you download and unzip the GIT project into this folder? [Y/N] if /I “%c%” EQU “Y” goto :project_yes if /I “%c%” EQU “N” goto :project_no goto :project

:project_no echo. echo. echo Please download the project: echo Click on 'Clone or download -^> Download ZIP. echo. echo When finished, unzip the archive to: echo %cd% timeout /t 3 /nobreak > NUL start “” https://github.com/GibbsConsulting/django-plotly-dash echo. echo. goto :project

:project_yes IF NOT EXIST django-plotly-dash-master\ GOTO folder_no echo. echo. echo Starting Installation echo. CD django-plotly-dash-master echo moved to: %CD% echo.

pip install virtualenv

virtualenv -p python env

:: this call runs the following script in the virtualenv: :: :: call env\Scripts\activate :: pip install -r requirements.txt :: pip install -r dev_requirements.txt :: pip install pypiwin32 :: python setup.py develop cmd /k “cd env\Scripts & activate & cd…/… &pip install -r requirements.txt & pip install -r dev_requirements.txt & pip install pypiwin32 & python setup.py develop & exit” echo. echo. echo Successfully installed the environment in virtualenv echo. echo Note: The test server can be started by running “start_server.bat”. echo. echo Press any key to exit. echo. pause exit

:folder_no echo. echo. echo the folder “django-plotly-dash-master” was not found. Are you in the right directory? echo Please unzip the GIT files into this folder. echo. echo Current directory: %CD% echo. echo. goto :project `

start_demo_server.bat - run as administrator

` @echo off cd %~dp0 :: This batch runs the following script: :: :: cd demo :: python manage.py migrate :: python manage.py shell < configdb.py :: python manage.py collectstatic -i “.py" -i ".pyc” --noinput --link :: python manage.py runserver

:: Check if the project folder exists. :project_yes IF NOT EXIST django-plotly-dash-master\ GOTO folder_no cd django-plotly-dash-master

:: Run the script cmd /k “cd env\Scripts & activate & cd …/…/demo & echo %CD% & python manage.py migrate & python manage.py shell < configdb.py & python manage.py collectstatic -i “.py" -i ".pyc” --noinput --link & python manage.py runserver & deactivate”

exit

:folder_no echo. echo. echo The folder “django-plotly-dash-master” was not found. echo This file needs to be in the parent folder of “django-plotly-dash-master”. echo. echo. echo For more information, please run “install.bat” first. echo. echo Current directory: %CD% echo. echo Press any key to exit. pause exit `

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
GibbsConsultingcommented, Apr 10, 2019

That connection error is because you don’t have Redis running.

See this part of the documentation for the installation instructions.

0reactions
GibbsConsultingcommented, Mar 4, 2020

@kartom In order to determine if there is a problem, rather than just incorrect configuration, it would be helpful if you could supply some information about the installation and configuration steps that you have taken. Without that, it is not possible to comment further.

For example, the settings here and also here impact the serving of these assets.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix GP error "return error code = 10061"
The 10061 is a winsock connection error meaning the connection was refused. No connection could be made because the target machine actively ...
Read more >
Connection was refused by other side: 10061: No ...
In container run scrapy project: scrapy crawl foobar -o allobjects.json. This works locally, but on my production server I get error: [scrapy.
Read more >
Error in tcp bind 10061 during JDBC connection
Error 10061 is a Winsock "connection refused" error. This occurs when attempting to connect to a Progress database via TCP/IP if the port ......
Read more >
Socket ConnectionRefusedError: [WinError 10061]
I found this after trying to implement exactly the example in this link. I copied the server file to one laptop and the...
Read more >
"connect failed with error 10061" message sender will not ...
This usually results from trying to connect to a service that is inactive on the foreign host i.e. one with no server application...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found