Log4Shell Mitigation Script - python version no longer recognized?

494
6
Jump to solution
12-27-2021 06:51 AM
Kara_Shindle
Occasional Contributor III

So I tried to run the Log4Shell Mitigation Script for ArcGIS Server on the 20th.  I ran this in cmd as Administrator.  The script ran until it got to the -delete and I then got two error messages.

The first was cmd error saying "access is denied"

The second was a windows pop-up saying" This app can't run on your PC."

 

Now, my scripts using the python path:

[Drive]\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3\python.exe

I have two scheduled tasks that use this python.exe directly and both no longer work.

"could not find a usable Python Installation at the specified path. " and It gives me a bunch of stuff on the x32 & x64 bit.  This server was spun up by ESRI Jumpstart in February of 2021 and I have the appropriate versions.  

 

Why is this python.exe no longer recognizable after I had the Apache4Shell Mitigation script fail?  Everything failed directly after I tried running the mitigation script.

Edit: 

I did run in cmd as Admin

I stopped the license manager and the ArcGIS Services before running the script.

 

0 Kudos
1 Solution

Accepted Solutions
Kara_Shindle
Occasional Contributor III

Ok - so it looks like the python.exe application was gone after I ran this script - the .exe showed a file size of 0 and didn't have the python icon anymore.  I have a development server created at the same time using the same files and Powershell script, and I ended up copying the python.exe from that server onto this one.  Worked...  Not a great solution and I still have no idea why this happened.  

View solution in original post

0 Kudos
6 Replies
BillFox
MVP Frequent Contributor

was that run in unix under su -?

0 Kudos
Kara_Shindle
Occasional Contributor III

no.

0 Kudos
BillFox
MVP Frequent Contributor

Can you try to download the latest version from the official website : https://www.python.org/downloads/ and see if your scheduled tasks work again?

or, do you have a vm snapshot to revert to?

0 Kudos
Kara_Shindle
Occasional Contributor III

I have slight concerns about doing upgrading the Python version, especially when I read articles like this.

I was just curious if this had happened to anyone else?

 

 

0 Kudos
Kara_Shindle
Occasional Contributor III

Ok - so it looks like the python.exe application was gone after I ran this script - the .exe showed a file size of 0 and didn't have the python icon anymore.  I have a development server created at the same time using the same files and Powershell script, and I ended up copying the python.exe from that server onto this one.  Worked...  Not a great solution and I still have no idea why this happened.  

0 Kudos
BenjaminBlackshear
New Contributor III

Hi Kara,

I encountered this same issue, thank you for providing your resolution, that worked for me as well, but this seems pretty concerning. Can anyone from ESRI replicate this or comment on it?

0 Kudos