Comments (26)
看不懂 - -||
from tutorial-laravel-4-real-time-chat.
make sure the server listening IP is 0.0.0.0 instead of 127.0.0.1
from tutorial-laravel-4-real-time-chat.
i am using centos 7
from tutorial-laravel-4-real-time-chat.
Have you started the socket server?
from tutorial-laravel-4-real-time-chat.
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.
from tutorial-laravel-4-real-time-chat.
- 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.
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.
you have any idea how to open port 7778 on centos 7
from tutorial-laravel-4-real-time-chat.
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.
i already change ip address in js file but still the same error
from tutorial-laravel-4-real-time-chat.
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.
in this file
from tutorial-laravel-4-real-time-chat.
yes
from tutorial-laravel-4-real-time-chat.
ok
from tutorial-laravel-4-real-time-chat.
is this correct?
$server = IoServer::factory(
new HttpServer(
new WsServer(
$this->chat
)
),
$port, '104.125.50.52'
);
from tutorial-laravel-4-real-time-chat.
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.
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.
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.
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.
My pc is Windows 8.1 and my server CentOS 7. ok i understand.
from tutorial-laravel-4-real-time-chat.
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.
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.
maybe yesman0319 brings the definitive response but, someone can read it?
from tutorial-laravel-4-real-time-chat.
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.
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)
- incorrect composer invocation HOT 3
- how to create group chat HOT 1
- php artisan chat:serve HOT 1
- Keep the ws server running
- Unable to connect to mqtt broker
- WebSocket is already in CLOSING or CLOSED state. HOT 1
- How do I start the server? HOT 1
- Can't connect to WS HOT 3
- Save message to database HOT 1
- Not Working HOT 9
- How can I bring it on real world!!!
- Names of users HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tutorial-laravel-4-real-time-chat.