NMSSH: Socket connection successful but then fail to establishing SSH session - ssh

I was able to SSH into my IoT device yesterday, but this morning when I try to connect it again. it fails to establish SSH session.
2021-08-25 09:25:53.501096-0400 [1387:464804] NMSSH: Socket connection to 192.168.77.30 on port 22 succesful
2021-08-25 09:25:53.551438-0400 [1387:464804] NMSSH: Failure establishing SSH session
It seems like socket connection success and then fails.
Any help is appreciated.

Related

I cannot connect to RabbitMQ at port 5672

I'm new to RabbitMQ and docker. I'm running a Springboot app and I have a docker container that is running the management console on 15672. I'm able to get to that in my browser just fine, but I cannot connect to RabbitMQ when I start the application using this in my yml file:
rabbitmq:
username: test
password: test
host: localhost
port: 5672
test is a user I created with admin permissions same as guest.
When I change the user/password to guest, it tries over and over to connect to 5672 and finally times out. test/test just fails fast with this error:
Rabbit health check failed
org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused)
at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:61) ~[spring-rabbit-2.2.6.RELEASE.jar:2.2.6.RELEASE]
Any advice for a newbie would be greatly appreciated.
I'm expecting to connect to RabbitMQ using test/test on port 5672. But I must have something configured incorrectly.

How to keep HAProxy TCP connection alive?

I am having HAProxy in front of TCP servers like Postgres, Mongo and logstash. I am able to establish TCP connection but the connection will timeout after several minutes. Errors I'm getting are like
Mongo::Error::SocketTimeoutError, Socket request timed out
and
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
What can I do to keep TCP connection alive?
Will this help?
option srvtcpka

Packer loops through ports when attempting to establish SSH connection

When Packer reaches the "Waiting for SSH to become available..." step.
My logs show
14:07:29 [INFO] Attempting SSH connection...
14:07:29 reconnecting to TCP connection for SSH
14:07:29 handshaking with SSH
14:07:29 handshake error: ssh: handshake failed: read tcp 127.0.0.1:60372->127.0.0.1:3057: read: connection reset by peer
14:07:29 [DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:60372->127.0.0.1:3057: read: connection reset by peer
14:07:36 [INFO] Attempting SSH connection...
14:07:36 reconnecting to TCP connection for SSH
14:07:36 handshaking with SSH
14:07:36 handshake error: ssh: handshake failed: read tcp 127.0.0.1:60376->127.0.0.1:3057: read: connection reset by peer
14:07:36 [DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:60376->127.0.0.1:3057: read: connection reset by peer
Note a different port on each attempt.
60372
60376
Packer is trying a new port, every 7 seconds.
Is there a way to configure the ports before or during the build to avoid this try/fail approach?
That is the source port which the ssh connection is made from. It's assigned by the OS with a random available high port.
The issue is not with SSH Server or TCP/IP. It is with the way Packer is designed.
When a VM is created, Packer.io will run boot commands. It takes time and time varies on different machines. During that time you will see "Waiting for SSH to become available...". On the background, Packer.io will be attempting to establish an SSH connection. The log is saturated with messages like this
Linux
14:07:29 [INFO] Attempting SSH connection...
14:07:29 reconnecting to TCP connection for SSH
14:07:29 handshaking with SSH
14:07:29 handshake error: ssh: handshake failed: read tcp 127.0.0.1:60372->127.0.0.1:3057: read: connection reset by peer
14:07:29 [DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:60372->127.0.0.1:3057: read: connection reset by peer
or
Windows
15:54:31 packer.exe: 2017/02/01 15:54:31 [INFO] Attempting SSH connection...
15:54:31 packer.exe: 2017/02/01 15:54:31 reconnecting to TCP connection for SSH
15:54:31 packer.exe: 2017/02/01 15:54:31 handshaking with SSH
15:54:31 packer.exe: 2017/02/01 15:54:31 handshake error: ssh: handshake failed: read tcp 127.0.0.1:62691->127.0.0.1:4289: wsarecv: An existing connection was forcibly closed by the remote host.
15:54:31 packer.exe: 2017/02/01 15:54:31 [DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:62691->127.0.0.1:4289: wsarecv: An existing connection was forcibly closed by the remote host.
OS will boot and with it SSH server on the guest will become available. At that moment SSH connection from host to guest should establish.
Reproduced and Confirmed on Windows 10 Pro and Ubuntu 16.04.1 TLs

putty connection timeout - how to troubleshoot

when i try to make a ssh connection (port 22) connection to a server in my college it's giving "network error- connection timed out" error. I'm connected to internet through my home wifi. Then, I went to my friend's home any tried to establish the same connection, it worked fine. Is This the problem with my router or internet connection. please help me in troubleshooting.
PS. None of my roommates were able to establish the ssh connection in my home wifi.
"network error- connection timed out" I usually get either when I am not able to ping the SSH Server(connectivity issue) or IPtables on server is blocking my connection.

ApacheDS suddenly stopped connection

I've setup ApacheDS on my windows7 machine. It was working fine but suddenly it says connection refused.
Server is up but when trying to connect it gives below error. Please help
Error while opening connection
- Cannot connect on the server: Connection timed out: no further information
org.apache.directory.ldap.client.api.exception.InvalidConnectionException: Cannot connect on the server: Connection timed out: no further information
at org.apache.directory.ldap.client.api.LdapNetworkConnection.connect(LdapNetworkConnection.java:564)
at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper$1.run(DirectoryApiConnectionWrapper.java:227)
at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.runAndMonitor(DirectoryApiConnectionWrapper.java:1174)
It says connection refused.
No it doesn't. It says 'connection timed out'. It's not the same thing.
You have a connectivity problem or a firewall problem between the client and the server.