Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deploy can't connect client to endpoint

See original GitHub issue

Hey, I’m having issues connecting the client to WS when deploying.

I’m using Node + React and for dev I use const client = new Client('ws://localhost:2567'); and works fine

Now I created a droplet in Digital Ocean, created a static build of the client and put it on server under build folder and serve like that:

app.get('*', function (req, res) {
  res.sendFile(path.join(__dirname, 'build', 'index.html'));

But when I access it on the browser I get connection failed. I tried localhost and the ip of the droplet but no success, the error on browser console is:

POST http://localhost/matchmake/joinOrCreate/life_room net::ERR_CONNECTION_REFUSED

Anyone know what endpoint or setup should I use to make it work? Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

jakappscommented, Jul 4, 2020

I’m still unsure in what endpoint should I put in the client in this line below as it’s seem to be what’s not working

const client = new Client('ws://localhost:2567');

You need to find the external ip address that your droplet is accessible with, and substitute it for localhost.

const client = new Client('ws://your-droplet-ip-address');

You should find it somewhere in your digital ocean dashboard.

EDIT: I’m assuming that you aren’t using a domain name that is pointing to your droplet, in which case, you would just use the domain:

const client = new Client('ws://');

vittiscommented, Jul 4, 2020

My error was that I was including the port with the IP of the droplet, removed it and it worked. I’ll close the issue now.

Thanks for the help @wrigggy!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Client deployment failed | Endpoint Protection
Hello,I am using SEP 11.0.6 installed on W2k8 R2. and want to deploy clients trough SEP Management Console. I can search the client...
Read more >
Deploy clients to Windows - Configuration Manager
On the Home tab of the ribbon, in the Settings group, select Client Installation Settings, and then select Software Update-Based Client ...
Read more >
WCF cannot connect to endpoint after successfully adding ...
1 Answer 1 · 1) Check if the service URL is correct on your configuration files. This includes the protocol. · 2) Disable...
Read more >
Troubleshooting Direct Connect - Tanium Documentation
If you are unable to establish an endpoint connection, check the status of the Deploy Direct Connect - Open Session - operating system ......
Read more >
Resolve connection issues with API Gateway private ... - AWS
I'm having issues connecting to my Amazon API Gateway private API endpoint that's in Amazon Virtual Private Cloud (Amazon VPC).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found