atualizações dos pacotes
[Concluído]
No package.json tava com o laravel-echo 1.09.0, então
alterei para 1.10.0 , mas quando disparei o npm update
ficou 1.14.2
deixa assim ?
Olá, Wilmar!
Tudo bem?
Após atualizar, continuou funcionando normalmente?
Se sim, ótimo, e pode deixar como está.
Estou seguindo o projeto do Larachat, mas vi apenas a questão da instalação dos recursos.
como faço pra testar se o laravel-echo esta funcionando ?
Pode rodar o CLI do laravel-echo-server:
laravel-echo-server start
Localmente , eu estou usando manualmente, "laravel-echo-server.cmd start", esta funcionando Ok, mas
como faz no Servidor em nuvens (Digital Ocean) pra ficar automaticamente carregando
o laravel-echo ?
Você pode instalar o laravel-echo-server no servidor:
sudo npm install -g laravel-echo-server
https://github.com/tlaverdure/laravel-echo-server#getting-started
--
Ou, pode criar um container, semelhante a este:
https://github.com/laradock/laradock/blob/master/docker-compose.yml#L1269
https://github.com/laradock/laradock/tree/master/laravel-echo-server
eu instalei globalmente, mas continua dando erro na aplicação
GET http://minhastartup.upbgame.com.br:6001/socket.io/?EIO=3&transport=polling&t=OKIDyPm net::ERR_CONNECTION_TIMED_OUT
na instalação apareceu essas mensagens abaixo, como posso testar se a instação foi bem sucedida?
npm install -g laravel-echo-server
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
changed 203 packages in 14s
16 packages are looking for funding
melhorando minha duvida,
depois que eu instalalo globalmente : npm install -g laravel-echo-server
o : laravel-echo-server start
ja fica carregado ?
pq precisa ficar carregado direto no server
No servidor (digital ocean) firewall esta assim:
root@LogUp-1vcpu-2gb-intel-nyc1-01:~# sudo ufw status
Status: active
To Action From
-- ------ ----
Apache Full ALLOW Anywhere
22/tcp ALLOW Anywhere
OpenSSH ALLOW Anywhere
6001 ALLOW Anywhere
Apache Full (v6) ALLOW Anywhere (v6)
22/tcp (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)
6001 (v6) ALLOW Anywhere (v6)
--------
Na aplicação esta aparecendo mensagens:
Failed to load resource: net::ERR_CONNECTION_REFUSED :6001/socket.io/?EIO=3&transport=polling&t=OKMPMKR:1
GET http://minhastartup.upbgame.com.br:6001/socket.io/?EIO=3&transport=polling&t=OKMPPx1 net::ERR_CONNECTION_REFUSED
Outra coisa pra ajudar,
quando ,no servidor da Digital Ocean, eu disparo : laravel-echo-server start
mostra:
L A R A V E L E C H O S E R V E R
version 1.6.3
⚠ Starting server in DEV mode...
✔ Running at localhost on port 6001
✔ Channels are ready.
✔ Listening for http events...
✔ Listening for redis events...
Server ready!
Carlos a pergunta correta seria como disparar o laravel-echo-server start em produção?
Como optou por instalar o laravel-echo diretamente no servidor, neste caso, você precisa instalar o supervisor também, porque ele vai garantir que o processo do laravel-echo estará sempre rodando.
Aqui um exemplo de como pode ficar o arquivo de configuração do supervisor, neste caso, está mantendo o processo "php artisan serve" sempre rodando:
https://github.com/especializati/setup-docker-laravel/blob/production/docker/8.1/supervisord.conf#L9
Depois que instalei o Supervisor, verifiquei que o arquivo
/etc/supervisor/supervisord.conf esta diferente do link que vc passou na mensagem anterior:
; supervisor config file
[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.
[include]
files = /etc/supervisor/conf.d/*.conf
Outra coisa:
Na mensagem vc fala do supervisor esta carregando o "php artisan serve" . Não seria o
"laravel-echo-server start" ?
Isso amigo, seria "cd /path/onde/sua-aplica/esta && laravel-echo-server start"
--
É porque usei um supervisor com configurações mais simples (você pode usar o mesmo que usei, se quiser), inclua este "command" com o comando para ficar rodando, pode incluir as linhas 7 até à linha 14;
Carlos,
depois que alterei o arquivo supervisord.conf
disparei o "sudo supervisorctl update" e quando faço o "sudo supervisorctl"
apareceu:
php BACKOFF can't find command 'cd /var/www/html/upmaster57 && laravel-echo-server start'
o conteudo do supervisord.conf
[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.
[program:php]
command="cd /var/www/html/upmaster57 && laravel-echo-server start"
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
Carlos, fiz uma correção no supervisord.conf e deu certo
command=laravel-echo-server start
directory=/var/www/html/upmaster57
-------
sudo supervisorctl update
php: stopped
php: updated process group
root@LogUp-1vcpu-2gb-intel-nyc1-01:/etc/supervisor# sudo supervisorctl
php RUNNING pid 30957, uptime 0:00:05
Precisa estar logado para conseguir responder a este ticket!
Clique Aqui Para Entrar!