ssh_exchange_identification: read: Connection aborted on VirtualBox

I have an Ubuntu 18 Guest on Virtual Box 6 running over windows 10. I need to ssh into the ubuntu machine. I’ve set a nat rule from my host 3022 port to port 22 on the guest. Configuration as follows: nat rules But whenever I try to ssh into the machine I’m getting the following error:

ssh -l vfbsilva localhost  -p 3022 ssh_exchange_identification: read: Connection aborted 

I`m using the terminal emulator, might this be the problem?

Error Establishing Database Connection

Hi Well know issue across these pages. Nonetheless, here is a rather unusual version. All was working well. Double checked on two different platforms, smartphone and Desktop. Went on a walkabout… came back and had that error. No admin access, site down. Only sftp access and PHPmyadmin. Tried repairing DB to no avail as I get a message repair not supported. Optimizing not supported, etc. Followed all instructions I found here and even others. uploaded a new version of WordPress, nothing. It seems I have server access errors on certain lines of wp-db.php. Check these and they are just informative text properly isolated. Unless my editor gives the wrong lines. My Host is sluggish on reply and when they do is always a different person so they never really know what is what. Cleared local cache and cookies, deactivated any browser blockers and still. Professionally speaking I am not selling because my site is down. Logically thinking WP and the rest is a whole bunch of crap. Sorry for those who work hard, blindly in solving and keeping up WordPress. My biggest mistake ever. WP has been nothing but hassle. programmers create it around making large amounts of money selling editors, themes, plugins, etc. So it is rather convenient to have problems. Like illnesses. The pharma industry love us when we are ill. Thank you for your help Guys. Much appreciated.

How to handle database connection password?

I have a question about using databases in my application. I have the User table which stores password for my users. I know how to handle user authentication, but how to handle the password for the database itself? I looked online, and all articles mention only storing user passwords, not the database password itself. To be more specific, let’s say I’m working on an application that requires the database password to access the database, and only then authenticates the user. Where and how to safely store it/check it?
Thank you.

If Wi-Fi connection drops internet, can device failover to network connection?

Once in awhile the internet will drop on the network that my phone is connected to via Wi-Fi. It’s pretty rare, but in instances when it happens, my phone remains connected to the network but won’t receive notifications. I won’t know that it’s not connected unless I’m intentionally attempting to do something that requires internet access at which point I can just disable Wi-Fi.

I imagine that my phone should be able to figure out it no longer has internet access even if it’s connected to a network. Is there a way to have it failover to the provider’s 4G/LTE connection when this happens?

My device is a Galaxy S6 Edge+ running Android 5.1.1

Connection to MongoDB randomly fails on Kubernetes

I’m using the official Docker image for MongoDB (I tried the 3.6.12 release and the 4.0.9). Version of Kubernetes is 1.11.5 on Azure Kubernetes Services.

After creating a custom user, I can successfully connect into MongoDB (using exec on the running pod):

mongo localhost/db_name -u user -p password --authenticationDatabase admin 

And it works properly.

However, when I try to connect by using the IP or the name of the pod, it fails randomly:

mongo pod_service_name/db_name -u user -p password --authenticationDatabase admin 

If I run this command 4/5 times, it will fail 3 or 4 times, and succeed once/twice.

[thread1] Error: Authentication failed. : connect@src/mongo/shell/mongo.js:263:13 @(connect):1:6 exception: connect failed 

At some point, it works:

MongoDB server version: 3.6.12 Welcome to the MongoDB shell. For interactive help, type "help". 

Same issue with MongoDB 4.X.

I’ve tried to find out if it can be a network issue but when trying to connect to the port using netcat, I never face any trouble.

Other applications trying to access the database face the same issue and have to retry connecting multiple times before authentication succeeds.

Why do I get a 110: Connection timed out error, white serving a flask app through nginx and uwsgi?

I am trying to serve a flask application using nginx and uwsgi, through an ubuntu docker container, while the host is also an ubuntu 18.04 OS.

This is the conf file for the nginx server, for which I have created a symbolic link in /etc/nginx/sites-enabled:

server {     listen 1611;     real_ip_header X-Forwarded-For;     set_real_ip_from;     server_name localhost;      location / {         include uwsgi_params;         uwsgi_pass unix:/var/www/html/step_service/socket.sock;         uwsgi_modifier1 30;         } } 

The `uwsgi.ini’ file is as follows:

[uwsgi] base=/var/www/html/step_service app=app module=%(app) callable = app  home=%(base)/venv pythonpath=%(base) socket=%(base)/socket.sock chmod-socket=777  master=true processes=5 threads=5 die-on-term=true autostart=true autorestart=true harakiri=30 logto=/var/www/html/step_service/log/%n.log 

The logs of uwsgi seem to indicate success:

 * Serving Flask app "app" (lazy loading)  * Environment: production    WARNING: Do not use the development server in a production environment.    Use a production WSGI server instead.  * Debug mode: off  * Running on (Press CTRL+C to quit) 

The logs of nginx server (in particular error.log) is:

2019/04/18 16:23:30 [error] 6729#6729: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client:, server: localhost, request: "GET /rec/1/1 HTTP/1.1 ", upstream: "uwsgi://unix:/var/www/html/step_service/socket.sock", host: "" 

Any ideas would be more than welcome!

Enable packet filter firewall (pfctl -Ef) temporarily stops all network connection

I’ve noticed that when re-setting my firewall with a new set of rules, all network communication completely stops for a short time, until it regains with the new set of rules.

In fact, it also occurs when I start firewall after it was previously closed or when it switch from enable to disable state.

Why does PacketFiler temporarily halt connection every time it changes state (using pfctl -Ef or pfctl -d) ?

Ubuntu IoT – (SSH) port 22: connection refused

If I want to ssh my RPi 3 (B+) with Ubuntu Core 18.04.02 LTS installed (ssh from another computer in the same network), I always get:

port 22: Connection refused 

The only thing i can do on the RPi is press “Enter”, this reloads the screen. All other keys won’t do anything. Does anyone know how to start the console on the RPi here or to connect to the RPi?

Explicit computation of connection & curvature matrix

I have recently learned the generalized Gauss-Bonnet theorem, which states that:

\begin{equation} \int_M \text{Pf}(\Omega) = (2\pi)^n\chi(M), \end{equation} where $ n$ is half the dimension of an even dimensional, compact, Riemannian manifold.

Here, $ \Omega$ is the curvature matrix of 2-forms determined by the Riemannian metric $ g$ and some metric compatible connection $ \nabla$ , and $ \text{Pf}(\Omega)$ is the Pfaffian.

By Chern-Weil, we know that our choice of $ \nabla$ does not make any difference.

Question: The above integral, if the dimension of the manifold in question is 2, better reduce to the Gauss-Bonnet theorem that we know and love: \begin{equation} \int_M KdA = 2\pi\chi(M), \end{equation} where $ K$ is the Gaussian curvature. But I am not sure how I can carry out the computation necessary to get there…

More specifically, I know that if the dimension is 2, then $ \text{Pf}(\Omega)$ is gonna be a 2 form, more precisely, some number times $ \Omega_1^2$ , the upper-right entry of $ 2\times 2$ curvature matrix. If all were to work, this 2-form better be the form $ KdA$ .

By Chern-Weil, we may as well assume that the connection in question is Levi-Civita. Then the Theorema Egregium allows us to write $ K$ in terms of $ g$ and the associated Christoffel symbols.

My problem is that I don’t know how to carry out this explicit computation… Could you help me with this?