Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

execute wait long time #35

Closed
liyongcun opened this issue Apr 9, 2018 · 1 comment
Closed

execute wait long time #35

liyongcun opened this issue Apr 9, 2018 · 1 comment

Comments

@liyongcun
Copy link

[root@lyc tmp]# python
Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from clickhouse_driver import Client
client = Client('192.168.133.2',18123,'client_report','admin','************',insert_block_size=1)
client.execute('SHOW TABLES')
^CTraceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.6/site-packages/clickhouse_driver/client.py", line 159, in execute
self.connection.force_connect()
File "/usr/lib/python2.6/site-packages/clickhouse_driver/connection.py", line 122, in force_connect
self.connect()
File "/usr/lib/python2.6/site-packages/clickhouse_driver/connection.py", line 188, in connect
self.receive_hello()
File "/usr/lib/python2.6/site-packages/clickhouse_driver/connection.py", line 263, in receive_hello
packet_type = read_varint(self.fin)
File "/usr/lib/python2.6/site-packages/clickhouse_driver/reader.py", line 29, in read_varint
i = _read_one(f)
File "/usr/lib/python2.6/site-packages/clickhouse_driver/reader.py", line 14, in _read_one
c = f.read(1)
File "/usr/lib64/python2.6/socket.py", line 383, in read
data = self._sock.recv(left)
KeyboardInterrupt

@xzkostyan
Copy link
Member

It seems that you're using forwarded HTTP port (18123) (original is 8123). Use TCP (9000) instead. https://github.com/mymarilyn/clickhouse-driver#client-parameters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants