Hi,
After looking at all the issues in this thread, I still had the 503 problem.
I'm running the Photon-based VCSA Appliance 6.5. I did the Photon update, and upgraded to the latest version, 6.5.0.5300.
After a reboot, that did not solve my issue. I again logged into the management appliance, and looked at the settings. Following the helpful video on the DNS/DHCP reservation, which did not apply to me, I began to wonder if network settings where the issue.
In my settings, I found that IPv4 was enabled, but IPv6 was turned off. On a hunch, I enabled IPv6, and a few minutes later the /ui and vSphere 6.5 web client started working again. Great!
On a reboot, I found Photon did not keep any of the IPv6 settings, and again, the 503 error was thrown, no matter how long I waited. I logged into the appliance via the console, and tried to set IPv6 settings manually. This did not work. There's some modification to the configuration to prevent setting IPv6 up on the command line.
Upon deeper digging, I found the following settings in /etc/sysctl.conf on the machine,
#Disabling SLAAC/Link Local addresses
net.ipv6.conf.eth0.disable_ipv6=1
Note to VMware staff: This does not disable link local, it turns off IPv6 completely on the eth0 interface!
This appeared two times. I then went and changed the settings to,
net.ipv6.conf.eth0.disable_ipv6=0
And ran,
sysctl -a
sysctl -p
And the settings where changed. After a few minutes, the web based GUI started to work again.
Next, I rebooted the machine, and it worked just fine. Multiple reboots, it works just fine.
I found that after I changed this setting, I could change IPv6 settings in the Photon Management application.
You will notice that you will get 404 errors or cannot connect errors when you try the web GUI very early in the startup when things are working as they should. That's a good sign, since, the 503 error will come up almost the same second the Photon Login console shows up. After a few minutes, you will see your VM's get settings taken from the vSphere appliance, as it should, which you will then see the classic Web Initializing message in your browser. Again, a good sign! If you login to the Photon Management application, you need to see "Good", not "Unknown". Once "Good" displays for all the statuses, you should start seeing the 404 error, and then eventually the web gui will work. If you continue to see 503 errors and good, after waiting 10 or 15 minutes, then something else is wrong...
It does seem indeed that this problem is related to network settings. Either bad hostname in /etc/hosts or some kind of issue with how IP's are being stored. I hope someone from VMware sees this and decides to dig in, as it is very frustrating to fix. You need good Linux development (not just admin skills) to debug this kind of issue. That's not something most VMware admins will have.
HTH