Hello, I've been having an issue while trying to execute webgisdr. I am not able to find the correct command to run it. I've been using this documentation: https://enterprise.arcgis.com/en/portal/latest/administer/linux/create-web-gis-backup.htm
arcgis@ip-172-31-30-16:/arcgis/portal/tools/webgisdr$ ./webgisdr --export --file /arcgis/portal/tools/webgisdr/exportgisdr.properties
bash: ./webgisdr: No such file or directory
arcgis@ip-172-31-30-16:/arcgis/portal/tools/webgisdr$ ./webgisdr.sh --export --file /arcgis/portal/tools/webgisdr/exportgisdr.properties
./webgisdr.sh: 5: [: x: unexpected operator
./webgisdr.sh: 29: ./webgisdr.sh: /bin/java: not found
arcgis@ip-172-31-30-16:/arcgis/portal/tools/webgisdr$ cd ..
arcgis@ip-172-31-30-16:/arcgis/portal/tools$ ./webgisdr --export --file /arcgis/portal/tools/webgisdr/exportgisdr.properties
bash: ./webgisdr: Is a directory
arcgis@ip-172-31-30-16:/arcgis/portal/tools$ webgisdr --export --file /arcgis/portal/tools/webgisdr/exportgisdr.properties
webgisdr: command not found
arcgis@ip-172-31-30-16:/arcgis/portal/tools$ cd webgisdr/
arcgis@ip-172-31-30-16:/arcgis/portal/tools/webgisdr$ webgisdr --export --file /arcgis/portal/tools/webgisdr/exportgisdr.properties
webgisdr: command not found
arcgis@ip-172-31-30-16:/arcgis/portal/tools/webgisdr$ webgisdr.sh --export --file /arcgis/portal/tools/webgisdr/exportgisdr.properties
webgisdr.sh: command not found
arcgis@ip-172-31-30-16:/arcgis/portal/tools/webgisdr$ nano webgisdr.sh
arcgis@ip-172-31-30-16:/arcgis/portal/tools/webgisdr$ ./webgisdr.sh --export --file /arcgis/portal/tools/webgisdr/exportgisdr.properties
./webgisdr.sh: 5: [: x: unexpected operator
./webgisdr.sh: 29: ./webgisdr.sh: /bin/java: not found
Thank you!
Solved! Go to Solution.
It looks like ArcGIS Enterprise 10.8 Cloud Builder for AWS doesn't set environmental variables for Java and JRE. All I did to fix that was to set $JAVA_HOME and the issue was fixed.
I have just realized that $java_home is returning blank, that's why the webgisdr is returning /bin/java: not found.
This ArcGIS Enterprise was installed with Cloud Builder for AWS and I have checked another stack that I have deployed using the tool and it also has the $java_home blank.
How can fix this issue?
It looks like ArcGIS Enterprise 10.8 Cloud Builder for AWS doesn't set environmental variables for Java and JRE. All I did to fix that was to set $JAVA_HOME and the issue was fixed.
FYI there's no need to explicitly set the JAVA_HOME environment variable. The issue is more related to:
./webgisdr.sh: 5: [: x: unexpected operator
which is specific to differences between sh/bash:
https://stackoverflow.com/questions/3411048/unexpected-operator-in-shell-programming/3411061
We made some changes to use a single equal sign, which should fix it without setting JAVA_HOME.
Thank you, Jonathan. That helped too.