openfaas / of-watchdog

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

Use of-watchdog for Docker template running a C/C++ function #135

Closed salminsu closed 1 year ago

salminsu commented 2 years ago

Hi, I have used the Docker template to run a C/C++ function with the classic watchdog. I, however, need the of-watchdog model in 'http' mode. Since there is no Docker template for that, I tried to understand the of-watchdog http-runner code and golang-http-template. As the C/C++ function to run in the docker, I incorporated a C/C++ http-server in the function. While the http server works standalone, the of-watchdog in 'http' mode + Docker running C/C++ function does not work. It shows 'Server returned unexpected status code: 500 - ' error. How can I debug the issue further? Is there anything else needed to enable Docker function for of-watchdog? I am new to OpenFaaS, so any help will be appreciated. I've attached the Dockerfile and C/C++ function code.

Expected Behaviour

Current Behaviour

Possible Solution

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

salminsu commented 2 years ago

@alexellis: I was talking in the context of this issue that I raised yesterday. Please let me know if you need more context.

taorepoara commented 1 year ago

Hi,

Why do you need the http mode for a very simple function like this one ?

The of your configuration is that the fprocess env var in the Dockerfile has xargs before your process. Removing it works fine.

Best regards,

Thomas

alexellis commented 1 year ago

For free technical support, attend our weekly Office Hours call in the docs under Community

docs.openfaas.com