How to fix connection error from a local machine to influxdb on the host server

Hi all

I’m trying to connect from my local machine to influxdb on the host server using python.
However, I can’t make a connection and get error messages.

This is the code what I tried to connect to.(I’ve changed a http port because another service already used that port)

client = InfluxDBClient(host=‘10.x.x.x’, port=7086, username=‘user of host server’, password=‘p/w of host server’, database=‘test_hd’)
client.ping()

and then, I’ve got a message like below.(sorry for in korean)


TimeoutError Traceback (most recent call last)
C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\urllib3\connection.py in _new_conn(self)
159 conn = connection.create_connection(
–> 160 (self._dns_host, self.port), self.timeout, **extra_kw)
161

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\urllib3\util\connection.py in create_connection(address, timeout, source_address, socket_options)
79 if err is not None:
—> 80 raise err
81

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\urllib3\util\connection.py in create_connection(address, timeout, source_address, socket_options)
69 sock.bind(source_address)
—> 70 sock.connect(sa)
71 return sock

TimeoutError: [WinError 10060] 연결된 구성원으로부터 응답이 없어 연결하지 못했거나, 호스트로부터 응답이 없어 연결이 끊어졌습니다

During handling of the above exception, another exception occurred:

I’m not sure whether I can utilize “influxdbClient” or not when connect from local to remote host.
Could you help me to solve this problem?
I appreciate in advance.

Hi @Jhyeon,

Can you try with
curl -sl -I http://yourdatabasehost:7086/ping ?

Best regards

Hi @MarcV

I made a fool mistake of not opened the port “7086”.
I’ve registered to open it, so I’m waiting the process.
Thanks for your kind.

That will solve your problem :slight_smile:
Thanks for your feedback and
have a Nice day