net::ERR_CONNECTION_REFUSED

Hi All,

I am doing POC for my company, i have setup local IIS and MYSQL. installed the Piwik and embedded the piwik code at one of our application.

But i am not able to get any data in Piwik, when I checked in browser console i have found the below error.

(index):54 GET https://localhost/Piwiktest/piwik.js net::ERR_CONNECTION_REFUSED

Note: if I enter “https://localhost/Piwiktest/piwik.js” in my browser it is showing error but if i remove ‘s’ from https then I see some response “http://localhost/Piwiktest/piwik.js

can I any one guide me, what I am doing wrong here?

Hi,

ERR_CONNECTION_REFUSED sounds like there is no server listening. Are you sure your server (on localhost) is set up to listen to port 443 and use HTTPS?

if I add port 443 and use HTTPS than i am getting below error message:

(index):54 GET https://localhost/Piwiktest/piwik.js net::ERR_INSECURE_RESPONSE

This probably means that even though you are using HTTPS the request is still insecure for some reason.

You can check the security tab of chrome for more information (net::ERR_INSECURE_RESPONSE in Chrome - Stack Overflow) or if your piwik instance is on the internet you can check the config here: SSL Server Test (Powered by Qualys SSL Labs)

Possible reasons are:

  • a self signed certificate
  • a certificate for another hostname
  • an expired certificate
  • an insecure server config

i am very new to all these techinical stuff… would you like to have a look? :slight_smile:

I’m afraid your page is only reachable from your end, otherwise you could have send me the url to your piwik.js per direct message.

Why is your piwik server on localhost? That way your visiters aren’t able to reach it, or am I missing something?

actually I am doing POC and thought to have do it my local machine instead of using any servers, i have MYSQL and IIS both on my local machine.

will make it any difference?

As long as you are only testing localhost should be working fine.

Just keep in mind that you can’t get an valid https certificate for localhost (except for a self signed)

so what should be the solution for the below issue?

(index):54 GET https://localhost/Piwiktest/piwik.js net::ERR_INSECURE_RESPONSE

What happens if you try to directly open the Piwik.js url?

if I enter “https://localhost/Piwiktest/piwik.js” in my browser it is showing error but if i remove ‘s’ from https then I see some response “http://localhost/Piwiktest/piwik.js”

Can you click on proceed anyway or something like this (maybe hidden under details) on the error page.

Otherwise just ignore https and use http. As long as it is local testing it doesn’t really matter.

i really dont know how to make https, as it always coming as https

One question, i have copied the Piwik file to the machine directly and didn’t use FTP client. I assume that it will not make any difference but just wanted to make sure, if I am missing something,…

It doesn’t matter how you upload the files (and if something went wrong Piwik would have warned you).

1 Like

now i have another problem, i am only able to record the HIT from chrome browser. if I am using different browser i am not able to record the HIT…

Do you get an error in the console of the developer tools in the other browsers? Is it possible that Do-Not-Track is enabled there?