Pages

Wednesday, 7 March 2012

Change SharePoint central admin port number


In my current environment we had 2 wfe’s in our environment with wfe and app server roles clubbed together on it during the pilot phase. As a part of SharePoint infrastructure migration to a production environment and a new logical design we added 2 new app servesr and segregated the roles on i.e. wfe  and app server roles inthe new environment.

The requirement was host to central administration from app server and somehow the port was changed automatically while doing so. And it didn’t allow us to re-run product configuration wizard as the ports were different.

Got this error: Failed to register SharePoint services.  An exception of type System.UriFormatException was thrown.  Additional exception information: Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed.
System.UriFormatException: Invalid URI: A port was expected because of there is a colon (':') present but the port could not be parsed.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at System.Uri.CreateUri(Uri baseUri, String relativeUri, Boolean dontEscape)
   at Microsoft.SharePoint.Administration.SPSiteCollection.get_Item(String strSiteName)
   at Microsoft.SharePoint.Administration.SPAdministrationWebApplication.get_HealthRules()
   at Microsoft.SharePoint.Administration.Health.SPHealthAnalyzer.RegisterRules(Assembly assembly)
   at Microsoft.Office.InfoPath.Server.Util.HealthAnalyzerRegistration.RegisterHealthRules()
   at Microsoft.Office.InfoPath.Server.Administration.FormsService.Update()
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServiceInConfigDB(Boolean provisionTheServiceToo, String serviceRegistryKeyName)
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServices(Boolean provisionTheServicesToo)
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.Run()
   at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

Run the following PowerShell command and reran product config wizard and it meet the need.

Set-SPCentralAdministration -Port <port number>

Example: Set-SPCentralAdministration -Port 2222

Note:

The Set-SPCentralAdministration cmdlet blocks the following ports:
Lower than 1023
Higher than 32767
443 (SSL)

3 comments: