Select to view content in your preferred language

Not able to find webgisdr command

1529
4
Jump to solution
05-19-2021 10:01 AM
UalasRohrer
Regular Contributor

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!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
UalasRohrer
Regular Contributor

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.

View solution in original post

0 Kudos
4 Replies
UalasRohrer
Regular Contributor

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?

0 Kudos
UalasRohrer
Regular Contributor

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.

0 Kudos
JonathanQuinn
Esri Notable Contributor

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.

UalasRohrer
Regular Contributor

Thank you, Jonathan. That helped too.

0 Kudos