# Can't connect to to chronograf from remote machine

**URL:** <https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333>\
**Category:** Dashboards\
**Created:** [July 1, 2019, 1:11pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333 "2019-07-01T13:11:04Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyled](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@kyled](https://community.influxdata.com/u/kyled)\
**Post date:** [July 1, 2019, 1:11pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/1 "2019-07-01T13:11:04Z")

</div>

Hello all! I currently have influxdb and chronograf running on a virtual machine. I have edited both configs so they bind to the machines public ip address. However, when I try to send a datapoint via http to influxdb or try and access chronograf from a remote machine it won’t let me. I don’t have auth configured, could that be the issue? Thanks in advance to all of those who reply.

---

<div class="post-metadata">

**Author:** ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.influxdata.com/u/Pooh)\
**Post date:** [July 1, 2019, 1:26pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/2 "2019-07-01T13:26:45Z")

</div>

> Hello all! I currently have influxdb and chronograf running on a virtual  
> machine. I have edited both configs so they bind to the machines public ip  
> address.

What does “netstat -lptn” tell you for those applications - do they appear  
actually to be listening on the correct address?

> However, when I try to send a datapoint via http to influxdb or  
> try and access chronograf from a remote machine it won’t let me.

What won’t let you? What happens? What goes wrong? What message do you  
receive?

> I don’t have auth configured, could that be the issue?

Possibly, depending on what the problem is. Tell us what happens when you try  
to connect and we might have a better idea.

PS: Does your virtual machine come with any firewall protection, and if so,  
have you opened up the appropriate ports for inbound traffic?

Antony.

---

<div class="post-metadata">

**Author:** ![kyled](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@kyled](https://community.influxdata.com/u/kyled)\
**Post date:** [July 1, 2019, 1:31pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/3 "2019-07-01T13:31:32Z")

</div>

Hi @Pooh

Performing `netstat -lptn` gives me the following:  
`tcp 0 0 public-ip-here:8086 0.0.0.0:* LISTEN 4034/influxd`  
`tcp 0 0 public-ip-here:8088 0.0.0.0:* LISTEN 4034/influxd`  
`tcp 0 0 public-ip-here:8888 0.0.0.0:* LISTEN 3990/chronograf`

I currently do not have a firewall set up… Should I try doing that then give my IP address access?

---

<div class="post-metadata">

**Author:** ![kyled](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@kyled](https://community.influxdata.com/u/kyled)\
**Post date:** [July 1, 2019, 1:40pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/4 "2019-07-01T13:40:25Z")

</div>

@Pooh I just enabled my Firewall, and have opened up port 8086 and 8888 to my remote machine.

---

<div class="post-metadata">

**Author:** ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.influxdata.com/u/Pooh)\
**Post date:** [July 1, 2019, 1:47pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/5 "2019-07-01T13:47:31Z")

</div>

> Hi @Pooh
> 
> Performing `netstat -lptn` gives me the following:

If you run the command as root, you can see the application names in the final  
column.

I find the first entry in your results very weird:

tcp 0 public-ip 0.0.0.0:\* LISTEN -

It’s telling us that somethng listening on your public IP address, but without  
any port number. That’s odd.

The only other port you have listening on the public IP is 8888 - is that the  
port number you configured Influx to use?

> I currently do not have a firewall set up… Should I try doing that then  
> give my IP address access?

No, if there is no firewall then adding one at this point will only complicate  
things. I’m assuming “no firewall” means “all traffic is allowed”.

However, once you’ve sorted out the problem and traffic is working, please do  
install a firewall to make the machine a bit more secure.

> > However, when I try to send a datapoint via http to influxdb or  
> > try and access chronograf from a remote machine it won’t let me.
> 
> What won’t let you? What happens? What goes wrong? What message do you  
> receive?
> 
> Tell us what happens when you try to connect and we might have a better  
> idea.

Antony.

---

<div class="post-metadata">

**Author:** ![kyled](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@kyled](https://community.influxdata.com/u/kyled)\
**Post date:** [July 1, 2019, 1:50pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/6 "2019-07-01T13:50:39Z")

</div>

Hi. @Pooh I have edited the previous post with the updated result from `netstat -lptn`

Chornograf is running fine on my VM, but when I try to access it via [http://public-ip-here:8888](http://public-ip-here:8888) on a remote machine, I get a chome error: This site can’t be reached

Then, when trying to send a datapoint via http using a simple python script I get a ConnectionTimeoutError.

---

<div class="post-metadata">

**Author:** ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.influxdata.com/u/Pooh)\
**Post date:** [July 1, 2019, 1:57pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/7 "2019-07-01T13:57:49Z")

</div>

> I just enabled my Firewall, and have opened up port 8086 and 8888 to  
> my remote machine.

Okay.

> Performing `netstat -lptn` gives me the following:  
> `tcp 0 0 public-ip-here:8086 0.0.0.0:* LISTEN 4034/infl uxd` `tcp 0 0 public-ip-here:8088 0.0.0.0:* LISTEN 4034/infl uxd` `tcp 0 0 public-ip-here:8888 0.0.0.0:* LISTEN 3990/chro nograf`

That looks a lot better.

Now - what happens when you try to send a data point?

Please don’t just say “it doesn’t work” - tell us what error message you get,  
or anything else you can spot which tells us what is or isn’t happening.

Also, if you try the identical command on the VM itself (still using the  
public IP address), is there any difference in the outcome?

Antony.

---

<div class="post-metadata">

**Author:** ![kyled](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@kyled](https://community.influxdata.com/u/kyled)\
**Post date:** [July 1, 2019, 2:02pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/8 "2019-07-01T14:02:00Z")

</div>

@Pooh I can access chronograf inside my virtual machine no problem. Still can’t access it from a remote machine, and I get the same error: `This site can’t be reached` from chrome.

Weirdly enough, both services are `active` running on my VM, however when I type `influx` on the VM, I get the following error: `Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: connect: connection refused Please check your connection settings and ensure 'influxd' is running.`

EDIT:

Executing the same python code to send a simple http request works on the VM

---

<div class="post-metadata">

**Author:** ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.influxdata.com/u/Pooh)\
**Post date:** [July 1, 2019, 2:29pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/9 "2019-07-01T14:29:53Z")

</div>

> Weirdly enough, both services are `active` running on my VM, however when I  
> type `influx` on the VM, I get the following error: `Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp 127.0.0.1:8086: connect: connection refused Please check your connection settings and ensure 'influxd' is running.`

Note that this is trying to connect to localhost (127.0.0.1).

> Executing the same python code to send a simple http request works on the  
> VM

Whereas _that_ connects to the public IP address.

> > Performing `netstat -lptn` gives me the following:  
> > `tcp 0 0 public-ip-here:8086 0.0.0.0:* LISTEN 4034/influxd`

That tells you that Infux is listening on the public IP address. It is not  
listening on the localhost address, so you cannot reach it on 127.0.0.1:8086

Maybe you’d be better telling Influx simply to listen on all interfaces, then  
you can connect to it on both localhost and the public IP.

Antony.

---

<div class="post-metadata">

**Author:** ![kyled](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@kyled](https://community.influxdata.com/u/kyled)\
**Post date:** [July 1, 2019, 3:30pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/10 "2019-07-01T15:30:06Z")

</div>

@Pooh, so I set the bind address for both influxdb and chronograf to both my public ip and my local ip.

 ![netstat](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/0/0e1238b98d076a19e5c93a28e30fbe90e5c1d73f.png)

I still can not connect to chorongraf from my remote machine.

---

<div class="post-metadata">

**Author:** ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.influxdata.com/u/Pooh)\
**Post date:** [July 1, 2019, 4:38pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/11 "2019-07-01T16:38:36Z")

</div>

Well, all I can say is that this has to be a networking problem, not an Influx  
or Chronograf one.

You know you can connect to both on the VM itself, so they’re running  
properly.

You can SSH to the machine (at least, I assume that’s how you’re logged in to  
it?), so we know that it does have network connectivity.

And yet you can’t connect to Influx or Chronograf from an external address,  
which makes me think yet again about some firewall in the way.

Can you install nmap on the machine you’re trying to connect _from_ and see  
what “nmap -sS -P0 tar.get.add.ress” shows you (where tar.get.add.ress is the  
public IP of the machine we’re talking about and trying to connect to)?

Antony.

---

<div class="post-metadata">

**Author:** ![kyled](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@kyled](https://community.influxdata.com/u/kyled)\
**Post date:** [July 1, 2019, 4:49pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/12 "2019-07-01T16:49:37Z")

</div>

@Pooh Thank you for the help. The issue had to do with port forwarding from the guest to the host machine. Everything works as it should now.

---

<div class="post-metadata">

**Author:** ![Pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@Pooh](https://community.influxdata.com/u/Pooh)\
**Post date:** [July 1, 2019, 5:06pm UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/13 "2019-07-01T17:06:00Z")

</div>

I wonder how you’re managing to do port forwarding when the VM server has the  
public IP address on it.

Port forwarding would normally imply that the virtualisation host has the  
public IP, and the VM guest has a private IP to which connections are being  
translated.

What virtualisation environment are you using?

Antony.

---

<div class="post-metadata">

**Author:** ![kyled](https://avatars.discourse-cdn.com/v4/letter/k/fbc32d/32.png) [@kyled](https://community.influxdata.com/u/kyled)\
**Post date:** [July 2, 2019, 11:33am UTC](https://community.influxdata.com/t/cant-connect-to-to-chronograf-from-remote-machine/10333/14 "2019-07-02T11:33:34Z")

</div>

I am using Virtual Box on my host machine… Not the cleanest solution but it works. I am just trying to imitate a server, by having a raspberry pi send the data to the Virtual Machine running the influxdb instance.
