Select to view content in your preferred language

Not able to use published Network service in ArcGIS Pro

320
5
Jump to solution
09-27-2024 05:24 PM
Stella-MarisA
Occasional Contributor

I published a network service to the portal and configured the service to be used in the utility tool specifically the Route. In map viewer I can use the directions tool to get directions and I can see its coming from the service published. The issue is when I go to Arc Pro to view this service to use in a network analysis the options are greyed out. I can select my portal to act as the data source but the options to choose the type of analysis such as Service area are all greyed out including the route type of Analysis that I had published when publishing the service. I can understand the rest being greyed out since I did not configure them but the route analysis layer is equally greyed out. Any suggestions on things to try? I did publish the route layer analysis when I was publishing the service. The end goal would be to use the URL in an application for routing purposes. I also need suggestions to do this. I have to share this URL from the portal somehow so that it can be accessed by an outside application for routing purposes.  Thanks 

0 Kudos
1 Solution

Accepted Solutions
MaxZeng
Esri Contributor

Hey Stella, when ArcGIS Pro uses portal for network analyst, it reads the asynchronous routing helper services from the portal (geoprocessing services). Directions widget uses synchronous routing helper services.

To publish both synchronous and asynchronous routing services, you can follow this documentation, https://enterprise.arcgis.com/en/server/latest/publish-services/windows/publish-routing-services.htm. Depending on your Enterprise version, you could use Configure routing services UI if you have Enterprise 11 or later, or publish routing services utility tool if your Enterprise is before Enterprise 11. Pro would work once this is done. 

 

Regarding your question about URL:

The end goal would be to use the URL in an application for routing purposes. I also need suggestions to do this. I have to share this URL from the portal somehow so that it can be accessed by an outside application for routing purposes.  Thanks 

 

Once your published routing services, you should decide whether to use the Direct request (synchronous) or Job request (asynchronous), https://developers.arcgis.com/rest/services-reference/enterprise/an-overview-of-routing-services/#re...

 

And then from your app you can call to your routing services using the corresponding url. The rest API documentation includes how to generate token and pass to the url to use the service. 

 

For example:

https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#token (for synchronous route service)

https://developers.arcgis.com/rest/services-reference/enterprise/route-async-services/#token (for asynchronous route service)

 

Let me know if anything isn't clear.

View solution in original post

5 Replies
MaxZeng
Esri Contributor

Hey Stella, when ArcGIS Pro uses portal for network analyst, it reads the asynchronous routing helper services from the portal (geoprocessing services). Directions widget uses synchronous routing helper services.

To publish both synchronous and asynchronous routing services, you can follow this documentation, https://enterprise.arcgis.com/en/server/latest/publish-services/windows/publish-routing-services.htm. Depending on your Enterprise version, you could use Configure routing services UI if you have Enterprise 11 or later, or publish routing services utility tool if your Enterprise is before Enterprise 11. Pro would work once this is done. 

 

Regarding your question about URL:

The end goal would be to use the URL in an application for routing purposes. I also need suggestions to do this. I have to share this URL from the portal somehow so that it can be accessed by an outside application for routing purposes.  Thanks 

 

Once your published routing services, you should decide whether to use the Direct request (synchronous) or Job request (asynchronous), https://developers.arcgis.com/rest/services-reference/enterprise/an-overview-of-routing-services/#re...

 

And then from your app you can call to your routing services using the corresponding url. The rest API documentation includes how to generate token and pass to the url to use the service. 

 

For example:

https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services/#token (for synchronous route service)

https://developers.arcgis.com/rest/services-reference/enterprise/route-async-services/#token (for asynchronous route service)

 

Let me know if anything isn't clear.

Stella-MarisA
Occasional Contributor

Thank you MaxZeng for replying and explaining how synchronous and asynchronous routing helper services work. I had only initially configured the synchronous one.

I'm stuck at the second part. I had registered the app on Portal and generated Client ID and Client Secret and a temporary token. When I try to call routing service from the browser using this temp token I get error on Web adaptor -Could not access any server machines. From Server log I get the error "Unable to process request, layer does not exist". I want to check the service is working. Also how do each user in the portal group(Different Organization) access this routing service URL. I'm very limited when it comes to programming so apologies if the questions have an obvious answer. I was thinking the users would be asked their user name and password to access the service. Also how can the temporary token expiry time be extended, it says 2 hours.

Thanks for all your help.

0 Kudos
Stella-MarisA
Occasional Contributor

Thanks @MaxZeng. The Links you provided pointed me in the right direction. I appreciate! One more question.

I tried to verify the URl access using the GET method : https://<root>/<serviceName>/GPServer/FindRoutes/submitJob

and I get the error couldn't resolve host make sure the domain is publicly available. Is this an access issue? Where can  check to make sure the service can be accessed

Stella-MarisA
Occasional Contributor

@MaxZengTesting the service URL (https://<your-server-domain>/arcgis/rest/services/<folder>/<serviceName>/NAServer/GPServer/FindRoute...)
I get the error in server manager as following "A request was made for service 'xyzxyzxyz.MapServer' but it did not have adequate credentials. Any suggestions. I did use a temporary token created from registering the app on the portal. Any suggestions on how to tackle this error

0 Kudos
MaxZeng
Esri Contributor

Hey Stella,

I have a few things I wanna clarify.

1. How are you publishing the service, using publish routing services utility? Did you change the sharing setting after publish? By default it is shared with the organization. You don't really need to change it but just want to see what set to.

2. Are you trying to access the NAServer service or the GPServer service? I think you mean the GPServer service, but the url in the last comment has NAServer in it and the message talks about MapServer. 

3. Can you give me some details of how you generate the token and how you are accessing the service? I think you publish the services and registered on one portal, and then created an app on the same portal, and then use the app id and app secret to generate a token. What call did you make to generate the token?

4. Following up on point three, do you then try to use the token to access the service? Where are you accessing the service from? Can the client you are trying to access the service from, talk with the server machine? 

0 Kudos