Python geoprocessing service Code: 00231 Layer's data source must be registered with the server

732
9
10-05-2023 01:48 PM
RyanUthoff
Occasional Contributor III

I am having issues with a Python geoprocessing tool I created. It works perfectly fine when running it within ArcGIS Pro. However, when I publish the geoprocessing service to server, it doesn't work when I run it in an app. I get the following error message:

ERROR 001272: Analyzer errors were encountered ([{"code":"00231","message":"Layer's data source must be registered with the server","object":"DB and table name here"}]). Failed to execute (StageService).

I'm not sure why I am getting this error message. The DB is registered with the server and I do not receive that error message when running the tool locally through ArcGIS Pro. There are no DB versions and only one account, so there shouldn't be any reason for me to have to register the DB again. It's using the same SDE connection and everything.

Anyone have any ideas why I'm getting this message?

0 Kudos
9 Replies
BlakeTerhune
MVP Regular Contributor

I noticed that if the connection properties are slightly different, it thinks it's a new source. Double check that the connection properties in the two sde connections are identical. In my case, with an sde connection to Oracle, one of the connections had .world at the end of the db instance name and the other did not.

0 Kudos
RyanUthoff
Occasional Contributor III

Thank you! That's what I was thinking, but both the script and the ArcGIS Pro project are referencing the same SDE file on a network file share. So I don't think that would be the problem. I have no idea why it would be thinking it isn't registered. I even manually registered the SDE connection through Server Manager. Still doesn't work for some reason.

0 Kudos
MichaelVolz
Esteemed Contributor

Did you register the sde connection with a mapped network drive or unc path?  I think it has to be a unc path.

0 Kudos
RyanUthoff
Occasional Contributor III

Thank you for your comment. I've registered everything as UNC paths. The registered SDE connection, the SDE connection used in the Pro project, and the SDE connection referenced in the Python script are all referencing the same SDE connection using the UNC file path. And it just doesn't seem to like that for some reason.

0 Kudos
MichaelVolz
Esteemed Contributor

Does the account running the ArcGIS Server geopeocessing service have permissions to access the network share?

Can you try logging into a computer with that account and see if you can navigate to the network share in file explorer?

0 Kudos
RyanUthoff
Occasional Contributor III

Thank you for your reply! Yep, the account running ArcGIS Server has permissions to the network file share. It's running as an AD account and has full permissions. I can RDP into the server itself as the account running the ArcGIS Server service and can manually run the geoprocessing tool in ArcGIS Pro and navigate to the network share.

0 Kudos
mody_buchbinder
Occasional Contributor III

Hi Ryan

First is the sde connection uses db authentication or os authentication? If it is os then the owner of the server must have access to the database.

Second, the best way to solve it is to run Analysis before publish. This should give you the error, then you right click on the error and it will open a form to register the data source  with all the correct paramaters.

Later you can try to compare the new registration created with the old ones to find the difference.

Have fun

0 Kudos
RyanUthoff
Occasional Contributor III

Thank you for your reply! The SDE connection file is using DB authentication. 

I have already done your second suggestion though. I originally published the feature service using the GUI in ArcGIS Pro. That's where I ran the analysis, registered the SDE connection with the server, etc. I then have my python scrip geoprocessing tool where I overwrite the feature service. It works perfectly fine in ArcGIS Pro, but when I publish the geoprocessing tool to server and run it, that's where it is saying I need to register the SDE connection, even though it is already registered.

0 Kudos
MichaelVolz
Esteemed Contributor

What version of enterprise are you running?

Can you provide a screenshot of the SDE connection screen with sensitive info commented out?

0 Kudos