Callback event error when testing locally

For discussion of the Poker Mavens server module and other administration topics

Callback event error when testing locally

Postby harrythree » Thu Mar 05, 2015 5:38 pm

I'm trying to test the Hand event callback locally using Node.js as the server. It is running locally on port 8080. The Poker Mavens (Lite) server is running on a Windows Server 2008 on AWS EC2.

I have configured my firewall with Inbound and Outbound Rules for the PokerMavens Server. I can hit the API with no problem.

On my Node.js server I have a route set to accept POST events from /pmcb (this is the callback url of course).

I have Callback Events enabled with the URL pointing to http://localhost:8080/pmcb. I also have Hand event, Login event, and Logout event all set to Yes. But when I test to see if the callback is being fired I can see in my logs that I'm getting an error "Callback event error: Socket Error # 10061 Connection refused."

When I test the callback url running on the production server on Heroku (cloud platform for web apps), I can see that I'm receiving the parameters being returned from the Poker Mavens Server and no errors in the log.

It would be ideal to be able to test the callbacks locally. I feel like it's a firewall issue, but I can't figure out what I'm doing wrong.

Any help or advice would be appreciated!

Thanks,

Harry
harrythree
 
Posts: 32
Joined: Sun Mar 01, 2015 4:20 pm

Re: Callback event error when testing locally

Postby Kent Briggs » Thu Mar 05, 2015 6:20 pm

What happens if you run a browser on the server and point it to http://localhost:8080/pmcb ?
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3832
Joined: Wed Mar 19, 2008 8:47 pm

Re: Callback event error when testing locally

Postby harrythree » Thu Mar 05, 2015 7:09 pm

If I hit that URL using Postman (REST Client Chrome extension) as a POST request and send it data like Event, my endpoint on my server displays it as expected. If I hit that URL in my browser it won't be found (obv because that would be a GET request and my router is looking for POST requests).
harrythree
 
Posts: 32
Joined: Sun Mar 01, 2015 4:20 pm

Re: Callback event error when testing locally

Postby Kent Briggs » Thu Mar 05, 2015 7:41 pm

I don't have any experience with node.js so I can't help you with the rights management there. I have EasyPHP installed under localhost on my desktop system here. I can set my callback url to http://localhost/callback.php and it executes my php file without any problems.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3832
Joined: Wed Mar 19, 2008 8:47 pm

Re: Callback event error when testing locally

Postby harrythree » Thu Mar 05, 2015 8:06 pm

Thanks for the responses Ken, I'm an idiot! I don't know why I would think what I was trying would work...

For whatever reason your last reply made me realize I'm trying to connect to my local machine from a remote server. Obviously it's not going to work since localhost:8080 isn't accessible from the outside world. Which also makes sense why it ran fine on my production server (since that can be accessed anywhere).
harrythree
 
Posts: 32
Joined: Sun Mar 01, 2015 4:20 pm


Return to Site Administration

Who is online

Users browsing this forum: No registered users and 7 guests