1

I am having this recurrent issue on one of my MySQL Cluster Servers, actually always happens in any random MySQL server of this cluster, on many countries where we have this same configuration.

I have this "dbX Node" which I can ping:

$ ping 192.0.2.4
PING 192.0.2.4 (192.0.2.4) 56(84) bytes of data.
64 bytes from 192.0.2.4: icmp_seq=1 ttl=61 time=1.92 ms
64 bytes from 192.0.2.4: icmp_seq=2 ttl=61 time=2.46 ms

I can Telnet TCP Port 22:

telnet 192.0.2.4 22
Trying 192.0.2.4 ...
Connected to 192.0.2.4.
Escape character is '^]'.

And immediately closed:

Connection closed by foreign host.

And Obviously, SSH itself it's not working:

debug1: Connection established.
debug1: identity file /home/user/.ssh/identity type -1
debug3: Not a RSA1 key file /home/user/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/user/.ssh/id_rsa type 1
debug1: identity file /home/user/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host

I can also telnet to MySQL port:

# telnet db5 3306
Trying 192.0.2.4...
Connected to db5 (192.0.2.4).
Escape character is '^]'.

But cannot connect to it:

# mysql -h db5 -uroot

This server is an ProLiant DL360p Gen8 Running RHEL 5.5

When I use the iLO to connect and restart the SSH Daemon, I don't have any console prompt, only a gray small thing on the corner...

I constantly need to reboot the server who faces this issue.

I need help to have this solved. I have tried everything. Have you ever faced something similar to this?

2
  • The log messages say it all - SSH can't read the key because it's not in a format that SSH recognises. Fix that.
    – Jenny D
    Commented May 15, 2015 at 8:52
  • Dear Jenny, that is not the case, the authentication method is interactive, so it is not relevant the key issue. Regards, OS is Hanged, no access through Terminal, Console, iLO, etc... Commented May 18, 2015 at 20:56

2 Answers 2

0

For the ssh, it looks like you are using a putty key, ssh can not use a putty key unless it is exported to openssh format. it looks like the file has been edited manually, if possible restore the private key from a backup, or try regenerating the keys you use or create a new key and compare the two to make sure the key you are using hasn't had its formatting changed.

As for the telnet ending immediately, that is to be expected as ssh is looking for ssh connections not telnet connections.

Once you have fixed the key issues you should be able to ssh into the box.

as for the mysql login, usually the default login for root is limited to 127.0.0.1 & local host. so unless you have allowed certain hosts (yourhost.domain) or % (% is a bad idea by the way) you wont be able to connect unless you use an ssh tunnel so that you can connect locally. another thing is that your current command of mysql -h db5 -uroot is trying to connect to root without a password. Try instead mysql -h db5 -u root -p that will prompt you for the password.

2
  • Hello, For the telnet on port 22, it is normal to work on all linux boxes, You will be welcomed by SSH Daemon although you cannot connect.Of a tcpdump I see that the connection is receiving a reset from remote peer. As per the Mysql access, I can connect the same way to other machines in same cluster. the -p was only a typo. The key stuff is not relevant as it will anyway ask for Interactive login afterwards...
    – Jair A. Patete
    Commented May 13, 2015 at 17:25
  • I see what you mean, I apologize, i forgot about it giving the following SSH-2.0-OpenSSH_4.3 Protocol mismatch. before closing the connection. depending on if this is a virtual machine or a physical box, it may be worth it to reinstall ssh.
    – Gluzzer
    Commented May 13, 2015 at 17:28
0

Gluzzer,

It my take a bit.

  1. Check your config files make sure your allowed to access the device from the network your connecting from.

  2. Ensure that on those servers and the networks they are attaced to. That they can ping you. If you have one way routing in the network that will fail for your access attempts. Some network administrators block ICMP Ping requests and firewall / access list rules may prevent you from getting to your devices unless your on the same subnet as them.

  3. Newer Linux server installs iptables / ipforwarding / ipchains have everything blocked by default. You have to manually open each port or socket you need. Some install scripts take care of this. some fail and you have to open them with manual Linux commands.

Double edge sword.. blocked by the applications configs / local machine or by your own network team.

Hope this helps a bit. Cheers...

1
  • Thanks. I am trying to connect from servers in same LAN-same SW. No fw in the middle. The weirdest thing is the iLO Remote Console, it is showing nothing... this server is ONLY running MySQL and Tungsten Replicator, so I think it can be a Kernel Panic or a Bug instead...
    – Jair A. Patete
    Commented May 14, 2015 at 15:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .