Transactional Replication – Failed to connect to Azure Storage ” with OS error: 55.

-> Transactional Replication is configured between 2 managed instances.

-> More details on how to configure transactional replication between 2 managed instance can be understood from this article.

-> Snapshot agent fails with below error,

Failed to connect to Azure Storage '' with OS error: 55.

Connecting to Azure Files Storage '\\jbmirepldata.file.core.windows.net/jbmirepldata'

Obtained Azure Storage Connection String for jbmirepldata

Connecting to Distributor 'JBMI-PUBLISHER.37B2CA9FEE0A.DATABASE.WINDOWS.NET'

Initializing
Date		8/13/2020 7:16:09 PM
Log		Job History (JBMI-PUBLISHER.37B2CA9FEE0A.-JBREPL_Sub-TranProducts-1)

Step ID		2
Server		JBMI-PUBLISHER.37B2CA9FEE0A.DATABASE.WINDOWS.NET
Job Name		JBMI-PUBLISHER.37B2CA9FEE0A.-JBREPL_Sub-TranProducts-1
Step Name		Run agent.
Duration		00:00:02
Sql Severity	0
Sql Message ID	0
Operator Emailed	
Operator Net sent	
Operator Paged	
Retries Attempted	0

Message
2020-08-13 13:46:09.98 Microsoft (R) SQL Server Snapshot Agent
2020-08-13 13:46:09.98 [Assembly Version = 15.0.0.0, File Version = 15.0.2000.1929]
2020-08-13 13:46:09.98 Copyright (c) 2016 Microsoft Corporation.
2020-08-13 13:46:09.98 The timestamps prepended to the output lines are expressed in terms of UTC time.
2020-08-13 13:46:09.98 User-specified agent parameter values:
2020-08-13 13:46:09.98 --------------------------------------
2020-08-13 13:46:09.98 -Publisher JBMI-PUBLISHER.37B2CA9FEE0A.DATABASE.WINDOWS.NET
2020-08-13 13:46:09.98 -PublisherDB JBREPL_Sub
2020-08-13 13:46:09.98 -Publication TranProducts
2020-08-13 13:46:09.98 -Distributor JBMI-PUBLISHER.37B2CA9FEE0A.DATABASE.WINDOWS.NET
2020-08-13 13:46:09.98 -DistributorSecurityMode 1
2020-08-13 13:46:09.98 -XJOBID 0x82079C6C631CFB438ABF0DC5E99DC328
2020-08-13 13:46:09.98 -XDB 
2020-08-13 13:46:09.98 -XHOST np:\\.\pipe\DB4C.0-A9190D899828\sql\query
2020-08-13 13:46:09.98 --------------------------------------
2020-08-13 13:46:09.99 Connecting to Distributor pipe 'np:\\.\pipe\DB4C.0-A9190D899828\sql\query'
2020-08-13 13:46:10.09 Connecting to Distributor 'JBMI-PUBLISHER.37B2CA9FEE0A.DATABASE.WINDOWS.NET'
2020-08-13 13:46:10.27 Parameter values obtained from agent profile:
2020-08-13 13:46:10.27 ---------------------------------------------
2020-08-13 13:46:10.27 -BcpBatchSize 100000
2020-08-13 13:46:10.27 -HistoryVerboseLevel 2
2020-08-13 13:46:10.27 -LoginTimeout 15
2020-08-13 13:46:10.27 -QueryTimeout 1800
2020-08-13 13:46:10.27 ---------------------------------------------
2020-08-13 13:46:10.27 Validating Publisher
2020-08-13 13:46:10.29 Obtained Azure Storage Connection String for jbmirepldata
2020-08-13 13:46:10.29 Connecting to Azure Files Storage '\\jbmirepldata.file.core.windows.net/jbmirepldata'
2020-08-13 13:46:10.30 Failed to connect to Azure Storage '' with OS error: 55.

-> The main error is as below,

2020-08-13 13:46:10.29 Connecting to Azure Files Storage ‘\\jbmirepldata.file.core.windows.net/jbmirepldata
2020-08-13 13:46:10.30 Failed to connect to Azure Storage ” with OS error: 55.

-> If you look at the path closely, we are able to see a “/” instead of “\” and this is causing the issue.

-> Execute below code on the Distributor to correct the REPLDATA or Working Directory to correct value “\jbmirepldata.file.core.windows.net\jbmirepldata”

exec sp_changedistpublisher @publisher = 'jbmi-publisher.37b2ca9fee0a.database.windows.net', @property = N'Working_Directory', @value = N'\\jbmirepldata.file.core.windows.net\jbmirepldata' 	 

-> Snapshot agent will complete fine this time.

Thank You,
Vivek Janakiraman

Disclaimer:
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s