sharepointsharepoint-2016sharepointadmin

Microsoft SharePoint Foundation Subscription Settings Service Application stuck on "Starting"


Creating "Microsoft SharePoint Foundation Subscription Service" in SharePoint 2016 Server by using Power-shell command but it stuck at below line and not responding.

 $ServiceApplication = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $AppPoolName –Name $ServiceAppName –DatabaseName $DatabaseName –DatabaseServer $DatabaseServer

When we check the status of Services in Central Admin > Manager Services its showing status "Starting".

While status showing as "Starting" we can see the Database is already created in DB server. we are using SharePoint 2016 and want to create Apps for SharePoint. Next step is to configure App Management Service Application. Not sure if App Management and Subscription Services are depending on each other.

enter image description here


Solution

  • Can you try to delete the existing service application and create using below Powershell Script

    In this please provide $accountName in the variable and share me the results

    Powershell

    ===========================

    $serviceTypeName = "Microsoft SharePoint Foundation Subscription Settings Service"
    $accountName = "Account Name in the Format domain\user"
    $appPool = "subs_pool"
    $serviceName = "Subscription Settings Service"
    $serviceDB = "Subscription_Settings_Service"
    
    $service = Get-SPServiceInstance | where { $_.TypeName -eq $serviceTypeName }
    Start-SPServiceInstance $service
    
    Write-Host "Service instance started."
    
    # Gets the name of the managed account and sets it to the variable $account for later use.
    $account = Get-SPManagedAccount $accountName
    
    $appPoolSubSvc = Get-SPServiceApplicationPool $appPool
    
    if ($appPoolSubSvc -eq $null)
    {
        # Creates an application pool for the Subscription Settings service application.
        # Uses a managed account as the security account for the application pool.
        # Stores the application pool as a variable for later use.
        $appPoolSubSvc = New-SPServiceApplicationPool -Name $appPool -Account $account
    }
    
    Write-Host "Have the application pool..."
    
    # Creates the Subscription Settings service application, using the variable to associate it with the application pool that was created earlier.
    # Stores the new service application as a variable for later use.
    $appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name $serviceName –DatabaseName $serviceDB
    
    Write-Host "Service application created..."
    
    # Creates a proxy for the Subscription Settings service application.
    $proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $appSubSvc
    
    Write-Host "Service application proxy created..."
    
    Write-Host -ForegroundColor green "Done."