Recently I had worked on couple of an issues where User Profile Synchronization service wasn’t getting started. The issue was specific to one server. Even if we create new UPA then also User Profile Synchronization won’t get started. ULS logs don’t show any exceptions. They only show that the Profile Synchronization Setup Job runs and exits without any error and FIM synchronization service does never get started . After doing some research and testing some scenarios I figured it out that the User Profile Synchronization Service does not start in the following conditions
When the Profile Synchronization Setup timer job runs, it checks if it is the local machine by comparing the server name string with Environment.LocalMachine. The Environment.LocalMachine picks up the value from the registry. There is chance when you run command hostname from command prompt and run the below Power shell command you might see a difference also.
[System. Environment]::Machine Name
If the NetBIOS name of the machine and the SharePoint server name do not match, the setup is rejected and the User Profile synchronization service will quit without any errors. It is highly recommended to use the NetBIOS name of the server and avoid using FQDN (or IP address) as the server name while configuring a SharePoint farm.
That's cool.. Thanks for the heads up... :)