How copy map service from one ArcGIS server Machine to another ArcGIS server Machine

04-01-2019 07:31 AM
New Contributor III

Please I would like to know if there is a new and easier way to achieve the transfer of map services from one ArcGIS server machine to another ArcGIS server machine. I have over 400 map services to transfer.

Some two years back I was able to achieve this using the discomap.ServiceTransferTool that i found on this forum and the transfer was made from Version 10.4 to 10.5. Now we upgraded to a full ArGIS Enterprise environment  10.6.2 (ArcGIS Server, Portal for ArcGIS and Datastore) unfortunately the tool has failed and every effort have proved abortive. I keep getting this "No JSON object could be decoded" error. I am not good with JSON and I couldn't figure out what it is that is generating this errort.

I would really appreciate helps and contributions from anyone here.


Please see attached screenshots of the tool and the error I got when executed.

** Service 'Irene//CIP_Project.MapServer' information read successfully. Now transfering... (5 steps)
pathInitial line 653: E:\arcgisserver\directories\arcgissystem\arcgisinput\Irene\CIP_Project.MapServer\extracted\v101\CIP_Project.msdpathInitial line 655: E$\arcgisserver\directories\arcgissystem\arcgisinput\Irene\CIP_Project.MapServer\extracted\v101\CIP_Project.msdpathInitial line 657: \\Hamiltonpool\E$\arcgisserver\directories\arcgissystem\arcgisinput\Irene\CIP_Project.MapServer\extracted\v101\ msdPath line 659: \\Hamiltonpool\E$\arcgisserver\directories\arcgissystem\arcgisinput\Irene\CIP_Project.MapServer\extracted\v101\ simpleServiceName line 668:

CIP_Project finalServiceName line 672:

Failed script TransferServices...

Traceback (most recent call last):
File "Y:\TOOLS\Server Tools\discomap.ServiceTransferTool-master\", line 1280, in <module>
transferMapServices(fromServerName, fromServerPort, fromAdminUser, fromAdminPass, serviceList, toServerName, toServerPort, toAdminUser, toAdminPass, serviceType, workspace, newFolder, overwrite, workFolder)
File "Y:\TOOLS\Server Tools\discomap.ServiceTransferTool-master\", line 621, in transferMapServices
serviceExists = isServicePresent(toServerName, str(toServerPort), toAdminUser, toAdminPass, simpleServiceName, folderName, "")
File "Y:\TOOLS\Server Tools\discomap.ServiceTransferTool-master\", line 101, in isServicePresent
token = gentoken(server, port, adminUser, adminPass)
File "Y:\TOOLS\Server Tools\discomap.ServiceTransferTool-master\", line 26, in gentoken
token = json.loads(urllib.urlopen(url + "?f=json", query_string).read())
File "C:\Python27\ArcGIS10.5\Lib\", line 89, in urlopen return, data)
File "C:\Python27\ArcGIS10.5\Lib\", line 215, in open return getattr(self, name)(url, data)
File "C:\Python27\ArcGIS10.5\Lib\", line 350, in open_http h.endheaders(data)
File "C:\Python27\ArcGIS10.5\Lib\", line 1038, in endheaders self._send_output(message_body)
File "C:\Python27\ArcGIS10.5\Lib\", line 882, in _send_output self.send(msg)
File "C:\Python27\ArcGIS10.5\Lib\", line 844, in send self.connect()
File "C:\Python27\ArcGIS10.5\Lib\", line 821, in connect self.timeout, self.source_address)
File "C:\Python27\ArcGIS10.5\Lib\", line 557, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): 
IOError: [Errno socket error] [Errno 11001] getaddrinfo failed

Failed to execute (TransferServices).
Failed at Mon Apr 01 09:08:16 2019 (Elapsed Time: 1.84 seconds)

0 Kudos
2 Replies
Esri Notable Contributor

The error IOError: [Errno socket error] [Errno 11001] getaddrinfo failed means whatever hostname you're entering can't be found from the machine you're running the tool on. The ""No JSON object could be decoded" error is likely because the getaddrinfo error is sending back a None type object, (or at least something that isn't convertable to JSON), and when the script tries to convert to a JSON object, it fails.

New Contributor III

Hi Jonathan,

I have been able to resolve the socket error issue by simply getting my IT department to change the port of the server from port 6443 to port 6080.

Now I am able to push the map services and folders over to the new server but unfortunately, it now comes up with another error of not able to publish the service due to errors found during the analysis. (it does not specify what exactly the error is) 

Please can you think of what could be the problem here.

Your contribution will be highly appreciated.

Please see error below.

Start Time: Tue Apr 30 09:41:50 2019
ERROR 999999: Error executing function.
Unidentified Error
Failed to execute (UploadServiceDefinition).
Failed at Tue Apr 30 09:41:50 2019 (Elapsed Time: 0.02 seconds)
Failed to publish.
** Service 'CWPP//FlamMap_Input_Fuel.MapServer' published successfully.
0 Kudos