After creating a new portal instance in a multi-hosting configuration, the Company that is created sometimes does not contain the accountId of the Account that was created.
This causes a stack trace
com.liferay.portal.NoSuchAccountException: No Account exists with the primary key 0
at org.apache.jsp.html.portlet.admin.edit_005finstance_jsp._jspService(edit_005finstance_jsp.java from :901)
This has been reproduced in 6.0.5 as well as 6.1.0B4 (I was hoping this was fixed, so I tried upgrading).
I don't know the cause, yet,
We have also seen that there are now Contacts that have an accountId of 0 as well. These appear to be for the "default" user for the given Company.
We have confirmed that setting the accountId on the Company table and the accountId on the Contact table to the appropriate Account gets the instance working again.