I have a script that uses tmux which runs fine on my base machine.
When I run the same script in a docker image, I get the following error:
failed to connect to server: Connection refused
I am gonna reboot and see if this problem goes away. Tackle again tomorrow.
My confidence in tmux is flagging... :^)
This is a false alarm. The initial code in the first terminal was failing and I did not notice it. A terrible bug and I am afraid a less than competent programmer.
The wonderful tmux works fine under docker.
Regards,
Flint
Related
looking for solution to prevent google cloud shell disconnecting when it found you idle, even it also disconnect when you run some processing and leave system idle.
message shown Connection to Cloud Shell has been lost. Any additional changes will not be saved.
This behavior is by design, as Cloud Shell is intended for interactive use only.
One way to fix it is running a ping command within a TMUX Terminal.
apt install tmux
apt update
tmux
ping google.com
Ctrl+b "
The downside of this is you'll be working halfscreen.
I'm trying to install to my Ubuntu 20.04 local machine using docker-compose. When I run sudo docker-compose -f docker-compose-non-dev.yml up, I got several errors and the process keep giving errors and did not end, so I aborted. Can you please tell me what the problem is?
The errors I get during Init Step 1/4 [Starting] -- Applying DB migrations are:
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) >relation "logs" does not exist
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) >relation "ab_permission_view_role" does not exist
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) >relation "report_schedule" does not exist
I had the same same issue on Mac OS. And similar issues have been reported in the GitHub issues page as well, but it was not reproducible by everyone.
There is a possibility that something may have gone wrong in the first run.
Try running docker-compose down -v and then run docker compose up.
If the above fails, try upgrading your docker installation. Installing a new version solved my problem.
I had the same issue (Mac OS Monterey) where I had an instance of docker running Postgres for one of my apps, so when Superset started, it was looking at that instance of Postgres which obviously didn't have the appropriate databases/tables/views/etc.
So just stopping that other instance and restarting the Superset containers fixed the errors and properly started Superset. #embarrassed #oops
I experienced the same issue but these errors were at the end of a long string of cascading errors. I had this error consistently across all runs.
Looking at the first error, it seems like the initialisation script is not waiting for PostgreSQL to be ready and starts transacting right away. If the first transactions fail, many others fail subsequently. In my case the database needed a few more seconds to be ready so, I just added a sleep 60 at the beginning of docker/docker-bootstrap.sh to give time to PostgreSQL to start before other services start working.
I deleted the previously-created docker volumes and ran docker-compose -f docker-compose-non-dev.yml up again and now all works fine.
I got the err_connection_refused when trying to accessing django running on wsl2 (http://localhost:8000) from Windows but when I use curl http://localhost:8000 from Windows terminal bash, it's working fine. I have tried to add a new firewall inbound rule for port 8000 but it's still not working. Is there anything else I need to take care of.
Thanks a lot
Seems like a forwarding problem. WSL2's interface is NAT'd, whereas WSL1 was bridged by default. WSL seems to do some "auto-forwarding" of ports, but only on localhost. However, sometimes this auto-forwarding mechanism seems to "break down". The main culprit seems to be hibernation or Windows Fast Startup (which are both closely-related features).
Does the problem resolve if you do a wsl --shutdown and then restart the WSL2 session? If so, try disabling Windows' Fast Startup. I already had Fast Startup disabled due to a different (non-WSL issue) on my system, so that could be related to why I am not able to reproduce.
Along the same lines, do you Hibernate instead of powering off? In that case, a wsl --shutdown might resolve as well.
For future readers, note that the above two points seem to resolve the issue for most people who have upvoted and responded in the comments. However, if that does not work for you, the following were my original "additional suggestions":
For some additional ideas, see this github issue. There are some suggestions on services that might be needed. (Side question - Are you running Windows Home or Professional?)
Is there any chance that your Windows hosts file (e.g. c:\windows\system32\drivers\etc\hosts) points localhost to an IP other than 127.0.0.1? If I attempt to access via my local Windows IP address, rather than 127.0.0.1 or localhost, I get an ERR_CONNECTION_REFUSED as well.
Since you were looking at the firewall rules, maybe look at a forwarding rule instead of just an inbound allow?
If all else fails, try exporting/backing up the WSL2 session (see wsl --export), then import it in as a new WSL1 session. See if it works there.
On my WSL2/Ubuntu 20.04 system, I attempted to reproduce (but haven't been able to yet) with the following steps:
mkdir -p ~/src/dj-test
cd ~/src/dj-test
python3 -m venv dj
source dj/bin/activate
pip install Django
django-admin startproject config .
python manage.py runserver
(although I used activate.fish since I'm running the fish shell)
From Vivaldi web browser in Windows, accessed localhost:8000, which returned "The install worked successfully! Congratulations! ..."
curl under Powershell Core worked as well.
I tried to execute a python script that will extablish an SSH connection but it won't work. It is successful when i do it manualy over the python shell, though.
I run a packet capture and i saw that my client machine is resetting the connection for some reason. is it a bug or it just wouldn't work with python2.7?
please help.
Thanks,
Richard
We don't have much information since you didn't send any code, however did you check your firewall parameters ? Maybe your software is not allowed to run the connection
CMD error message
jupyter 404 error message
I was able to work fine with python (jupyter notebook) until yesterday, and I turned off the command prompt that was running python. When I try to restart python by typing in jupyter notebook in cmd, it throws a 404 error. I think the possible reason for this is that I was running python as a server and connecting it to asp.net website in visual studio with IIS running the asp.net. So the python server on port 8888 might still be running, and I think that is what's preventing me from opening jupyter notebook.
So I tried the following steps to get it to work, but it throws the same error:
Pressed ctrl+c twice to interrupt the kernel (interuppted but still did not run jupyter notebook afterwards)
Uninstalled Python 2.7 Anaconda and reinstalled
Removed IIS website and tried running python by itself (still not worked)
My question comes down to this:
How do I get the jupyter notebook to run? Should I try closing the port 8888 and running jupyter notebook again?
In case someone faces the same issue, I am posting an answer to my question :)
Answer:
Open Anaconda prompt then type in "jupyter notebook"