Git Product home page Git Product logo

Comments (26)

yesman0319 avatar yesman0319 commented on July 25, 2024 4

看不懂 - -||

from tutorial-laravel-4-real-time-chat.

stevengpn avatar stevengpn commented on July 25, 2024 1

make sure the server listening IP is 0.0.0.0 instead of 127.0.0.1

from tutorial-laravel-4-real-time-chat.

umairali avatar umairali commented on July 25, 2024

i am using centos 7

from tutorial-laravel-4-real-time-chat.

assertchris avatar assertchris commented on July 25, 2024

Have you started the socket server?

from tutorial-laravel-4-real-time-chat.

umairali avatar umairali commented on July 25, 2024

On localhost (windows 8.1) when i use this command

php artisan chat:serve

connection successfull but when i use this code on my domain (Centos 7) i m facing error

from tutorial-laravel-4-real-time-chat.

umairali avatar umairali commented on July 25, 2024

screenshot
capture2

from tutorial-laravel-4-real-time-chat.

assertchris avatar assertchris commented on July 25, 2024
  • This line can have an IP address (of the server) following $port
  • The server firewall needs to allow connections through port 7778
  • The client firewall needs to allow connections through port 7778

from tutorial-laravel-4-real-time-chat.

assertchris avatar assertchris commented on July 25, 2024

The JavaScript you are running (on the CentOS client browser) is trying to connect to 127.0.0.1:7778 but the server is not on the same machine. You need to adjust the JavaScript to reflect the IP address of the server (in addition to the steps suggested above).

from tutorial-laravel-4-real-time-chat.

umairali avatar umairali commented on July 25, 2024

you have any idea how to open port 7778 on centos 7

from tutorial-laravel-4-real-time-chat.

assertchris avatar assertchris commented on July 25, 2024

Change the IP address (in the JS) first. I have a feeling you might not need to fiddle with port settings yet.

TL;DR

no

from tutorial-laravel-4-real-time-chat.

umairali avatar umairali commented on July 25, 2024

i already change ip address in js file but still the same error

from tutorial-laravel-4-real-time-chat.

assertchris avatar assertchris commented on July 25, 2024

ok, next; add the IP address to that line: $port, '[your server ip]'...

Also be sure to update the JS accordingly.

from tutorial-laravel-4-real-time-chat.

umairali avatar umairali commented on July 25, 2024

in this file

https://github.com/formativ/tutorial-laravel-4-real-time-chat/blob/3d7e8ef665ab0cc74efdf14c0f20fab99b126dc1/workbench/formativ/chat/src/Formativ/Chat/Command/Serve.php#L92

from tutorial-laravel-4-real-time-chat.

assertchris avatar assertchris commented on July 25, 2024

yes

from tutorial-laravel-4-real-time-chat.

umairali avatar umairali commented on July 25, 2024

ok

from tutorial-laravel-4-real-time-chat.

umairali avatar umairali commented on July 25, 2024

is this correct?

    $server = IoServer::factory(
        new HttpServer(
            new WsServer(
                $this->chat
            )
        ),
        $port, '104.125.50.52'
    );

from tutorial-laravel-4-real-time-chat.

umairali avatar umairali commented on July 25, 2024

I am trying both
$port, '104.125.50.52'
and
$port, '[104.125.50.52]'
but still the same issue

from tutorial-laravel-4-real-time-chat.

assertchris avatar assertchris commented on July 25, 2024

Without the brackets.

Then I fear it might be a security issue (related to firewall blocking 7778). Best google something like "unblock ports in CentOS"...

from tutorial-laravel-4-real-time-chat.

umairali avatar umairali commented on July 25, 2024

but in my server no firewall install

i try this command for open firewall port

firewall-cmd --zone=dmz --add-port=7778/tcp --permanent

result

FirewallD is not running

from tutorial-laravel-4-real-time-chat.

assertchris avatar assertchris commented on July 25, 2024

Your server is Windows 8.1 and your client is CentOS 7. Both have built-in firewalls. Ever run a game that minimised to show you a Windows dialog; which asked you to enable network connections for the game? That's the firewall.

from tutorial-laravel-4-real-time-chat.

umairali avatar umairali commented on July 25, 2024

My pc is Windows 8.1 and my server CentOS 7. ok i understand.

from tutorial-laravel-4-real-time-chat.

assertchris avatar assertchris commented on July 25, 2024

Good luck! Let me know if you figure out what the problem is and I may update the article to reflect your solution.

from tutorial-laravel-4-real-time-chat.

umairali avatar umairali commented on July 25, 2024

i received answer from my support hosting

Your port 7778 is open, however, nothing is listening on that port and on the public interface:

$ nmap -Pn -p 7778 104.125.50.52

Starting Nmap 6.47 ( http://nmap.org ) at 2014-12-28 08:50 CST
Nmap scan report for 104.125.50.52
Host is up (0.068s latency).
PORT STATE SERVICE
7778/tcp closed interwise

Nmap done: 1 IP address (1 host up) scanned in 0.21 seconds

from tutorial-laravel-4-real-time-chat.

hugoofab avatar hugoofab commented on July 25, 2024

maybe yesman0319 brings the definitive response but, someone can read it?

from tutorial-laravel-4-real-time-chat.

kairat-beep avatar kairat-beep commented on July 25, 2024

i can't understand what i see- translating explicitly." with some <- -||> i have no idea what is that"

from tutorial-laravel-4-real-time-chat.

assertchris avatar assertchris commented on July 25, 2024

Folks, this is an old issue, and an even older tutorial. If you would like to discuss over twitter (and with a link to some code you are working on at the time), then I can help try to debug there. In the meantime, I'm going to lock this thread.

from tutorial-laravel-4-real-time-chat.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.