laravel / octane

Supercharge your Laravel application's performance.
https://laravel.com/docs/octane
MIT License
3.78k stars 296 forks source link

endure_call_serve_fn: got initial serve error from the Vertex rpc.Plugin, stopping execution, error: rpc_plugin_serve: address -1919: invalid port #276

Closed thyseus closed 3 years ago

thyseus commented 3 years ago
laravel.test_1       |    INFO  Server running…
laravel.test_1       | 
laravel.test_1       |   Local: http://0.0.0.0:80 
laravel.test_1       | 
laravel.test_1       |   Press Ctrl+C to stop the server
laravel.test_1       | 
laravel.test_1       | 2021-05-17 11:16:10,845 INFO success: php entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
laravel.test_1       | 
laravel.test_1       |    ERROR  handle_serve_command: Serve error:
laravel.test_1       | 
laravel.test_1       |    ERROR         endure_start:
laravel.test_1       | 
laravel.test_1       |    ERROR         endure_serve_internal: Function call error:
laravel.test_1       | 
laravel.test_1       |    ERROR         endure_call_serve_fn: got initial serve error from the Vertex rpc.Plugin, stopping execution, error: rpc_plugin_serve: address -1919: invalid port
laravel.test_1       | 2021-05-17 11:16:10,888 INFO exited: php (exit status 1; not expected)
laravel.test_1       | 2021-05-17 11:16:11,892 INFO spawned: 'php' with pid 54

I get this error after installing octane 1.0.0. Any Ideas what this means or what I did wrong ? Where does the port -1919 come from ? I tried to bind port 80 to port 80 in docker-compose.yml:

laravel.test:
        build:
            context: ./docker/8.0
            dockerfile: Dockerfile
            args:
                WWWGROUP: '${WWWGROUP}'
        image: sail-8.0/app
        ports:
            - '${APP_PORT:-80}:80'
        environment:
            WWWUSER: '${WWWUSER}'
            LARAVEL_SAIL: 1
        volumes:
            - '.:/var/www/html'
        networks:
            - sail
        depends_on:
            - mysql
            - redis
            - selenium

Thanks a lot !

goszowski commented 3 years ago

I have the same issue

goszowski commented 3 years ago

I found interesting code at https://github.com/laravel/octane/blob/1.x/src/Commands/StartRoadRunnerCommand.php#L152 If you start server on port 80 then rpc-port will be -1919

goszowski commented 3 years ago

@nunomaduro I'm already create pull request to fix this bug, but it is closed.. https://github.com/laravel/octane/pull/279

nunomaduro commented 3 years ago

That pull request #279 introduces a regression where 2 octane servers can no longer run in the same server.

thyseus commented 3 years ago

Where am i able to set the rpc-port for myself ? I can not find any clues in the documentation. It should work just out-of-the-box as @goszowski is proposing.

goszowski commented 3 years ago

Where am i able to set the rpc-port for myself ? I can not find any clues in the documentation. It should work just out-of-the-box as @goszowski is proposing.

php artisan octane:start --rpc-port=%your_port%

thyseus commented 3 years ago

Ah thanks a lot. Putting

command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan octane:start --rpc-port=6001 --server=roadrunner --host=0.0.0.0 --port=80

in docker/8.0/supervisord.conf and - important - doing a sail build --no-cache makes roadrunner working for me after coming back from the coffee machine !

I think this parameter should be included as default in the documentation.

nunomaduro commented 3 years ago

I've just added documentation about this: https://github.com/laravel/docs/pull/7070.