I'm trying to publish a webtool to a federated server in Enterprise. It keeps failing with "Failed to create the map service definition during staging". However, it Analyzes with no errors or warnings. (It also fails if put on the Hosting server).
LAFI_Tools 35 WebTool GBP Wyoming Portal 2026-02-19 16:48:47 Status: InProgress StatusMessage: Consolidate data
LAFI_Tools 35 WebTool GBP Wyoming Portal 2026-02-19 16:48:49 Status: InProgress StatusMessage: Staging GP service
LAFI_Tools 35 WebTool GBP Wyoming Portal 2026-02-19 16:49:29 Status: Failed ErrorMessage: Consolidation failed
LAFI_Tools 35 WebTool GBP Wyoming Portal 2026-02-19 16:49:31 Status: InProgress StatusMessage: Failed to create the map service definition during staging.
LAFI_Tools 35 WebTool GBP Wyoming Portal 2026-02-19 16:49:31 Status: Failed ErrorMessage: ERROR 004017: Failed to create the map service definition during staging.
LAFI_Tools 35 WebTool GBP Wyoming Portal 2026-02-19 16:49:31 Status: Failed ErrorMessage: Failed to execute (StageService).
LAFI_Tools 35 WebTool GBP Wyoming Portal 2026-02-19 16:49:33 Status: Failed ErrorMessage: Staging failed
Here's the thing: I'm not asking for a map service?? Why is it trying to make one?
I have "URL Data: Convert feature layer" unchecked


I've narrowed it down to a set of variables that point to several services. Some are hosted, some are federated. The only data that this tool points to are these services. Nothing on a local geodatabase, or via file path to an eGDB connection.
''' Variables'''
inspectbl = (r".../services/Hosted/service_9a4388c5911f40e292c27ffc7fc47f17/FeatureServer/0")
locattbl = (r".../services/Hosted/service_9a4388c5911f40e292c27ffc7fc47f17/FeatureServer/1")
aliquot = (r".../services/WYSO_Mobile/.../FeatureServer/3")
section = (r".../services/WYSO_Mobile/.../FeatureServer/1")
twnship = (r".../services/WYSO_Mobile/.../FeatureServer/0")
admu = (r".../services/admin_boundaries/.../MapServer/3")
If I comment these out, it publishes fine. Of course, that means that I can't use the tool because I commented out these variables and can't uncomment them. once they're up there.
I thought it might be a problem that I was pointing to services on a different server, so I tried publishing with the hosted services commented out, and it still broke.
A colleague suggested just popping these into a JSON file, plugging that in as a parameter, and then parsing it, but that seems like an unnecessary step?
How do I get around this?
Thanks everyone.