VMware Cloud Community
goppi
Enthusiast
Enthusiast

vim-cmd on ESXI fails with cannot connect to localhost

Hi.

I think the subject says it all. I'm playing around with ESXi 4.0 and all seems to work well so far.

But when trying to issue commands from the "unsupported" console like "vim-cmd /vmsvc/getallvms" i always get Failed to connect: Cannot connect to host localhost: Connection refused.

Any idea what could be wrong?

Thanks a lot.

goppi

0 Kudos
7 Replies
lamw
Community Manager
Community Manager

Sometimes this happens, I've only seen it a few times, but generally a reboot will solve the issue. I never really figured out why it fails to connect to itself, thats one of the issues going into this unsupported mode

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
DSTAVERT
Immortal
Immortal

Did you login as root?

Is authd service still running.

Check the /var/log/messages for errors.

-- David -- VMware Communities Moderator
0 Kudos
goppi
Enthusiast
Enthusiast

Hi.

>>Did you login as root?

yes.

>>Is authd service still running.

ps aux did not show it.

>>

Check the /var/log/messages for errors.

Did not see anything obvious.

BTW: machine has been rebooted several times without success.

Any further idea?

Thanks for taking the time to look into that issue

Regards,

goppi.

0 Kudos
goppi
Enthusiast
Enthusiast

Did recreate ESXi server from scratch and problem disappeared.

I have no clue what caused this issue.

Let's see if problem reappears.

Regards,

goppi.

0 Kudos
Grzesiekk
Expert
Expert

Hello,

  i had the same problem recently. Instead of reinstalling esxi i have restored default configuration from esxi menu. After that i had to configure it's network setting again and i was able to login using VI client and vim-cmd was not giving that error anymore. So if anybody else will have this problem, try to restore default setting, it might help you and save a lot of time.

--- @blog https://grzegorzkulikowski.info
0 Kudos
eversdn
Contributor
Contributor

I had the same problem recently and I did the restore. Now it´s working fine too.

Regards,

Everson

0 Kudos
NegishiKouki
Contributor
Contributor

In my search, it seems that vim-cmd uses 902 port to connet to localhost.

You should check if the port is restricted in firewall settings.

0 Kudos