Exa-Networks / exaproxy

Performant Content Modifying Non-Caching Proxy [stable - accepting patches for bug fixes only]
Other
145 stars 36 forks source link

Exaproxy does not create pid file #46

Open cyril-s opened 7 years ago

cyril-s commented 7 years ago

When exaproxy starts, it does not create pid file specified in exaproxy.daemon.pidfile and crashes with the following error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/exaproxy/lib/exaproxy/util/debug.py", line 71, in <module>
    execfile(sys.argv[0])
  File "/opt/exaproxy/lib/exaproxy/application.py", line 327, in <module>
    main()
  File "/opt/exaproxy/lib/exaproxy/application.py", line 297, in main
    Supervisor(configuration).run()
  File "/opt/exaproxy/lib/exaproxy/supervisor.py", line 123, in __init__
    if not self.initialise():
  File "/opt/exaproxy/lib/exaproxy/supervisor.py", line 425, in initialise
    self.pid.save()
  File "/opt/exaproxy/lib/exaproxy/util/pid.py", line 36, in save
    with open(self.pid_file,"r") as f:
IOError: [Errno 2] No such file or directory: '/var/log/exaproxy/exaproxy.pid'

When exaproxy is started and pid file with correct owner is already present, it writes nothing in it.

thomas-mangin commented 5 years ago

We should not crash here - in the meanwhile creating the folder /var/log/exaproxy with the right permission should just work.