stratosphereips / StratosphereLinuxIPS

Slips, a free software behavioral Python intrusion prevention system (IDS/IPS) that uses machine learning to detect malicious behaviors in the network traffic. Stratosphere Laboratory, AIC, FEL, CVUT in Prague.
Other
714 stars 176 forks source link

Problem starting flowalerts's main as async function #1015

Closed AlyaGomaa closed 1 month ago

AlyaGomaa commented 1 month ago

Error:

2024/10/02 21:17:42.559090 [Flow Alerts] Problem in pre_main() line 53                                                                                                                                                                      
2024/10/02 21:17:42.561421 [Flow Alerts] Traceback (most recent call last):                                                                                                                                                                 
  File "/StratosphereLinuxIPS/slips_files/common/abstracts/async_module.py", line 53, in run                                                                                                                                                
    error: bool = self.run_async_function(self.run_main)                                                                                                                                                                                    
  File "/StratosphereLinuxIPS/slips_files/common/abstracts/async_module.py", line 28, in run_async_function                                                                                                                                 
    loop = asyncio.get_event_loop()                                                                                                                                                                                                         
  File "/usr/lib/python3.10/asyncio/events.py", line 656, in get_event_loop                                                                                                                                                                 
    raise RuntimeError('There is no current event loop in thread %r.'                                                                                                                                                                       
RuntimeError: There is no current event loop in thread 'MainThread'.   

cmd: ./slips.py -e 1 -f /data/Normal/CTU-Normal-42/Day3 -o output/Normal/CTU-Normal-42/Day3/8 -m -c config/generated_config_files/experiments_CTU-Normal-42.yaml