I have Print and Map Services on the same physical server and a web application (developed using ArcGIS Javascript 3.x API) also deployed on the same server. Web application consumed both print and map services. When a Print Task request is sent to the server using LiveIP, at that moment Print Task created JSON. This JSON has Map service with LocalIP because now the request is on the server and it needs to use Map service so Map service should have LocalIP in JSON. Previously it was working fine but suddenly, the print task stopped accessing map services from the local IP.
For testing, I tried to access map services from another live server, map services were accessible and the print task did print.
The problem is, how can I access map services using local IP instead of LiveIP
I'm interested in knowing why you need to use local ip address?
Dear TanuHoque,
Thanks for your interest.
Actually, Print task and Map Services are on the same physical server. The print task (through JSON) is not able to get map services from the same server whereas map services are accessible through another live server. Previously it was working with LocalIP that's why I was looking solution with LocalIP.
At this moment I can rephrase the problem that how can I access map services through Print Task at the same physical server. it can be through LocalIP or LiveIP.
@MamoonRasheed, I think Tanu was asking why you want to use an IP address in your workflow.
@Noah-Sager, can you correct the workflow to get solution of said problem?
Thanking you in advance.
@Noah-Sager, using IP address to access map services through PrintTask is not mandatory. The problem is to get a print of the operational layers through the map service. If you can suggest any changes I will be grateful to you.
Whereas I tested PrintTask services in the following ways.
1- https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer (Successful)
2- https://localhost:6443/arcgis/rest/services/<servicesName>/MapServer/1 (UnSuccessful)
3- https://LocalIPAddress:6443/arcgis/rest/services/<servicesName>/MapServer/1 (UnSuccessful)
4- https://<LiveIPAddress>:6443/arcgis/rest/services/<servicesName>/MapServer/1 (UnSuccessful)
5- https://<DomainName>:6443/arcgis/rest/services/<servicesName>/MapServer/1 (UnSuccessful)
In all above mentioned cases log shows the following error message
Error executing tool. Export Web Map
Failed to create layer from service at <complete service path>
Correction: In all above mentioned unsuccessful cases log shows the following error message
Thanks @MamoonRasheed @Noah-Sager
the reason https://<LiveIPAddress>:6443 doesn't work is because most likely you don't have valid certificate. As you know, a valid certificate is needed for any https:// protocol, otherwise client app (like web browser or Pro) will ask you as a user to accept that invalid certificate. In case of print service, the job simply fails.
I'd recommend you install ArcGIS Web Adaptor, configure that to you server and have a valid certificate install. After that the url of your services will look something like https://<machine_name>.<domain_name>.com/arcgis/rest/services .... and use this new urls in your web app; that should resolve this issue for you as that is the right thing to do... and you don't need to worry about using local-host or local-ip-address.
hope this helps
Tanu
SSL certificate is valid up to November, 2024 and configured through domain name instead of IP. So map services are accessible through the domain name URLs when directly accessing through the web browser with a valid certificate message in the browser (See Attachment SSLCertificateDetail.png). However, the problem is map services are not accessible through PrintTask. Moreover, map services are secure and a Token is also passed in "Web Map as JSON" (PrintTask JSON). (See Attachment JSON-1.png and JSON-2.png).
You can see in the attached images that for testing purposes I am trying to get print from the printTask without using our custom web application but no luck so far. Once I get print directly from the PrintTask most probably it will work through a custom web application.
Moreover, according to my understanding, ArcGIS Web Adaptor is not mandatory for using the PrintTask in ArcGIS Server. The PrintTask is a server-side task that allows you to generate print layouts and export them as images, PDFs, or other formats. It is part of the ArcGIS Server REST API. whereas, ArcGIS Web Adaptor, on the other hand, is a separate component used for integrating ArcGIS Server with your existing web server infrastructure. It helps improve security and provides a convenient way to use your organization's web infrastructure for hosting the ArcGIS Server services. Please correct me if I am wrong.
Can you let me where I can get ArcGIS Adaptor?
Regards,
Thanks for clarifying. Sorry that I wrongfully assumed you didn't have valid certificate for your :6443 port. You are right about other things you mentioned about web adaptor.
Can you pls do me a favor?