Web Adaptor cannot find Portal after successful configuration

4005
8
07-12-2017 11:31 AM
BrianWilson
Occasional Contributor II

Working at command line Linux with ArcGIS Enterprise 10.5.1, I just configured Web Adaptor using configurewebadaptor.sh and now the web adaptor arcgis/home page shows

Could not access any Portal machines. Please contact your system administrator.

Checking catalina.out log file shows this error repeatedly:

Jul 12, 2017 6:23:42 PM com.esri.arcgis.server.wa.cluster.UpdatePortalCacheTask updateMachinesList
WARNING: Exception in connecting to http://PORTAL.ARCGIS.NET:7080/arcgis/portaladmin Error in Portal Admin request for get machinesError in admin request for get machines PORTAL.ARCGIS.NET

The command I use to configure looks like this:

./configurewebadaptor.sh -m portal -u ${USER} -p ${PASS} -w https://web-adaptor.arcgis.net/arcgis/webadaptor -g https://portal.arcgis.net:7443

and in completes with the message "Successfully Registered." (Of course USER and PASS are defined elsewhere)

Note that the names for both web-adaptor and portal resolve correctly, and that from my desktop I can browse to the portal directly using the URL in the error message and when I click on Machines I see this:

 

Home  >  MachinesAPI Reference

Portal Health Check for PORTAL.ARCGIS.NET

Health Check successful, the portal is ready

In fact I use curl in a script before running configurewebadaptor.sh to make sure that both web-adaptor and portal are available on the URL's that I pass in.

I will try to write a test script to access the API from the web-adaptor machine to see what result that gives.

8 Replies
JonathanQuinn
Esri Frequent Contributor

The first thing that I can think of is that there's something that it doesn't like in regards to the hostnames.  I'm spinning up a few VMs that I'll name 'portal.arcgis.net' and 'web-adaptor.arcgis.net' and see if I see the same thing.  Perhaps it's a parsing issue given the product names and 'arcgis' is in the hostname?

0 Kudos
BrianWilson
Occasional Contributor II

I refuse to believe it's the names, no programmer would ever do that to me. :) I've already thought of making the names less generic though, and since I want to be able to spin up multiple instances to test load balancing and HA I should probably add suffixes... server1, server2, portal1, portal2 etc... that comes later though.

0 Kudos
JonathanQuinn
Esri Frequent Contributor

Well, I can't say it never happens:

Problem configuring Data Store 

There have been a few other instances where host names have caused problems as well.

0 Kudos
BrianWilson
Occasional Contributor II

This is not really about getting things going at my own site it's about getting a docker set up designed that works for anyone.

If I set the "hostname" on the Dockers to "portal.arcgis.net" and "web-adaptor.arcgis.net" instead of just the names "portal" and "web-adaptor" AND I create an entry in DNS that matches the Docker bridge network then I can get it to work. This is just a hack since it requires looking up internal network IP addresses and putting them in my LAN DNS (outside of docker)

I am still learning about the wrinkles of Docker networking and DNS resolution. There is a "hostname" option when you start docker and there is also a "network-alias" option. If I use "network-alias" the hostname is not change but docker machines can see each other with those names.

For example, I can set the portal container to have the alias "portal" and then all the other containers can see it as "portal" without any other config.. except for ESRI.. for example I can use curl from web-adaptor and it can reach both "https://portal:7443" and "https://portal.arcgise.net:7443/" but apparently Portal and WebAdaptor refuse to use Docker's internal resolver and jump out to the outside DNS I specify for resolving names outside.

If I specify a simple name for hostname like "portal" (which is normal) then the ESRI software will go all the way through the config set up and then when it launches it REALLY REALLY wants to see a complete domain name and fails.

EVENTUALLY I will get it sorted, for now I am working around it by making the hostnames have a full domain name in them. This has the ugly side effect it turns out of making Web Adaptor fail when it's behind a reverse proxy, something new to sort out. But next I have to get PostgreSQL working as the database so all this naming stuff is on the back burner for a day or two.

0 Kudos
JonathanQuinn
Esri Frequent Contributor

Ah, OK.  I'll admit I'm not sure about how Docker works so I can't comment too much on that.  I would imagine that if you can use curl to validate the web adaptor machine can reach the portal URL, then it should be good to go.  Not suggesting this is a long term solution, but it'd be interesting to add an entry in the /etc/hosts file on the WA machine to associate the IP address of the portal machine to it's portal.arcgis.net.  If that works, then it's definitely something network related, which you've already diagnosed.

0 Kudos
BrianWilson
Occasional Contributor II

Well, I've restarted this Docker project using 10.6 and I hit exactly the same roadbump here. Since I still don't really understand what Web Adaptor does for me I am going to ignore it for now and push on. It's slowing me down.

From what I can tell it seems like Web Adaptor just a proxy. So maybe I just don't need it for my tiny testing set up. If I need a proxy I can avoid this proprietary and balky component and use something that I can configure directly like nginx.

Update: after getting DataStore going, it tells me to connect it to Portal. When I try, Portal says "Federation of servers is disabled when accessing the portal without using the web adaptor." and that's it. Blocked again.

Thanks for your suggestions.

0 Kudos
JonCrain
New Contributor II

I'm having a similar issue.  I'm getting this message in my catalina.out:

01-Aug-2017 14:27:21.418 WARNING [Timer-2] com.esri.arcgis.server.wa.cluster.UpdatePortalCacheTask.updateMachinesList Exception in connecting to http://MY.INTERNAL.COM:7080/arcgis/portaladmin JSONObject["machines"] not found.

I had no issues configuring data store with server, and my server is federated and a hosting server for portal.  I'm even able to log in, and upload feature services at MY.INTERNAL.COM:7443.  However, when I try to use our external URL I can't even log in to Portal or to /arcgis/sharing/rest with our admin credentials.  The first one just kicks me back to the home screen every time and the second one gives me the following message:

Your login session has been reset. Please try again.


Error: 404

Interestingly enough, I can log into /arcgis/portaladmin successfully from our external url.

0 Kudos
JesseJosserand
New Contributor III

I know this is an old thread, but I'm having the same problem now on 10.6.1.

In catalina.out, I'm getting multiple occurrences of...

09-Sep-2020 10:05:59.710 WARNING [Timer-18] com.esri.arcgis.server.wa.cluster.UpdatePortalCacheTask.updateMachinesList Exception in connecting to [URL Redacted for Security]:7080/arcgis/portaladmin Error in Portal Admin request for get machinesError in admin request for get machines Connection refused (Connection refused)

...however, the portal URL works just fine and authentication, as well.

I'm on Centos7.8, tomcat 8.5.57 and JRE jre1.8.0_261-amd64.

I'm not sure if there's any real impact since it's just a warning, but I remain concerned.

Please help.

0 Kudos