Publishing can fail when server-side data registered on the server cannot be located.
Data stores can map an on-premises data path to an on-server data path (for example, c:\data to \\machine1\data). As part of publishing, a service that references on-premises data (for example, c:\data\usa) will be changed to reference the server data (for example, \\machine1\data\usa). If the server data is not found, this error will be returned.
This error can also occur for data held in replicated enterprise geodatabases, where the server-side replica is missing tables or feature classes.
View the server log to identify the expected data location that couldn’t be found. This data needs to be copied from on-premises to the server.
Make sure that the ArcGIS Server account has the proper permissions to this directory.