openfaas / of-watchdog

Reverse proxy for STDIO and HTTP microservices
MIT License
262 stars 115 forks source link

fprocess as daemon start don't work #26

Closed feifeiiiiiiiiiii closed 6 years ago

feifeiiiiiiiiiii commented 6 years ago

I build a image base openresty, build script in https://github.com/feifeiiiiiiiiiii/faas_template, occur fatal error

Expected Behaviour

I think of-watchdog should support fprocess as daemon proccess to service

Current Behaviour

Forking - openresty []
2018/09/12 19:53:51 Started logging stdout from function.
2018/09/12 19:53:51 Started logging stderr from function.
2018/09/12 19:53:51 OperationalMode: http
2018/09/12 19:53:51 Writing lock file at: /var/folders/90/txbmh4fj7qb8p9_7kpzwnx4s43bnfk/T/.lock
2018/09/12 19:53:51 Error reading stdout: EOF

Possible Solution

I think should judge error info, if err is EOF, we should ignore

Steps to Reproduce (for bugs)

  1. try https://github.com/feifeiiiiiiiiiii/faas_template to build openresty image or use docker pull feifeiiiiiiiiiii/openresty-openfaas
  2. use openfaas ui to create function
  3. use kubectl logs you_pods --namespace=openfaas-fn

Context

Your Environment

alexellis commented 6 years ago

I need to look into this in deeper detail, but the watchdogs should be effectively be considered in a code-freeze. This error occurs when the stderr pipe is terminated.

alexellis commented 6 years ago

Running as a daemon is not supported. The process must run in the foreground otherwise we cannot monitor it. Can you force openresty to run in the foreground?

feifeiiiiiiiiiii commented 6 years ago

@alexellis Yes, I can force openresty to run in the foreground

alexellis commented 6 years ago

If you do that do we still need your proposed change or can we close this issue?

feifeiiiiiiiiiii commented 6 years ago

@alexellis I close this issue, thanks detail answer for question

alexellis commented 6 years ago

Derek lock: resolved