Comments (11)
root@438a64d19d4c:~/opentick/bindings/python# python test.py
2019-12-26 05:58:26,899 [MainThread ] [INFO ] OpenTick: connecting
2019-12-26 05:58:26,899 [MainThread ] [ERROR] [Errno 111] Connection refused
Traceback (most recent call last):
File "test.py", line 31, in <module>
res = conn.execute('create database if not exists test')
File "/home/jovyan/opentick/bindings/python/opentick/client.py", line 208, in execute
return self.execute_async(sql, args, cache).get(self.__default_timeout)
File "/home/jovyan/opentick/bindings/python/opentick/client.py", line 224, in execute_async
self.__send(cmd)
File "/home/jovyan/opentick/bindings/python/opentick/client.py", line 418, in __send
raise e
File "/home/jovyan/opentick/bindings/python/opentick/client.py", line 415, in __send
n2 = self.__sock.send(out)
BrokenPipeError: [Errno 32] Broken pipe
from opentick.
这个问题似乎是在docker里面才会出现, 在docker外面的ubuntu中部署并不会出现
from opentick.
但是docker外的部署出现了新问题: 这个1116的监听虽然在0.0.0.0上, 但是如果是本机的测试就可以正常连接并测试 如果是局域网联入的测试, 就会报no permission
PS E:\opentick> & C:/ProgramData/Anaconda3/python.exe e:/opentick/bindings/python/test.py
2019-12-26 06:47:59,296 [MainThread ] [INFO ] OpenTick: connecting
2019-12-26 06:47:59,304 [MainThread ] [INFO ] OpenTick: connected
2019-12-26 06:47:59.316862 No permisssion
from opentick.
以下是和server在一个机器上的测试 就可以通过 比较神奇 局域网为啥不能通过呢
局域网是可以连接 connected 但是不能执行语句
no permission
root@yutiansut:/home/yutiansut/opentick/bindings/python# python3 test.py
2019-12-25 17:59:38,513 [MainThread ] [INFO ] OpenTick: connecting
2019-12-25 17:59:38,513 [MainThread ] [INFO ] OpenTick: connected
2019-12-25 17:59:38.536812 records deleted
2019-12-25 17:59:57.279248 0:00:18.742311 async done
2019-12-25 17:59:57.974756 0:00:00.695526 0:00:19.437837 0 100000 all insert futures get done
2019-12-25 18:00:01.874828 0:00:02.878566 async done
2019-12-25 18:00:02.042970 0:00:00.168162 0:00:03.046728 0 10 all batch insert futures get done
2019-12-25 18:00:05.985486 0:00:03.942502 100000 retrieved with ranges
2019-12-25 18:00:09.462081 0:00:03.476585 100000 retrieved with async
2019-12-25 18:00:13.115373 0:00:03.653290 100000 retrieved with one sync
2019-12-25 18:00:13.115492
2019-12-25 18:00:32.495821 0:00:19.380276 async done
2019-12-25 18:00:33.208636 0:00:00.712819 0:00:20.093095 1 100000 all insert futures get done
2019-12-25 18:00:37.080169 0:00:02.814740 async done
2019-12-25 18:00:37.257728 0:00:00.177560 0:00:02.992300 1 10 all batch insert futures get done
2019-12-25 18:00:45.193148 0:00:07.935418 200000 retrieved with ranges
2019-12-25 18:00:53.092402 0:00:07.899256 200000 retrieved with async
2019-12-25 18:01:00.399546 0:00:07.307144 200000 retrieved with one sync
2019-12-25 18:01:00.399631
2019-12-25 18:01:21.414671 0:00:21.014985 async done
2019-12-25 18:01:22.126454 0:00:00.711801 0:00:21.726786 2 100000 all insert futures get done
2019-12-25 18:01:26.028121 0:00:02.843198 async done
2019-12-25 18:01:26.187942 0:00:00.159803 0:00:03.003001 2 10 all batch insert futures get done
2019-12-25 18:01:36.779948 0:00:10.592018 300000 retrieved with ranges
2019-12-25 18:01:49.213686 0:00:12.433742 300000 retrieved with async
2019-12-25 18:02:00.452027 0:00:11.238339 300000 retrieved with one sync
2019-12-25 18:02:00.452111
2019-12-25 18:02:20.944493 0:00:20.492314 async done
2019-12-25 18:02:21.651794 0:00:00.707323 0:00:21.199637 3 100000 all insert futures get done
2019-12-25 18:02:25.684967 0:00:02.913955 async done
2019-12-25 18:02:25.837206 0:00:00.152250 0:00:03.066205 3 10 all batch insert futures get done
2019-12-25 18:02:41.780748 0:00:15.943532 400000 retrieved with ranges
from opentick.
因为本机连接不做用户权限检查,是为了能够通过本机连接设置用户权限。外机连接需要指定用户名和密码
from opentick.
没有测试过docker,应该是与代码里检查是否本机连接有关,不知道docker里拿到的ip是啥
from opentick.
https://github.com/opentradesolutions/opentick/blob/master/bindings/python/opentick/client.py 有用户设置相关函数
from opentick.
你也可以修改https://github.com/opentradesolutions/opentick/blob/master/user.go 里的GetPerm
函数,永远返回WritablePerm,把权限控制关掉
from opentick.
from opentick.
感谢🙏~ 大佬牛逼
from opentick.
@open-trade 感谢大佬 已成功
yutiansut@yutiandeMacBook-Pro python % python3 test.py
2019-12-28 00:10:12,336 [MainThread ] [INFO ] OpenTick: connecting
2019-12-28 00:10:12,339 [MainThread ] [INFO ] OpenTick: connected
2019-12-28 00:10:12.467167 records deleted
话说 大佬现在还在研究flutter嘛
from opentick.
Related Issues (3)
- Introduction of OpenTick? HOT 3
- Cannot build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentick.