Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"use_socket: true" results in error "Recevived 0 instead of expected 1 bytes" #447

Closed
m0onspell opened this issue May 23, 2017 · 2 comments

Comments

@m0onspell
Copy link

m0onspell commented May 23, 2017

I faced the exact same problem as described here.
Running in a docker container, docker-compose.yml:

    php:
        build: php
        volumes:
          - ../app/backend:/var/www/symfony
    rabbitmq:
          build: rabbitmq
          privileged: true
          ports:
            - "5672:5672"
            - "15672:15672"
            - "15671:15671"
          environment:
            - RABBITMQ_DEFAULT_USER=root
            - RABBITMQ_DEFAULT_PASS=default
          expose:
            - 5672

Symfony config.yml:

old_sound_rabbit_mq:
    connections:
        default:
            host:     'rabbitmq'
            port:     5672
            user:     'root'
            password: 'default'
            vhost:    '/'
            lazy:     true
            connection_timeout: 60
            read_write_timeout: 60

            # requires php-amqplib v2.4.1+ and PHP5.4+
            keepalive: false

            # requires php-amqplib v2.4.1+
            heartbeat: 30

            #requires php_sockets.dll
            use_socket: true # default false
    producers:
        offline_sync:
            connection:       default
            exchange_options: {name: 'offline-sync', type: direct}
            enable_logger: true
    consumers:
        offline_sync:
            connection:       default
            exchange_options: {name: 'offline-sync', type: direct}
            queue_options:    {name: 'offline-sync'}
            callback:         app.test_handler
            enable_logger: true

Running:

php bin/console rabbitmq:consumer -w offline_sync

Sockets and mbstring extensions are installed.
Setting use_socket: false fixes the issue.
So isn't it a bug? Are we unable to use sockets?

@m0onspell m0onspell changed the title "use_socket: false" results in error "Recevived 0 instead of expected 1 bytes" "use_socket: true" results in error "Recevived 0 instead of expected 1 bytes" May 23, 2017
@m0onspell
Copy link
Author

Creators don't care. Closing.

@webarchitect609
Copy link

@m0onspell , the issue has been fixed in #448 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants