WebAdaptor configuration on Linux/Tomcat9

3003
2
Jump to solution
08-20-2021 11:11 AM
NFlourish
Occasional Contributor

The 10.9 web adaptor on Linux is giving me trouble.

I have a machine with Ubuntu 20.04, per the requirements.

I tried initially with Tomcat 9.0.31. Ran into these issues, so I manually reinstalled Tomcat 9.0.19 per the requirements.

I have the Tomcat server configured to use ports 80 and 443 instead of the default. The certificate/SSL setup is valid and working.

The "arcgis.war" file deploys to Tomcat just fine. No error.

No matter what I've tried, the Web Adaptor only gives me this web page ... (no, the URL is not secret)

Screen Shot 2021-08-20 at 13.04.23.pngI have tried to use the CLI (on the same machine as Tomcat) to configure it:

./configurewebadaptor.sh -m server -w http://geodata109-www.stone-env.net/arcgis/webadaptor -g https://geodata109-ags.stone-env.net:6443 -u Nope -p HaHaNope -a false

But this results in the error "Unable to connect to WebAdaptor URL : https://geodata109-www.stone-env.net/arcgis/webadaptor"

I've tried just using "localhost" in all of my configuration instead, but that has resulted in the same issue. It seems that while the adaptor is deployed and accessible, it is missing some key "something" and there is really nothing in the documentation that clarifies what is missing.

The only error in the Catalina log is this: "20-Aug-2021 18:07:25.628 SEVERE [https-openssl-apr-443-exec-22] com.esri.arcgis.server.wa.servlet.WebAdaptorConfigServlet.service null"

I get a warning which does seem relevant, but I see no documentation anywhere about this file: "20-Aug-2021 18:09:59.269 WARNING [https-openssl-apr-443-exec-30] com.esri.arcgis.server.wa.data.Config.initialize Unable to load web_adaptor.properties configuration file"

 

So friends ... any ideas?

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
NFlourish
Occasional Contributor

Ok I figured it out!

 

The fix was buried in replies to a similar problem and the key is in that "warning" about the web_adaptor.properties configuration file.

 

If you install Tomcat via a package manager such as I had on Ubuntu, it sets up Tomcat for you and creates the Tomcat user, and puts config files in smart places... does lots of useful things. Makes the Tomcat user a service account that has no login, and no home folder.

That's the problem. The Tomcat user needs a home folder.

And just as importantly, the Tomcat user needs that home folder to exist and be writeable before you run the ArcGIS WebAdaptor "Setup" tool. The Setup tool drops a properties file (confusingly _not_ named web_adaptor.properties despite the error message) into the Tomcat user's home folder. After Setup runs, and you then deploy your WAR file, the error I had shown in this post was replaced by the proper WebAdaptor config screen.

If you do not know how to make the home folder it is pretty easy. Assuming you are either logged in as root, or just put a 'sudo' in front of these...

  1. mkdir /home/tomcat
  2. chown -R tomcat:tomcat /home/tomcat
  3. vipw
    1. find the tomcat user line in the passwd file, and replace the home folder location with /home/tomcat, and the login shell can be changed to /bin/bash, at least temporarily.
    2. After Setup has run you can change the shell back to /bin/false or whatever it was before.

View solution in original post

2 Replies
NFlourish
Occasional Contributor

Ok I figured it out!

 

The fix was buried in replies to a similar problem and the key is in that "warning" about the web_adaptor.properties configuration file.

 

If you install Tomcat via a package manager such as I had on Ubuntu, it sets up Tomcat for you and creates the Tomcat user, and puts config files in smart places... does lots of useful things. Makes the Tomcat user a service account that has no login, and no home folder.

That's the problem. The Tomcat user needs a home folder.

And just as importantly, the Tomcat user needs that home folder to exist and be writeable before you run the ArcGIS WebAdaptor "Setup" tool. The Setup tool drops a properties file (confusingly _not_ named web_adaptor.properties despite the error message) into the Tomcat user's home folder. After Setup runs, and you then deploy your WAR file, the error I had shown in this post was replaced by the proper WebAdaptor config screen.

If you do not know how to make the home folder it is pretty easy. Assuming you are either logged in as root, or just put a 'sudo' in front of these...

  1. mkdir /home/tomcat
  2. chown -R tomcat:tomcat /home/tomcat
  3. vipw
    1. find the tomcat user line in the passwd file, and replace the home folder location with /home/tomcat, and the login shell can be changed to /bin/bash, at least temporarily.
    2. After Setup has run you can change the shell back to /bin/false or whatever it was before.
JoshMcDougall
New Contributor

After 2 days of searching this finally did the job on my 10.9.1 webadapter install - thanks NFlourish. My tomcat already had a home directory so i'm assuming it was the 'chown' part that fixed the configure issue (i changed /home/tomcat to match my existing home dir)

0 Kudos