0

I am trying to bring two process up in a windows Nanoserver container using supervisord (pip install supervisor-win )

Everything is setup in supervisord.conf, while starting it I am facing below issue,

C:\data>supervisord -n
C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\options.py:480: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (inc
luding its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  self.warnings.warn(
Traceback (most recent call last):
  File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\loggers.py", line 220, in _disable_inheritance_filehandler
    import win32api
 oduleNotFoundError: No module named 'win32api'
D
 uring handling of the above exception, another exception occurred:
T
 raceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\python-3.11.1-embed-amd64\Scripts\supervisord.exe\__main__.py", line 7, in <module>
  File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\supervisord.py", line 403, in main
    go(options)
  File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\supervisord.py", line 415, in go
    d.main()
  File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\supervisord.py", line 77, in main
    self.options.make_logger()
  File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\options.py", line 1221, in make_logger
    loggers.handle_file(
  File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\loggers.py", line 444, in handle_file
    handler = RotatingFileHandler(filename, 'a', maxbytes, backups)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\loggers.py", line 211, in __init__
    self._disable_inheritance_filehandler()  # fix file used by others process
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\loggers.py", line 223, in _disable_inheritance_filehandler
    raise ImportWarning("log rotation requires the installation of the \"pywin32\" library.\n"
ImportWarning: log rotation requires the installation of the "pywin32" library.
Download and install from https://github.com/mhammond/pywin32/releases

C:\data>

pywin32 module is already installed (tried reinstall with whl and pip anyway, that did not help)

C:\data>python -m pip show pywin32
Name: pywin32
Version: 305
Summary: Python for Window Extensions
Home-page: https://github.com/mhammond/pywin32
Author: Mark Hammond (et al)
Author-email: mhammond@skippinet.com.au
License: PSF
Location: C:\python-3.11.1-embed-amd64\Lib\site-packages
Requires:
Required-by: pypiwin32, supervisor-win

C:\data>

What could be the issue here? I see less dll files (around 400 only) in C:\Windows\System32 compared to servercore/server image (This is working fine with windows servercore image.)

Ganesh Shinde
  • 65
  • 2
  • 7

0 Answers0