AlirezaDehlaghi / ICSSIM

This is the ICSSIM source code and user manual for simulating industrial control system testbed for cybersecurity experiments
https://alirezadehlaghi.github.io/ICSSIM/
MIT License
63 stars 13 forks source link

Docker Exited due to missing log files #1

Closed FHatCSW closed 2 years ago

FHatCSW commented 2 years ago

After successfully running deployment/init.sh, I get an error message for all containers that the log files cannot be found. Here exemplary for the attacker.

Traceback (most recent call last):
  File "/src/Attacker.py", line 128, in <module>
    attacker = Attacker()
  File "/src/Attacker.py", line 18, in __init__
    Runnable.__init__(self, 'Attacker', 100)
  File "/src/ics_sim/Device.py", line 84, in __init__
    self._initialize_logger()
  File "/src/ics_sim/Device.py", line 91, in _initialize_logger
    self._logger = self.setup_logger(
  File "/src/ics_sim/Device.py", line 112, in setup_logger
    handler = logging.FileHandler(file_path, mode=write_mode)
  File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open
    return open_func(self.baseFilename, self.mode,
FileNotFoundError: [Errno 2] No such file or directory: '/src/logs/logs-Attacker.log'

System Info System Version: macOS 13.0 (22A380) Kernel Version: Darwin 22.1.0 Docker version 20.10.20, build 9fdeb9c

FHatCSW commented 2 years ago

After manually adding the folder + files it seems to work

AlirezaDehlaghi commented 2 years ago

Yes, in some version this bug exists. You did right. Let me know if you had further questions.