Select to view content in your preferred language

ArcGIS Monitor 2023 - ArcSOCOptimizer

1076
9
04-06-2023 11:11 AM
Fabio_Pires
Emerging Contributor

I'm getting error when try to use ArcSOCOptimizer 2023:

Traceback (most recent call last):
File "AGMAdminUtility.py", line 8, in main
builder.Builder()
File "Modules\Builder\builder.py", line 89, in __init__
arcsocObject=arcsoc_optimizer_build.Arcsoc_optimizer_build(self.config, self.url, self.token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Modules\Builder\arcsoc_optimizer_build.py", line 11, in __init__
self.execute=self._execute()
^^^^^^^^^^^^^^^
File "Modules\Builder\arcsoc_optimizer_build.py", line 18, in _execute
list_obj=list_mode.List_mode(self._config, self._url, self._token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Modules\ArcSOCOptimizer\list_mode.py", line 14, in __init__
self.ags_server_obj=ags_server.Ags_server(config, url, token, self._utc, self._utc_now)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Modules\ArcSOCOptimizer\ags_server.py", line 15, in __init__
self._set_stats()
File "Modules\ArcSOCOptimizer\ags_server.py", line 24, in _set_stats
attributes=response["features"][0]["attributes"]
~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

0 Kudos
9 Replies
AndrewSakowicz
Esri Contributor
Thank you for reporting this.  It is a known issue and it is fixes in 2023.1.  
Fabio_Pires
Emerging Contributor

I did a new installation of Monitor 2023.1 and I got a new error:

05/11/2023 07:47:08 PM ERROR: 'system_state'
05/11/2023 07:47:08 PM ERROR: None
Traceback (most recent call last):
File "AGMAdminUtility.py", line 8, in main
builder.Builder()
File "Modules\Builder\builder.py", line 89, in __init__
arcsocObject=arcsoc_optimizer_build.Arcsoc_optimizer_build(self.config, self.url, self.token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Modules\Builder\arcsoc_optimizer_build.py", line 11, in __init__
self.execute=self._execute()
^^^^^^^^^^^^^^^
File "Modules\Builder\arcsoc_optimizer_build.py", line 18, in _execute
list_obj=list_mode.List_mode(self._config, self._url, self._token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Modules\ArcSOCOptimizer\list_mode.py", line 14, in __init__
self.ags_server_obj=ags_server.Ags_server(config, url, token, self._utc, self._utc_now)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Modules\ArcSOCOptimizer\ags_server.py", line 15, in __init__
self._set_stats()
File "Modules\ArcSOCOptimizer\ags_server.py", line 34, in _set_stats
self.machines_started=self._machines_started(machines)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Modules\ArcSOCOptimizer\ags_server.py", line 43, in _machines_started
if m["system_state"]=="started":
~^^^^^^^^^^^^^^^^
KeyError: 'system_state'

Someone can help me, I have a costumer trying Monitor and he needs to use ArcSOCOptimizer.

0 Kudos
AndrewSakowicz
Esri Contributor

@Fabio_Pires This issue is fixed and uploaded. Please download the latest.  Note, this is a sample code and not part of the product.

Fabio_Pires
Emerging Contributor

Hi Andrew, first off all, thanks for your help.

I downloaded the latest version but I got the following error when I tried to install ArcSOCOptimizer:
AGMAdminUtility.exe -f sampleConfig.json -o ArcSOCOptimizer

05/18/2023 01:51:23 PM INFO: observer run {"success":true}
05/18/2023 01:51:24 PM ERROR: list index out of range
05/18/2023 01:51:24 PM ERROR: None
Traceback (most recent call last):
File "AGMAdminUtility.py", line 8, in main
builder.Builder()
File "Modules\Builder\builder.py", line 89, in __init__
arcsocObject=arcsoc_optimizer_build.Arcsoc_optimizer_build(self.config, self.url, self.token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Modules\Builder\arcsoc_optimizer_build.py", line 11, in __init__
self.execute=self._execute()
^^^^^^^^^^^^^^^
File "Modules\Builder\arcsoc_optimizer_build.py", line 18, in _execute
list_obj=list_mode.List_mode(self._config, self._url, self._token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Modules\ArcSOCOptimizer\list_mode.py", line 17, in __init__
self.list_view = self._list_view()
^^^^^^^^^^^^^^^^^
File "Modules\ArcSOCOptimizer\list_mode.py", line 24, in _list_view
self._host.set_stats(self._utc, self._utc_now)
File "Modules\ArcSOCOptimizer\host.py", line 15, in set_stats
host_id=self._host_id_from_address(host_address)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Modules\ArcSOCOptimizer\host.py", line 41, in _host_id_from_address
return response["features"][0]["attributes"]["id"]
~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

0 Kudos
AndrewSakowicz
Esri Contributor

please ensure these host addresses are exactly as registered in monitor.  We can validate it, if can share redacted screenshots of ArcGIS Monitor registered hosts and the below config? 

AndrewSakowicz_0-1684433187353.png

 

Fabio_Pires
Emerging Contributor

Hi Andrew,

The host_address parameter should be an IP or DNS?
Has to be a Monitor server or ArcGIS Server (hosting server)?

0 Kudos
AndrewSakowicz
Esri Contributor

This parameters needs to have a list of all the arcgis server machines (separated by comma), with the names exactly as registered in ArcGIS Monitor.  Please go to Monitoring>Components and copy it. 

AndrewSakowicz_1-1684507279213.png

 

 

Fabio_Pires
Emerging Contributor

Hi Andrew, thanks for your help.

I think that I found where was my mistake.

1 - I was trying to register Linux Host and I saw in code that has a parameter called windows_strategy, usado na funcao query_by_address como "host_windows_strategy"

2 - The name of Windows host is validate with the name setup at server and return that name. I was using lowercase in sampleConfig.json and the name registered at server is uppercase, so the program didn`t find the host, because in code its look for the exact name in Monitor's resouces.

It generated a new questions:
1 - ArcSOCOptimizer only works for Windows Hosts??
2 - In this version is there anyway to get a report??

0 Kudos
AndrewSakowicz
Esri Contributor

I should have updates shortly.  It will not be part of admin utility, but a separate arcsocoptimizer utility.  I'll have a blog on this today.

0 Kudos