Cannot create Store service : An error occurred running the command: 'Install-DSStoreService2'

Cannot create Store service : An error occurred running the command: 'Install-DSStoreService2'

book

Article ID: CTX228134

calendar_today

Updated On:

Description

  • You might receive an error: An error occurred running the command: 'Install-DSStoreService2' when creating a new Store.
  • Citrix Subscription store service fails to start intermittently. 

Environment

The above mentioned sample code is provided to you as is with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the sample code. In no event should the code be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the code belongs to Citrix, any distribution of the sample code should include only your own standard copyright attribution, and not that of Citrix. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the sample code.

Resolution



1. Manually backup below configuration and subscription database directories 
- C:\Program Files\Citrix\Receiver StoreFront\Services\SubscriptionsStoreService\Citrix.DeliveryServices.SubscriptionsStore.ServiceHost.exe.config
- C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Citrix\SubscriptionsStore\

*For privacy reasons , the configuration details are taken from a lab setup where store name which was deleted is Citrix_test
2. Remove below two sections regarding "1__Citrix_test" from Citrix.DeliveryServices.SubscriptionsStore.ServiceHost.exe.config and save file.

<add name="1__Citrix_test" enabled="true" order="100">
<endpoint uri="net.pipe://localhost/Citrix/Subscriptions/1__Citrix_test"
transferMode="Streamed">
<authentication mode="windows">
<serverCertificate thumbprint="0" />
</authentication>
<authorization>
<roles>
<add name="accessSubscriptionStore" windowsGroup="CitrixSubscriptionsStoreServiceUsers"
windowsGroupSid="" />
</roles>
</authorization>
</endpoint>
</add>



<add name="1__Citrix_test" location="%APPDATA%\Citrix\SubscriptionsStore\1__Citrix_test"
flush="00:15:00">
<replication replicate="true" delayStart="00:00:05" periodicSync="02:00:00">
<endpoint uri="net.p2p://Citrix-Subscriptions-1__Citrix_test">
<authentication mode="certificate">
<serverCertificate thumbprint="3F7D899E7C7DF6BCF0AAA405BC99528155CFC498"
storeName="Citrix Delivery Services" storeLocation="LocalMachine" />
<thumbprints>
<add name="SubscriptionsStore" thumbprint="3F7D899E7C7DF6BCF0AAA405BC99528155CFC498" />
</thumbprints>
</authentication>
</endpoint>
<resolver mode="Custom">
<clientEndpoint uri="net.pipe://localhost/Citrix/PeerResolverService"
authenticationMode="windows">
<clientCertificate thumbprint="0" />
</clientEndpoint>
</resolver>
</replication>
</add>


3. Stop Citrix subscription store service
4. Delete subscription store folder "1__Citrix_test" from C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Citrix\SubscriptionsStore
5. Start Citrix subscription store service

 

Problem Cause

Store names created earlier and deleted are still having cached information in subscription store and configuration files : 
C:\Program Files\Citrix\Receiver StoreFront\Services\SubscriptionsStoreService\Citrix.DeliveryServices.SubscriptionsStore.ServiceHost.exe.config