Published Map Service doesn't contain all my layers

3517
5
03-20-2014 08:35 PM
JohnGardner
New Contributor III
As the title suggests my successfully published map service doesn't contain all the layers displayed in the source mxd. We are using the 10.1 suite, service packs 1. The mxd contain doesn't return any errors upon validation.
Contains upwards of 200 layers, 10 layers publish the rest don't (which hasn't been an issue for other services). Each layer is to a SQL View.

Feel free to ask for more details.

Thanks for helping in advance.

John
Tags (2)
0 Kudos
5 Replies
JonathanQuinn
Esri Notable Contributor
Are all views coming from data in the same database?  Are there any errors in the ArcGIS Server logs?
0 Kudos
JohnGardner
New Contributor III
Are all views coming from data in the same database?  Are there any errors in the ArcGIS Server logs?


All views are coming from the same database.
No errors found in ArcGIS Server logs.

Sometimes the services doen't publish at all and the following error is displayed:

'Error 001269: Compressing the service definition failed.'
0 Kudos
WilliamCraft
MVP Regular Contributor
Is the MXD or SD open in ArcMap?  The error in the screenshot you provided happens when something is accessing the source document supporting the map service.  Make sure you or some other process is not accessing files in the folder containing the service definition or map document. 

Source: http://resources.arcgis.com/en/help/main/10.1/index.html#//00vp0000002r001269

If you're certain the service definition or MXD is not open, then there might be a system lock on those files.  If you're using Windows, from the Start menu (or from 'Run' or a CMD prompt) type fsmgmt.msc to open the Shared Folders dialog box.  Click on Open Files at the bottom of the list on the left, then check to see if your map service files are in there.  If they are, right click on them and select Close Open File.  Try re-publishing your service to see if the error goes away.

Regarding the issue of missing layers, you mentioned that your layers are referencing SQL Server views.  Are you referring to spatial views that persist in the database?  In other words, a database view which is a join between a stand-alone table and a feature class.  From an ArcGIS Desktop standpoint, the spatial view would 'look and feel' just like a feature class. 

One question I have has to do with security: are your data source connections in the map document using database authentication or operating system authentication?  Another question is are you using a domain account or a local account to run your ArcGIS for Server service in the Windows Services dialog box?  The main reason for these two questions has to do with access; I wonder if the account running the service needs to be added to your SQL Server instance and database as a login and user, respectively.  What's confusing to me is why only 10 of the 200 'layers' work.  It could either be permissions or there could be a difference between those 10 layers and the other 190 in terms of the data sources (perhaps those are XY event layers or query layers or some other kind of layer).  We need to isolate the difference between those 10 layers that work and the 190 that don't. 

In either case (database auth or OS auth), the user account in the connection properties of each layer would need to have permissions to see those views.  You're certain that your database user account has access to those views?  The answer to this is likely 'yes', but I'm just covering our bases here.
0 Kudos
JohnGardner
New Contributor III
Crafty762, Thanks for your input. I've annotated a response inside the quote in red.

Is the MXD or SD open in ArcMap?   The MXD is not in use be anyone else. The error in the screenshot you provided happens when something is accessing the source document supporting the map service. Make sure you or some other process is not accessing files in the folder containing the service definition or map document.  

Source:   http://resources.arcgis.com/en/help/...0000002r001269  

If you're certain the service definition or MXD is not open, then there might be a system lock on those files. If you're using Windows, from the Start menu (or from 'Run' or a CMD prompt) type fsmgmt.msc to open the Shared Folders dialog box. Click on Open Files at the bottom of the list on the left, then check to see if your map service files are in there. If they are, right click on them and select Close Open File. Try re-publishing your service to see if the error goes away.   My network is locked down and I cannot use fsmgmt.msc, however as a work-around I recreated the MXD to be sure, and have experienced the same issues.

Regarding the issue of missing layers, you mentioned that your layers are referencing SQL Server views. Are you referring to spatial views that persist in the database? In other words, a database view which is a join between a stand-alone table and a feature class. From an ArcGIS Desktop standpoint, the spatial view would 'look and feel' just like a feature class.   These views were created outside of ArcGIS Desktop.
One question I have has to do with security: are your data source connections in the map document using database authentication or operating system authentication?   Database authentication. Another question is are you using a domain account or a local account to run your ArcGIS for Server service in the Windows Services dialog box?   Server is running on a local account with the same credentials as a domain account, the database resides in the domain and the local account has access (our Dev environment cannot access our data basemap repository with exists in a different domain, hence the different accounts). The main reason for these two questions has to do with access; I wonder if the account running the service needs to be added to your SQL Server instance and database as a login and user, respectively. What's confusing to me is why only 10 of the 200 'layers' work. It could either be permissions or there could be a difference between those 10 layers and the other 190 in terms of the data sources (perhaps those are XY event layers or query layers or some other kind of layer). We need to isolate the difference between those 10 layers that work and the 190 that don't.   Itâ??s worth noting that the MXD references 2 views from the database. Different queries have been applied against the view to generate a different layer. The 10 layers that publish are using both views and have the same query, apart from a change in a type text string.

In either case (database auth or OS auth), the user account in the connection properties of each layer would need to have permissions to see those views. You're certain that your database user account has access to those views? The answer to this is likely 'yes', but I'm just covering our bases here.   I understand why you ask, I would ask the same, I can assure you it has access.


As an update to my issue I have found an error in the server logs attributed to this service. It displays: â??Method failed.HRESULT = 0x80070057 : The parameter is incorrectâ??
0 Kudos
JohnGardner
New Contributor III
I have been able to successfully publish the service after installing ArcGIS for Desktop the on server.

The obvious differences:

  1. The server has more memory (12GB over 3GB),

  2. Server has both Python x64 & x86 installed.

As this isn't a fix I'll continue exploring the issue.
0 Kudos