# Failed to Initialize the Script Engine

**URL:** <https://discuss.rapid7.com/t/failed-to-initialize-the-script-engine/18476>\
**Category:** InsightVM\
**Tags:** InsightVM\
**Created:** [January 5, 2023, 1:15pm UTC](https://discuss.rapid7.com/t/failed-to-initialize-the-script-engine/18476 "2023-01-05T13:15:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@Joe](https://discuss.rapid7.com/u/Joe)\
**Post date:** [January 5, 2023, 1:15pm UTC](https://discuss.rapid7.com/t/failed-to-initialize-the-script-engine/18476/1 "2023-01-05T13:15:07Z")

</div>

Kindly assist with the nmap error below:

2023-01-05T11:08:28 [INFO] [Thread: Scan 5] [Site: Test] Nmap scan of 1 IP address starting.  
2023-01-05T11:08:29 [INFO] [Thread: Scan 5:nmap:stderr] [Site: Test] NMAP: ERROR: NSE: failed to initialize the script engine:  
2023-01-05T11:08:29 [INFO] [Thread: Scan 5:nmap:stderr] [Site: Test] NMAP: ERROR: C:\Program Files\rapid7\nexpose\nse\nmap/nse\_main.lua:822: ‘open-management-infrastructure-rce-vuln.nse’ did not match a category, filename, or directory  
2023-01-05T11:08:29 [INFO] [Thread: Scan 5:nmap:stderr] [Site: Test] NMAP: ERROR: stack traceback:  
2023-01-05T11:08:29 [INFO] [Thread: Scan 5:nmap:stderr] [Site: Test] NMAP: ERROR: [C]: in function ‘error’  
2023-01-05T11:08:29 [INFO] [Thread: Scan 5:nmap:stderr] [Site: Test] NMAP: ERROR: C:\Program Files\rapid7\nexpose\nse\nmap/nse\_main.lua:822: in local ‘get\_chosen\_scripts’  
2023-01-05T11:08:29 [INFO] [Thread: Scan 5:nmap:stderr] [Site: Test] NMAP: ERROR: C:\Program Files\rapid7\nexpose\nse\nmap/nse\_main.lua:1322: in main chunk  
2023-01-05T11:08:29 [INFO] [Thread: Scan 5:nmap:stderr] [Site: Test] NMAP: ERROR: [C]: in ?  
2023-01-05T11:08:29 [INFO] [Thread: Scan 5:nmap:stderr] [Site: Test] NMAP: ERROR:  
2023-01-05T11:08:29 [INFO] [Thread: Scan 5:nmap:stderr] [Site: Test] NMAP: ERROR: QUITTING!  
2023-01-05T11:08:29 [INFO] [Thread: Scan 5] [Site: Test] NMAP: PROCESS: EXIT VALUE: 1  
2023-01-05T11:08:29 [INFO] [Thread: Scan 5] [Site: Test] Scan failed: java.io.IOException: The Nmap exit value is not zero: 1  
at com.rapid7.nexpose.scan.nmap.Nmap.start(Unknown Source)  
at com.rapid7.nexpose.scan.nmap.Nmap.run(Unknown Source)  
at com.rapid7.nexpose.scan.Scan.start(Unknown Source)  
at com.rapid7.nexpose.scan.Scan.run(Unknown Source)  
at java.lang.Thread.run(Thread.java:750)

---

<div class="post-metadata">

**Author:** ![john\_hartman](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/john_hartman/32/1255_2.png) [@john\_hartman](https://discuss.rapid7.com/u/john_hartman)\
**Post date:** [January 5, 2023, 2:55pm UTC](https://discuss.rapid7.com/t/failed-to-initialize-the-script-engine/18476/2 "2023-01-05T14:55:22Z")

</div>

Couple of questions:

How long ago did you install your console?

Were you scanning with the local console engine or from a distributed scan engine?

---

<div class="post-metadata">

**Author:** ![motunes](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/m/76d3ee/32.png) [@motunes](https://discuss.rapid7.com/u/motunes)\
**Post date:** [January 6, 2023, 9:06am UTC](https://discuss.rapid7.com/t/failed-to-initialize-the-script-engine/18476/3 "2023-01-06T09:06:01Z")

</div>

I’m also having same issue. The console was Installed about a week ago. I can run discovery scan but Can’t run full audit without web spidering

---

<div class="post-metadata">

**Author:** ![john\_hartman](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/john_hartman/32/1255_2.png) [@john\_hartman](https://discuss.rapid7.com/u/john_hartman)\
**Post date:** [January 6, 2023, 2:09pm UTC](https://discuss.rapid7.com/t/failed-to-initialize-the-script-engine/18476/4 "2023-01-06T14:09:15Z")

</div>

Ok, that sounds like you probably have endpoint protection on that machine that blocked part of our install. Do you have something like Defender, Crowdstrike, etc installed on the console and active? If our Rapid7 directory isn’t whitelisted from those applications it is common that endpoint protection blocks part of the install leaving you with a corrupted install.

---

<div class="post-metadata">

**Author:** ![motunes](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/m/76d3ee/32.png) [@motunes](https://discuss.rapid7.com/u/motunes)\
**Post date:** [January 9, 2023, 5:21pm UTC](https://discuss.rapid7.com/t/failed-to-initialize-the-script-engine/18476/5 "2023-01-09T17:21:09Z")

</div>

Thank you, John.

---

<div class="post-metadata">

**Author:** ![jason\_mull](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/j/e5b9ba/32.png) [@jason\_mull](https://discuss.rapid7.com/u/jason_mull)\
**Post date:** [January 9, 2023, 6:08pm UTC](https://discuss.rapid7.com/t/failed-to-initialize-the-script-engine/18476/6 "2023-01-09T18:08:45Z")

</div>

I ran into a very similar issue recently on a scan engine that has been in production for 9 months. It looks like Windows Defender started quarantining these files starting in December.

---

<div class="post-metadata">

**Author:** ![john\_hartman](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/john_hartman/32/1255_2.png) [@john\_hartman](https://discuss.rapid7.com/u/john_hartman)\
**Post date:** [January 9, 2023, 7:24pm UTC](https://discuss.rapid7.com/t/failed-to-initialize-the-script-engine/18476/7 "2023-01-09T19:24:44Z")

</div>

It’s very possibly due to a content update that we did where some new vulnerability checks started hitting some Defender rules OR Defender started adding in some alerts that fired on our engines behavior. Same scenario though is that our products should be whitelisted. So on the assets themselves our Rapid7 directory should be whitelisted from Endpoint protection tools as well as our machine as a whole should be whitelisted from IDS/IPS tools.

---

<div class="post-metadata">

**Author:** ![matt\_8](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@matt\_8](https://discuss.rapid7.com/u/matt_8)\
**Post date:** [January 11, 2023, 6:29pm UTC](https://discuss.rapid7.com/t/failed-to-initialize-the-script-engine/18476/8 "2023-01-11T18:29:39Z")

</div>

Wanted to add - ran into this with a new Windows installation this week - it was indeed Windows Defender blocking some python scripts in the Nexpose directory. This was resolved by restoring the quarantined files and whitelisting the Nexpose program files directory.
