Debug record: vCenter6.5 suddenly can not access and error "503 Service Unavailabl

When you use the time vCenter6.5 joy of their beloved data center management, I wonder if at some point suddenly appeared on the screen as the interface:

503 Service Unavailable (Failed to connect to endpoint: [N7Vmacore4Http20NamedPipeServiceSpecE:0x7f0782fb55f0] _serverNamespace = / _isRedirect = false _pipeName =/var/run/vmware/vpxd-webserver-pipe)

And at the same time, in any case do not restart the vCenter effect. If this happens, do not panic, just follow the steps below, the problem can be solved, and all data centers are intact:

 1. 使用ssh或者直接从ESXi界面登陆到vCenter Applience虚机中,进入SHELL

      Last login: Thu Sep 28 10:05:40 2017 from 10.4.143.97

    Connected to service

        * List APIs: "help api list"

        * List Plugins: "help pi list"

        * Launch BASH: "shell"

    Command> shell

    Shell access is granted to root

 2. 输入如下命令:service-control --status vmware-vpxd看到状态为“Stopped”

 3. 输入如下命令:service-control --start vmware-vpxd并不能启动相应服务

After confirming 2,3 points, continues:

 4. 输入如下命令:/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres,此命令登陆postgres数据库

 5. 输入如下命令,找到有问题的虚机:select v.id, v.local_file_name, h.IP_ADDRESS FROM VPX_VM v, VPX_NIC n, VPX_HOST h WHERE v.id=n.entity_id and v.host_id=h.id and n.network_name=''; 

  6. 输入如下命令,请用5中得到的虚机id来替换本语句的“<YOURID>”:select * from vpx_entity where id = '<YOURID>'; 

  7. 找到受影响的虚机后您有两个选择:

      1)删除相应虚机以及删除相应记录:delete from vpx_entity where id = '<YOURID>'; 

      2)删除该虚机的网络适配器(Network Adepter) -> 保存 -> 添加网络适配器

  8. 输入如下命令:service-control --start vmware-vpxd

      您将可以看到您的vCenter可以访问了。

Affected vCenter version: Version 6.5.0 Build 4944578, because the virtual machine network card database data items appear empty (NULL) value when creating a virtual machine.

Guess you like

Origin blog.51cto.com/2714349/2437696