laravel / reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.
https://reverb.laravel.com
MIT License
942 stars 63 forks source link

Reverb Not working in production server #174

Closed ritwikBiswas007 closed 2 months ago

ritwikBiswas007 commented 2 months ago

Reverb Version

@beta

Laravel Version

^11.0

PHP Version

8.2.1

Description

WebSocket connection to 'wss://neo.zepay.money:80/app/esa4d8rnyeyadiexuram?protocol=7&client=js&version=8.4.0-rc2&flash=false' failed:

`server { listen 80; listen [::]:80; listen 443 ssl http2; listen [::]:443 ssl http2; {{ssl_certificate_key}} {{ssl_certificate}} server_name neo.zepay.money; {{root}}

{{nginx_access_log}} {{nginx_error_log}}

if ($scheme != "https") { rewrite ^ https://$host$uri permanent; }

location ~ /.well-known { auth_basic off; allow all; }

{{settings}}

location / { {{varnish_proxy_pass}} proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_hide_header X-Varnish; proxy_redirect off; proxy_max_temp_file_size 0; proxy_connect_timeout 720; proxy_send_timeout 720; proxy_read_timeout 720; proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; proxy_temp_file_write_size 256k; }

location /app {
    proxy_pass http://127.0.0.1:8081;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

location ~ ^.+.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map)$ { add_header Access-Control-Allow-Origin ""; expires max; access_log off; }

if (-f $request_filename) { break; } }

server { listen 8080; listen [::]:8080; server_name neo.zepay.money; {{root}}

try_files $uri $uri/ /index.php?$args; index index.php index.html;

location ~ .php$ { include fastcgi_params; fastcgi_intercept_errors on; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; try_files $uri =404; fastcgi_read_timeout 3600; fastcgi_send_timeout 3600; fastcgi_param HTTPS "on"; fastcgi_param SERVER_PORT 443; fastcgi_pass 127.0.0.1:{{php_fpm_port}}; fastcgi_param PHP_VALUE "{{php_settings}}"; }

location ~ ^.+.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map)$ { add_header Access-Control-Allow-Origin ""; expires max; access_log off; }

if (-f $request_filename) { break; } }`

And Supervisor is also running perfectly

`APP_NAME="Zepay Retail" APP_ENV=production APP_KEY=base64:epjDRbsy3TMxBhFYBoNgzR+FgHKrKgJzF359h3RUq3g= APP_DEBUG=true APP_URL=https://neo.zepay.money ASSET_URL=https://neo.zepay.money SPLADE_SSR_ENABLED=true LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug

DB_CONNECTION=mysql DB_PORT=3306 DB_DATABASE=zepay-money DB_USERNAME=zepay-money DB_PASSWORD=95NzNixnhN4tDCk6k5xH

BROADCAST_DRIVER=reverb BROADCAST_CONNECTION=reverb CACHE_DRIVER=file FILESYSTEM_DISK=local QUEUE_CONNECTION=database SESSION_DRIVER=file SESSION_LIFETIME=120 FILESYSTEM_DISK=local

MEMCACHED_HOST=memcached

REDIS_HOST=localhost REDIS_PASSWORD=null REDIS_PORT=6379

MAIL_MAILER=smtp MAIL_HOST=sandbox.smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=1d2039c73f1352 MAIL_PASSWORD=d94966202d6d4c MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS="no-reply@zepay.money" MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_DEFAULT_REGION=us-east-1 AWS_BUCKET= AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= PUSHER_HOST= PUSHER_PORT=8080 PUSHER_SCHEME=http PUSHER_APP_CLUSTER=mt1

VITE_APP_NAME="${APP_NAME}" VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" VITE_PUSHER_HOST="${PUSHER_HOST}" VITE_PUSHER_PORT="${PUSHER_PORT}" VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

REVERB_APP_ID=271094 REVERB_APP_KEY=esa4d8rnyeyadiexuram REVERB_APP_SECRET=pyubfujwpiqrdwp60zhu REVERB_HOST=neo.zepay.money REVERB_HOST="localhost" REVERB_PORT=8080 REVERB_SERVER_PORT=8081 REVERB_SERVER_HOST=127.0.0.1

VITE_REVERB_APP_KEY="${REVERB_APP_KEY}" VITE_REVERB_HOST='neo.zepay.money' VITE_REVERB_PORT=80 VITE_REVERB_SCHEME=http

MPLAN_API_KEY=62dd4fc6872957028d7248ccc8c05bdf ENABLE_2FA_QR=true `

Steps To Reproduce

Connection failed

driesvints commented 2 months ago

Hi there,

Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.