roadrunner: [🐛 BUG]: `handle_serve_command` function call error when having spaces on the `server.command` path

No duplicates 🥲.

  • I have searched for a similar issue in our bug tracker and didn’t find any solutions.

What happened?

Seems to be impossible to provide a server.command with spaces on the command’s path. Here is an example:

./rr '-c' '/Users/nunomaduro/Work/Code/laravel/.rr.yaml' '-o' 'version=3' '-o' 'server.command="/Users/nunomaduro/Library/Application Support/Herd/bin/php82"

I’ve tried multiple aways to escape the “Application Support”, however the result is aways the same:

handle_serve_command: Function call error:
        got initial serve error from the Vertex *http.Plugin, stopping execution, error: static_pool_allocate_workers: WorkerAllocate: fork/exec /Users/nunomaduro/Library/Application: no such file or directory

Any ideas for what to solve this issue?

Version (rr --version)

rr version 2023.2.1 (build time: 2023-07-27T17:12:33+0000, go1.20.6), OS: darwin, arch: arm64

How to reproduce the issue?

rr version 2023.2.1

Relevant log output

handle_serve_command: Function call error:
        got initial serve error from the Vertex *http.Plugin, stopping execution, error: static_pool_allocate_workers: WorkerAllocate: fork/exec /Users/nunomaduro/Library/Application: no such file or directory

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 31 (19 by maintainers)

Most upvoted comments

@bnzo That works. Thanks!

It seems to be working using the -o flag when removing the array brackets and quotes from the server.command string. I have used this rr build: https://github.com/roadrunner-server/roadrunner/actions/runs/5990264085

@jbrooksuk could you give it a try? Your modified command below:

exec '/Users/james/Code/nunomaduro/demo-nuno/rr' '-c' '/Users/james/Code/nunomaduro/demo-nuno/.rr.yaml' '-o' 'version=3' '-o' 'http.address=127.0.0.1:8000' '-o' 'server.command=/Users/james/Library/Application Support/Herd/bin/php82,/Users/james/Code/nunomaduro/demo-nuno/vendor/bin/roadrunner-worker' '-o' 'http.pool.num_workers=0' '-o' 'http.pool.max_jobs=500' '-o' 'rpc.listen=tcp://127.0.0.1:6001' '-o' 'http.pool.supervisor.exec_ttl=30s' '-o' 'http.static.dir=/Users/james/Code/nunomaduro/demo-nuno/public' '-o' 'http.middleware=static' '-o' 'logs.mode=production' '-o' 'logs.level=debug' '-o' 'logs.output=stdout' '-o' 'logs.encoding=json' 'serve'

Thanks - just ping me here once is ready! And thanks again!