CEF 3325.1756 ERR_CONNECTION_REFUSED when accessing locahost

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

CEF 3325.1756 ERR_CONNECTION_REFUSED when accessing locahost

Postby shenhui » Wed Aug 29, 2018 7:10 am

Hello guys,

I encountered an issue when visiting http://localhost/ with cefclient demo, the error displays below,

Page failed to load.
URL: http://localhost/
Error: ERR_CONNECTION_REFUSED (-102)
ERR_CONNECTION_REFUSED


But I can ping localhost and it points to 127.0.0.1.
In my understanding the result should be like information below,

"Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com."


Is there any idea ? Thanks a lot.

Shen.
shenhui
Techie
 
Posts: 31
Joined: Sat Apr 16, 2011 10:50 pm

Re: CEF 3325.1756 ERR_CONNECTION_REFUSED when accessing loca

Postby kyr0 » Wed Aug 29, 2018 7:30 am

Hi Shen,

I doubt it's CEF's fault...

Having the same idea in mind, to fetch from localhost, I impl. a simple test. To make sure it's a problem in CEF you could simple do this:

- visit https://nodejs.org/en/about/
- download and install Node.js
- copy&paste the code displayed on the page as: serv_test.js
- run "node serv_test.js"
- open: http://localhost:3000 in a browser
- make sure you see "Hello, world!"
- change code to: kDefaultUrl[] = "http://localhost:3000";
- compile & run.

If it doesn't show "Hello, world!" it's probably a CEF problem.
If it shows it, your nginx config or networking config is wrong.

Best,
Aron
kyr0
Newbie
 
Posts: 7
Joined: Wed Aug 29, 2018 7:03 am

Re: CEF 3325.1756 ERR_CONNECTION_REFUSED when accessing loca

Postby ndesktop » Wed Aug 29, 2018 7:44 am

Are you sure nginx is running locally on port 80?
ndesktop
Master
 
Posts: 750
Joined: Thu Dec 03, 2015 10:10 am

Re: CEF 3325.1756 ERR_CONNECTION_REFUSED when accessing loca

Postby magreenblatt » Wed Aug 29, 2018 11:34 am

Does loading http://localhost/ work in Google Chrome in the same machine?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: CEF 3325.1756 ERR_CONNECTION_REFUSED when accessing loca

Postby shenhui » Wed Aug 29, 2018 8:55 pm

Hello all,

Thanks very much for your replies.

I have two machines currently, cefclient works on one of them when loading http://localhost, but doesn't work on another one.

In addition, http://localhost doesn't work on both of their chrome browser, both returns ERR_CONNECTION_REFUSED.
shenhui
Techie
 
Posts: 31
Joined: Sat Apr 16, 2011 10:50 pm

Re: CEF 3325.1756 ERR_CONNECTION_REFUSED when accessing loca

Postby shenhui » Wed Aug 29, 2018 9:12 pm

ndesktop wrote:Are you sure nginx is running locally on port 80?


Seems I didn't install nginx on my machine.
shenhui
Techie
 
Posts: 31
Joined: Sat Apr 16, 2011 10:50 pm

Re: CEF 3325.1756 ERR_CONNECTION_REFUSED when accessing loca

Postby shenhui » Wed Aug 29, 2018 9:18 pm

kyr0 wrote:Hi Shen,

I doubt it's CEF's fault...

Having the same idea in mind, to fetch from localhost, I impl. a simple test. To make sure it's a problem in CEF you could simple do this:

- visit https://nodejs.org/en/about/
- download and install Node.js
- copy&paste the code displayed on the page as: serv_test.js
- run "node serv_test.js"
- open: http://localhost:3000 in a browser
- make sure you see "Hello, world!"
- change code to: kDefaultUrl[] = "http://localhost:3000";
- compile & run.

If it doesn't show "Hello, world!" it's probably a CEF problem.
If it shows it, your nginx config or networking config is wrong.

Best,
Aron


Hi Aron,

I followed your steps and it printed "Hello World!" successfully.
shenhui
Techie
 
Posts: 31
Joined: Sat Apr 16, 2011 10:50 pm

Re: CEF 3325.1756 ERR_CONNECTION_REFUSED when accessing loca

Postby shenhui » Wed Aug 29, 2018 9:31 pm

Actually I'm integrating Twitch Oauth flow.

https://id.twitch.tv/oauth2/authorize
?client_id=<your client ID>
&redirect_uri=<your registered redirect URI>
&response_type=code
&scope=<space-separated list of scopes>

Which requires filling out a redirect_uri, Twitch recommend to set it as http://localhost/xxx, this works well in cef3.1650.1550, but after upgrading cef to 3.3325.1756, it doesn't works on most of machines.

Is there any difference between 3.1650 and 3.3325 on this ? Does that mean 3.1650 sets up a http service on localhost in place ?
shenhui
Techie
 
Posts: 31
Joined: Sat Apr 16, 2011 10:50 pm

Re: CEF 3325.1756 ERR_CONNECTION_REFUSED when accessing loca

Postby magreenblatt » Wed Aug 29, 2018 9:52 pm

It's possible that newer versions of chromium are blocking redirect to http://localhost. Perhaps because you're using http, which is insecure. However, it sounds like you're suggesting that it works on some computers. Does http://127.0.0.1/ work?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: CEF 3325.1756 ERR_CONNECTION_REFUSED when accessing loca

Postby shenhui » Wed Aug 29, 2018 10:22 pm

magreenblatt wrote:It's possible that newer versions of chromium are blocking redirect to http://localhost. Perhaps because you're using http, which is insecure. However, it sounds like you're suggesting that it works on some computers. Does http://127.0.0.1/ work?


http://127.0.0.1 or http://localhost only works in cefclient on some machine, but doesn't work in external browser, such as chrome.
shenhui
Techie
 
Posts: 31
Joined: Sat Apr 16, 2011 10:50 pm

Next

Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 22 guests