Unable to start UPS due to Event 6398 on SP2013

This happened on a fresh install of SharePoint 2013 on a Win 2012 server, without any CU’s applied. When I started the User Profile Service Application it hung and just when into “Stopped” mode.
Checked the Event Viewer and found this error, Event 6398:
โ€œThe Execute method of job definition Microsoft.Office.Server.UserProfiles.LMTRepopulationJob (ID 84821b32-cf9f-45ff-801b-bb25b69faa6f) threw an exception. More information is included below.

Unexpected exception in FeedCacheService.IsRepopulationNeeded: Connection to the server terminated,check if the cache host(s) is running .โ€

And
โ€œThe Execute method of job definition Microsoft.Office.Server.UserProfiles.LMTRepopulationJob (ID 84821b32-cf9f-45ff-801b-bb25b69faa6f) threw an exception. More information is included below.

Unexpected exception in FeedCacheService.IsRepopulationNeeded: Cache cluster is down, restart the cache cluster and Retry.โ€

 

Googled on this and found this article:

Ran the following Powershell cmdlet:
Get-CacheHostConfig -ComputerName $env:computername -CachePort 22233
But got the following error, “No valid cluster settings found…”

 
According to the article I had to create a CacheCluster, by following the steps in this article from MSDN:

I ran the setup to install the Windows Server AppFabric caching features, but got an error (only extracts from the entire log file):

=====

2013-09-04 09:11:50, Information           Setup  Product:          Microsoft(R) Windows(R) Server AppFabric
2013-09-04 09:11:50, Information           Setup  ProductVersion:   1.1.2106.32
2013-09-04 09:11:50, Information           Setup  OS Name:                   Windows Server 2012

2013-09-04 09:11:50, Information           Setup  Event Registration Source :    AppFabric_Setup

2013-09-04 09:11:50, Error                 Setup  One or more of the specified features are already installed.

=====

So I reconsidered the situation and decided to just go in and stop the AppFabric Service instead and then try to launch the UPS. And that worked ๐Ÿ™‚ 
The Forefronte services now came up!

First I made an IISRESET, as that is always necessary after having launched the UPS.

And then I rebooted the server and see if the UPS still works when the AppFabric service gets started.
The AppFabric service was started and the UPS service was still started and I could add a new AD connection.
Now I will proceed and install the CU’s.

New setting for AD import

Use SharePoint Active Directory Import – User Profiles
Instead of using the default setting of synchronization of User Profiles, you can select the “Use SharePoint Active Directory Import” setting. Which is a lighter version and which only imports information from the AD. If you had a connection before, it is lost when you click on this setting.
First you need to create a new connection again. You will notice a good difference here: you can click on “Filter out disabled users”! Very good.

You can no longer click on “Edit connection filters”.

You cannot edit the User Properties, such as adding the thumbnailPhoto to the Picture property.

User profile synchronization error

The crawl log in Search Administration returned the following error:

sps3://xxx could not be crawled

What you must do is to set permissions to the search account that you use for crawling the User Profiles.

Select User Profile Services (do not click the link, but highlight the application)

Up in the ribbon, click a button called “Administrators”

Enter the account that you use for search

Add the permission “Retrieve people data for search crawlers”