ArcSOC Optimizer's Task fails with a "Page not found!" and a Python error

884
6
Jump to solution
10-09-2018 06:40 AM
PeterLee3
New Contributor III

ArcSOC Optimizer (Sept 20th update)
ArcGIS Monitor (10.6.1)

I made an Optimizer task using the same URL's and credentials as an existing ArcGIS counter.

Hitting "Test" results in:

Traceback (most recent call last): File "ArcSOCOptimizer.py", line 11, in main File "Modules\Outputs\ReportBuilder.py", line 15, in __init__ File "Modules\Outputs\OutputBuilder.py", line 10, in __init__ File "Modules\Inputs\InputBuilder.py", line 19, in __init__ File "Modules\SMCounters\View.py", line 4, in __init__ File "Modules\SMCounters\View.py", line 10, in __GetArcGISView File "Modules\pysm\SmClient.py", line 93, in __view_find File "Modules\pysm\base.py", line 99, in find_views TypeError: Can't convert 'NoneType' object to str implicitly Traceback (most recent call last): File "ArcSOCOptimizer.py", line 11, in main File "Modules\Outputs\ReportBuilder.py", line 15, in __init__ File "Modules\Outputs\OutputBuilder.py", line 10, in __init__ File "Modules\Inputs\InputBuilder.py", line 19, in __init__ File "Modules\SMCounters\View.py", line 4, in __init__ File "Modules\SMCounters\View.py", line 10, in __GetArcGISView File "Modules\pysm\SmClient.py", line 93, in __view_find File "Modules\pysm\base.py", line 99, in find_views TypeError: Can't convert 'NoneType' object to str implicitly

Attempts to fix:

a) I searched the filesystem for ArcSOCOptimizer.py but did not find it.

b) python was not installed, so I installed version 2.7.15 64 bit, ensured %path% included python.exe and rebooted.

c) I ran a copy of C:\ArcGIS Monitor\Administrator\resources\app\bin\ArcSOC Optimizer\test.bat, modifying the parameters to match our credentials and urls. Running the script from cmd.exe yields an extra error: "Page not found!", after which the above quoted error occurs: the JSON object must be str, not 'NoneType'

d) I tried using a copy of the 1 day config instead of the 30 days config.

The above error continues to happen.

What do you suggest?

Thanks!

-Pete

0 Kudos
1 Solution

Accepted Solutions
AndrewSakowicz
Esri Contributor

It appears you might be providing incorrect credentials. Please follow documentation section 4. You'd need to provide both ArcGIS Monitor Site and ArcGIS Server credentials.

View solution in original post

6 Replies
AndrewSakowicz
Esri Contributor

It appears you might be providing incorrect credentials. Please follow documentation section 4. You'd need to provide both ArcGIS Monitor Site and ArcGIS Server credentials.

José_MiguelGuijarro_Ayala
New Contributor

Hello Andrew,

I'm trying to setup a task with this add-on (Feb 11, 2019 update) in Monitor 10.6.1 and I'm getting same error:

Traceback (most recent call last): File "ArcSOCOptimizer.py", line 11, in main File "Modules\Outputs\ReportBuilder.py", line 15, in __init__ File "Modules\Outputs\OutputBuilder.py", line 11, in __init__ File "Modules\Inputs\InputBuilder.py", line 20, in __init__ File "Modules\SMCounters\View.py", line 4, in __init__ File "Modules\SMCounters\View.py", line 10, in __GetArcGISView File "Modules\pysm\SmClient.py", line 94, in __view_find File "Modules\pysm\base.py", line 100, in find_views TypeError: Can't convert 'NoneType' object to str implicitly Traceback (most recent call last): File "ArcSOCOptimizer.py", line 11, in main File "Modules\Outputs\ReportBuilder.py", line 15, in __init__ File "Modules\Outputs\OutputBuilder.py", line 11, in __init__ File "Modules\Inputs\InputBuilder.py", line 20, in __init__ File "Modules\SMCounters\View.py", line 4, in __init__ File "Modules\SMCounters\View.py", line 10, in __GetArcGISView File "Modules\pysm\SmClient.py", line 94, in __view_find File "Modules\pysm\base.py", line 100, in find_views TypeError: Can't convert 'NoneType' object to str implicitly

- I made sure I was using correct credentials; I tried with "Site" user and also a new user created with Admin privileges. - - ArcGIS (global) user is also correct and it works in other 'ArcGIS' counters.

- User running Monitor service is Local System, and all Enterprise is deployed in same machine.

Any other idea of what can be causing this issue?

Thanks,

Jose Miguel

0 Kudos
JohnGraham2
Occasional Contributor

Hi Jose,

This error is expected when there's not enough data yet for the ArcSOC optimizer to process. When using the config1day.json as your config file, there should be at least 1 full day of data already collected for the target ArcGIS site in ArcGIS Monitor. Try the task again tomorrow.

Best Regards,

John

PeterLee3
New Contributor III

Andrew, 

That must have been it, it works now! Thanks.

Just to play with it, I tried changing the credentials to use an incorrect password, and the same error resulted.

Then I tried changing the permissions of the user to "None" and a different error occurred:

Error: Program executed, but failed to parse return (Not valid JSON): Please check if you have print statements in your program. All output should be in one line and be the last print out. Please remove all items except the expected return values.

Then I re-granted Admin permissions and re-entered the password and it works!

Much appreciated ^^

-Pete

0 Kudos
AshleySeim1
New Contributor

Hi Pete - did you do these actions on the Site administrator login or the ArcGIS Server administrator login?  Where were you granting admin privileges?  I only see a need to grant permissions to users of ArcGIS Monitor not accounts for counters and extensions.  I.e., I am getting the same error and looking to replicate your steps.  Which account and where did you 're-grant admin permissions'?

Thank you.

0 Kudos
PeterLee3
New Contributor III

Hi Ashley,

I was referring to the Monitor user.

  1. Run ArcGIS Monitor Administrator.
  2. Open the Monitor connection.
  3. In the explorer tree on the left, click the root node.
  4. In the menu bar you will see: File, Info, Users. Click Users.
  5. If you haven't already, click "+ Add New User", and create a new user and password.
  6. In the explorer tree on the left, click the 1st child node.
  7. In the menu bar you will see: File, Collection, Notifications, Permissions. Click Permissions.
  8. The newly created user from step #5 will be listed. Its permissions role will initially be "None". Change it to "Admin".
  9. Now go to your Optimizer task.
  10. For the field: "ArcGIS Monitor Credentials", select that user you created from Step #5.

-Pete

0 Kudos