baetyl / baetyl Goto Github PK
View Code? Open in Web Editor NEWExtend cloud computing, data and service seamlessly to edge devices.
Home Page: https://baetyl.io/
License: Apache License 2.0
Extend cloud computing, data and service seamlessly to edge devices.
Home Page: https://baetyl.io/
License: Apache License 2.0
[root@localhost OpenEdge]# bin/openedge
DEBU[2019-01-16T05:48:30-05:00] work dir: /home/OpenEdge openedge=master
INFO[2019-01-16T05:48:30-05:00] network (23f72b44b7cd:openedge) exists mode=docker openedge=master
INFO[2019-01-16T05:48:30-05:00] all resident modules stopped mode=docker openedge=master
INFO[2019-01-16T05:48:30-05:00] all temporary modules stopped mode=docker openedge=master
failed to create master: listen unix var/run/openedge.sock: bind: address already in use
DEL var/run/openedge.sock file and can SKIP this error.
根据“帮助文档 > 产品文档 > 智能边缘Baidu IntelliEdge > 本地快速部署”步骤
xxx:~/bie$ bin/openedge -w .
INFO[2019-01-02T17:43:34+08:00] network (bdacae1d0cd8:openedge) exists mode=docker openedge=master
WARN[2019-01-02T17:43:44+08:00] failed to prepare entries error="Error response from daemon: Get https://hub.baidubce.com/v2/: net/http: TLS handshake timeout;Error response from daemon: Get https://hub.baidubce.com/v2/: net/http: TLS handshake timeout;Error response from daemon: Get https://hub.baidubce.com/v2/: net/http: TLS handshake timeout;Error response from daemon: Get https://hub.baidubce.com/v2/: net/http: TLS handshake timeout;" mode=docker openedge=master
WARN[2019-01-02T17:43:44+08:00] failed to create container error="Error: No such image: hub.baidubce.com/openedge/openedge-hub:0.1.1" module=myBieLocalHub openedge=master
WARN[2019-01-02T17:43:44+08:00] failed to create container again error="Error: No such image: hub.baidubce.com/openedge/openedge-hub:0.1.1" module=myBieLocalHub openedge=master
ERRO[2019-01-02T17:43:44+08:00] failed to start resident module (myBieLocalHub) error="Error: No such image: hub.baidubce.com/openedge/openedge-hub:0.1.1" mode=docker openedge=master
failed to start master: Error: No such image: hub.baidubce.com/openedge/openedge-hub:0.1.1
INFO[2019-01-02T17:43:44+08:00] resident module (myBieLocalHub) stopped mode=docker openedge=master
INFO[2019-01-02T17:43:44+08:00] all resident modules stopped mode=docker openedge=master
INFO[2019-01-02T17:43:44+08:00] all temporary modules stopped mode=docker openedge=master
环境描述:
硬件:AMD64
OS:Ubuntu 18.04
Docker:
------
Client:
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:49:01 2018
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:16:44 2018
OS/Arch: linux/amd64
Experimental: false
Describe the bug
I follow the official document to try to test mqtt connection to localhub .
mqtt box report "bad user name or password".
the localhub's log as follow:
time="2019-01-16T08:54:32Z" level=error msg="username (test) or password not permitted" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:32Z" level=info msg="session closing, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:32Z" level=debug msg="will message removed: id=" component=recorder module=localhub
time="2019-01-16T08:54:32Z" level=info msg="session closed, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:33Z" level=debug msg="received: <Connect ClientID="3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150" KeepAlive=10 Username="test" Password="be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912" CleanSession=true Will=nil Version=4>" module=localhub mqtt=session
time="2019-01-16T08:54:33Z" level=error msg="username (test) or password not permitted" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:33Z" level=info msg="session closing, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:33Z" level=debug msg="will message removed: id=" component=recorder module=localhub
time="2019-01-16T08:54:33Z" level=info msg="session closed, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:34Z" level=debug msg="received: <Connect ClientID="3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150" KeepAlive=10 Username="test" Password="be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912" CleanSession=true Will=nil Version=4>" module=localhub mqtt=session
time="2019-01-16T08:54:34Z" level=error msg="username (test) or password not permitted" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:34Z" level=info msg="session closing, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:34Z" level=debug msg="will message removed: id=" component=recorder module=localhub
time="2019-01-16T08:54:34Z" level=info msg="session closed, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:35Z" level=debug msg="received: <Connect ClientID="3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150" KeepAlive=10 Username="test" Password="be178c0543eb17f5f3043021c9e5fcf30285e557a4fc309cce97ff9ca6182912" CleanSession=true Will=nil Version=4>" module=localhub mqtt=session
time="2019-01-16T08:54:35Z" level=error msg="username (test) or password not permitted" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:35Z" level=info msg="session closing, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
time="2019-01-16T08:54:35Z" level=debug msg="will message removed: id=" component=recorder module=localhub
time="2019-01-16T08:54:35Z" level=info msg="session closed, messages (unack): 0" client=3e0b1aaa-5851-4019-a767-1d1895fe16df1547628486150 module=localhub mqtt=session
To Reproduce
Steps to reproduce the behavior:
OS-platform (please complete the following information):
localhub configuration
var/db/openedge/module/localhub/model.yml
root@raspberrypi:/usr/local/gowork/src/github.com/baidu/openedge# openedge -w example/docker/
Error: unknown shorthand flag: 'w' in -w
Usage:
openedge [command]
Available Commands:
help Help about any command
start start openedge on background
stop stop openedge and all services
version Show the OpenEdge version information
Flags:
-h, --help help for openedge
Use "openedge [command] --help" for more information about a command.
2019/03/29 13:54:41 unknown shorthand flag: 'w' in -w
参照从源码编译文档入门,docker 镜像生成成功,make install正常,运行程序就是上面这段,请问是我那一部分没有操作对吗?
Describe the bug
在测试云端与本地连接的阶段已经成功连通云端与本地的连接,测试时通过MQTTBox连接本地local-hub使用MQTT.fx连接天工云,本地只运行两个模块local-hub和remote模块,remote模块连接天工云并订阅远程的 't' 主题,连接本地local-hub订阅 'topic' 主题,测试阶段使用MQTTBox发送消息到云端MQTT.fx可以正常接收,但使用MQTT.fx发送 't' 主题消息时,本地接收的消息一直循环,使用天工云网站的测试连接发送消息也是同样的结果。
配置与循环界面截图如下
remote配置
local-hub配置
消息循环
使用天工云测试也出现循环
All document in English.
我在搭建openedge平台的过程中遇到了下面的问题:
编译openedge时make depends时godep restore出错,报以下错误:
godep: error downloading dep (golang.org/x/crypto/ssh/terminal): unrecognized import path "golang.org/x/crypto/ssh/terminal"
godep: error downloading dep (golang.org/x/net/context): unrecognized import path "golang.org/x/net/context"
godep: error downloading dep (golang.org/x/net/context/ctxhttp): unrecognized import path "golang.org/x/net/context/ctxhttp"
godep: error downloading dep (golang.org/x/net/http/httpguts): unrecognized import path "golang.org/x/net/http/httpguts"
godep: error downloading dep (golang.org/x/net/http2): unrecognized import path "golang.org/x/net/http2"
godep: error downloading dep (golang.org/x/net/http2/hpack): unrecognized import path "golang.org/x/net/http2/hpack"
godep: error downloading dep (golang.org/x/net/idna): unrecognized import path "golang.org/x/net/idna"
godep: error downloading dep (golang.org/x/net/internal/socks): unrecognized import path "golang.org/x/net/internal/socks"
也尝试了网上提供的各种方法,但是还是没有解决
Currently according to user guide, MQTT client can access openedge_function via openedge_hub.
The data path is: MQTT client -> openedge_hub -> openedge_function -> openedge_hub->MQTT Client
if the MQTT client wants to access openedge_funcation via baidu_iothub, it will not work
The expected data path is: MQTT client -> iothub -> openedge_remote_mqtt -> openedge_hub->openedge_function.
Is your feature request related to a problem? Please describe.
Openedge framework is really nice, and easy to be ported to embedded system.
I really like the architecture in stead of kubernetes. And this is what I'm look for.
In most of the edge device, computing resources are limited.
Some heavy task, like video analysis, even the rtmp module is less efficiency.
In most of these case, people will use hardware accelerator to create their module on different platform, still c++ is the dominate language.
Describe the solution you'd like
An opensource project probably be hard to cover all these hardware platform, but a c++ example will be good enough to guide user to create their own customize module.
But anyway, openedge team is doing pretty good job. Congratulations!
root@raspberrypi:/usr/local/go/src/github.com/baidu/openedge# openedge -w example/docker
DEBU[2018-12-28T18:09:13+08:00] work dir: /usr/local/go/src/github.com/baidu/openedge/example/docker openedge=master
INFO[2018-12-28T18:09:13+08:00] network (835d9d5851b5:openedge) exists mode=docker openedge=master
WARN[2018-12-28T18:09:17+08:00] failed to prepare entries error="Error response from daemon: pull access denied for openedge-hub, repository does not exist or may require 'docker login';Error response from daemon: pull access denied for openedge-function, repository does not exist or may require 'docker login';" mode=docker openedge=master
INFO[2018-12-28T18:09:20+08:00] container started cid=f6ddd03911f2 module=localhub openedge=master
INFO[2018-12-28T18:09:20+08:00] resident module (localhub) started mode=docker openedge=master
WARN[2018-12-28T18:09:20+08:00] failed to create container error="Error response from daemon: NanoCPUs can not be set, as your kernel does not support CPU cfs period/quota or the cgroup is not mounted" module=localfunc openedge=master
WARN[2018-12-28T18:09:20+08:00] failed to create container again error="Error response from daemon: NanoCPUs can not be set, as your kernel does not support CPU cfs period/quota or the cgroup is not mounted" module=localfunc openedge=master
ERRO[2018-12-28T18:09:20+08:00] failed to start resident module (localfunc) error="Error response from daemon: NanoCPUs can not be set, as your kernel does not support CPU cfs period/quota or the cgroup is not mounted" mode=docker openedge=master
failed to start master: Error response from daemon: NanoCPUs can not be set, as your kernel does not support CPU cfs period/quota or the cgroup is not mounted
INFO[2018-12-28T18:09:20+08:00] resident module (localfunc) stopped mode=docker openedge=master
INFO[2018-12-28T18:09:21+08:00] container exited: { 2} cid=f6ddd03911f2 module=localhub openedge=master
INFO[2018-12-28T18:09:21+08:00] container stopped cid=f6ddd03911f2 module=localhub openedge=master
INFO[2018-12-28T18:09:21+08:00] container removed cid=f6ddd03911f2 module=localhub openedge=master
INFO[2018-12-28T18:09:21+08:00] resident module (localhub) stopped mode=docker openedge=master
INFO[2018-12-28T18:09:21+08:00] all resident modules stopped mode=docker openedge=master
INFO[2018-12-28T18:09:21+08:00] all temporary modules stopped mode=docker openedge=master
native模式运行没问题
您好,请问能否提供一下官方本地视频接入模块的测试样例,目前在云端与本地进行测试,其他的模块都可以进行测试,如计算模块可以测试函数,local-hub可以通过MQTTBox进行测试,但视频接入模块却没找到相关的测试案例说明,不知道这个模块该如何进行测试,希望能够提供一下相关的说明,谢谢您!
add new running mode on k3s, introduce features from k3s, for example support tp run service cross devices.
Describe the bug
函数多instance及timeout特性不符合预期
To Reproduce
某python函数配置多个实例以及timeout,配置如下
向source topic中依次发送4条消息
消息1:异常消息,发送后能够触发函数除0错误
消息2:异常消息,发送后触发函数执行超时
消息3:异常消息,发送后触发函数执行超时
消息4:正常消息,发送后能有正常返回
Expected behavior
函数最大实例为3,预期发完4条消息后能立马收到消息1和消息4的执行结果
然后超时后,也就是10s后能收到消息2和消息3执行超时的结果
但实际执行过程中,如果发消息的间隔设置为1s或更少,整个过程只收到了一条消息
{"errorMessage":"[400] Error response from daemon: Conflict. The container name "/function-sayhi.f0" is already in use by container "696608d3b83c14a5e8744215522cd4a6b5090e436b9052174afdd2e0fdc656fb". You have to remove (or rename) that container to be able to reuse that name.","errorType":"*errors.errorString","functionMessage":{"Topic":"python/function/test","Payload":"eyJleGNlcHRpb24iOiJleGNlcHRpb24ifQ==","FunctionName":"sayhi","FunctionInvokeID":"3c4cf8cf-8810-4bb7-8173-5764692ae3fd"}} from topic python/function/result
日志如下:4个红框为4条消息
发消息间隔设置为3s,能收到第一条预期中的错误消息,后续没有消息
{"errorMessage":"rpc error: code = Unknown desc = Exception calling application: integer division or modulo by zero","errorType":"*status.statusError","functionMessage":{"Topic":"python/function/test","Payload":"eyJleGNlcHRpb24iOiJleGNlcHRpb24ifQ==","FunctionName":"sayhi","FunctionInvokeID":"65443b32-a830-40d7-8c6d-0b28e55de1ed"}}
日志如下:4个红框为4条消息,可以看到第一条消息重试了几次之后发送了结果
In this page:https://cloud.baidu.com/doc/BIE/BIEdownload.html#.E4.B8.8B.E8.BD.BDMQTT.fx.E5.AE.A2.E6.88.B7.E7.AB.AF
I download Python demo code.
I found this demo code doesn't support Certificate Auth. Only support Secret base Auth.
Suggestion:
MQTT remote module optimization, support multiple remotes and message router
PS: @chriswow for cloud support
More build, test and release scripts and documents
for example,openedge can use eclipse-mosquitto or influxdb images from hub.docker.com as modules directly in docker mode
use backoff for message republish in hub module.
in the past, the interval of republish is fixed.
related config: message:egress:qos1:retry:interval:20s
Pulling repository docker.io/library/golang
Tag alpine as builder not found in repository docker.io/library/golang
make[1]: *** [openedge-hub-image] 错误 1
make[1]:正在离开目录 `/home/chenjinyu/openedge/go/src/github.com/baidu/openedge/openedge-hub'
make: *** [openedge-hub-image] 错误 2
在make images报这个错,请问怎么解决呢?
for i, s := range c.Subscriptions {
output[i] = packet.Subscription{Topic: s.Topic, QOS: s.QOS}
}
trans/mqtt/launcher.go:35:3
func (l *Launcher) Launch(urlString string) (transport.Server, error) {
urlParts, err := url.ParseRequestURI(urlString)
if err != nil {
return nil, err
}
// 下方return语句, 返回值和参数都不对.
switch urlParts.Scheme {
case "tcp", "mqtt":
return transport.NewNetServer(urlParts.Host)
case "tls", "ssl", "mqtts":
return transport.NewSecureNetServer(urlParts.Host, l.TLSConfig)
case "ws":
return transport.NewWebSocketServer(urlParts.Host)
case "wss":
return transport.NewSecureWebSocketServer(urlParts.Host, l.TLSConfig)
}
return nil, transport.ErrUnsupportedProtocol
}
还有很多...
NodeJs runtime module
Support openedge master upgrade, start to ensure compatibility
add new running mode based on containerd and introduce CNI to eliminate virtual network overhead
Java runtime module
/usr/local
├── etc
│ └── openedge
│ └── openedge.yml
└── var
├── run
│ └── openedge.sock
├── log
│ └── openedge
│ ├── func-nyeosbbch
│ │ └── sayhi.log
│ ├── localfunc
│ │ └── localfunc.log
│ ├── localhub
│ │ └── localhub.log
│ └── openedge.log
└── db
└── openedge
├── volume
│ └── localhub
│ ├── msgqos1.db
│ ├── offset.db
│ └── session.db
└── module
├── module.yml
├── func-nyeosbbch
│ ├── __init__.py
│ ├── sayhi.py
│ └── sayhi.pyc
├── localfunc
│ └── module.yml
└── localhub
└── module.yml
By using sayhi in the example, tried function computing , but failed with ""errorMessage": "rpc error: code = Unknown desc = Exception calling application","
checked every step i have done, not find any clues, please help , thanks
Publish the command line and support background startup
Describe the bug
函数计算执行报错,具体日志如下
To Reproduce
函数计算部分的配置如下(缩进有些问题):
application.yml文件
services:
- name: function-manager
image: cp01-caas-registry.epc.baidu.com:8000/iottest/openedge-function-manager:latest
replica: 1
mounts:
- name: function-manager-conf
path: etc/openedge
readonly: true
- name: function-manager-log
path: var/log/openedge
- name: function-sayhi
image: cp01-caas-registry.epc.baidu.com:8000/iottest/openedge-function-python27:latest
replica: 0
mounts:
- name: function-sayhi-conf
path: etc/openedge
readonly: true
- name: function-sayhi-code
path: var/db/openedge/function-sayhi
readonly: true
volumes:
# function
- name: function-manager-conf
path: var/db/openedge/function-manager-conf
- name: function-manager-log
path: var/db/log/openedge/function-manager-log
- name: function-sayhi-conf
path: var/db/openedge/function-sayhi-conf
- name: function-sayhi-code
path: var/db/openedge/function-sayhi-code
var/db/openedge/function-manager-conf/service.yml文件
hub:
address: tcp://openedge_hub:8963
username: test
password: test
rules:
- clientid: rule-e1iluuac15
subscribe:
topic: python/function/test
qos: 1
function:
name: sayhi
publish:
topic: python/function/result
var/db/openedge/function-sayhi-conf/service.yml文件
functions:
- name: 'sayhi'
handler: 'sayhi.handler'
codedir: 'var/db/openedge/function-sayhi'
wanna try to run on Hi3559A dev board, some errors ocurred when starting openedge, do I miss some configs?
~ # openedge
DEBU[1970-01-01T01:44:01Z] work dir: /usr/local openedge=master
INFO[1970-01-01T01:44:01Z] entry (map[bin/openedge-hub:{} bin/openedge-function:{}]) prepared mode=native openedge=master
DEBU[1970-01-01T01:44:01Z] bin/openedge-hub [localhub -c /usr/local/var/db/openedge/module/localhub/module.yml] mode=native openedge=master
INFO[1970-01-01T01:44:01Z] resident module (localhub) started mode=native openedge=master
DEBU[1970-01-01T01:44:01Z] bin/openedge-function [localfunc -c /usr/local/var/db/openedge/module/localfunc/module.yml] mode=native openedge=master
INFO[1970-01-01T01:44:01Z] resident module (localfunc) started mode=native openedge=master
INFO[1970-01-01T01:44:01Z] all resident modules started mode=native openedge=master
DEBU[1970-01-01T01:44:01Z] module starting module=localfunc
DEBU[1970-01-01T01:44:01Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:01Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc
DEBU[1970-01-01T01:44:01Z] delay reconnect: 500ms dispatcher=mqtt module=localfunc
DEBU[1970-01-01T01:44:01Z] task of routing message (Q0) begins component=sink module=localhub sink="$rule/msgqos0"
DEBU[1970-01-01T01:44:01Z] task of processing message from channel (Q1) begins component=rule module=localhub target="$rule/topic"
DEBU[1970-01-01T01:44:01Z] task of processing message from channel (Q1) begins component=rule module=localhub target="$rule/msgqos0"
DEBU[1970-01-01T01:44:01Z] task of waiting acknowledge begins component=rule module=localhub target="$rule/msgqos0"
DEBU[1970-01-01T01:44:01Z] task of processing message from channel (Q0) begins component=rule module=localhub target="$rule/msgqos0"
DEBU[1970-01-01T01:44:01Z] task of waiting acknowledge begins component=rule module=localhub target="$rule/topic"
DEBU[1970-01-01T01:44:01Z] task of routing message (Q1) begins with offset=1 component=sink module=localhub sink="$rule/topic"
DEBU[1970-01-01T01:44:01Z] task of processing message from channel (Q0) begins component=rule module=localhub target="$rule/topic"
DEBU[1970-01-01T01:44:01Z] 1 offset(s) persisted: map[$rule/topic:0] component=broker module=localhub
DEBU[1970-01-01T01:44:01Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:01Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc
DEBU[1970-01-01T01:44:01Z] delay reconnect: 1s dispatcher=mqtt module=localfunc
DEBU[1970-01-01T01:44:02Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:02Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc
DEBU[1970-01-01T01:44:02Z] delay reconnect: 2s dispatcher=mqtt module=localfunc
DEBU[1970-01-01T01:44:04Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:04Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc
DEBU[1970-01-01T01:44:04Z] delay reconnect: 4s dispatcher=mqtt module=localfunc
DEBU[1970-01-01T01:44:08Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:08Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc
DEBU[1970-01-01T01:44:08Z] delay reconnect: 8s dispatcher=mqtt module=localfunc
DEBU[1970-01-01T01:44:16Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:16Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc
DEBU[1970-01-01T01:44:16Z] delay reconnect: 16s dispatcher=mqtt module=localfunc
DEBU[1970-01-01T01:44:32Z] next reconnect dispatcher=mqtt module=localfunc
ERRO[1970-01-01T01:44:32Z] failed to create new client dispatcher=mqtt error="dial tcp :1883: connect: invalid argument" module=localfunc
When i config remotehub module in openedge.
I found if i want to remote connec to baiddu iothub base on cetificate, I not only need to config cert path, but also need to config username.
It is different from aws iot or azuer iot.
==module.yml========================
name: remotehub
hub:
address: tcp://localhub:1883
username: test
password: hahaha
remotes:
as the title says
make编译的时候报下面的错误
GO openedge
module/flag.go:60:30: flag.CommandLine.Output undefined (type *flag.FlagSet has no field or method Output, but does have flag.output)
Describe the bug
linux master server sock addr is invalid, file
master/master.go
c.Server = "unix://var/run/openedge.sock"
should be corrected as
c.Server = "unix:///var/run/openedge.sock"
Add validatesubs config to check mqtt client subscribe result or not.
If validatesubs is true, client will exit when receive suback with qos failure; else ignore qos failure and keep running.
Describe the bug
参考https://openedge.tech/docs/customize/How-to-write-a-python-script-for-python-runtime
编写Python脚本引入第三方库时,无法得到正常返回值。
localfunc/module.yml
hub:
address: tcp://localhub:1883
username: test
password: hahaha
rules:
- id: rule-e1iluuac1
subscribe:
topic: t
qos: 1
compute:
function: sayhi
publish:
topic: t/hi
qos: 1
- id: rule-get
subscribe:
topic: get
qos: 1
compute:
function: getheader
publish:
topic: get/header
qos: 1
functions:
- id: func-nyeosbbch
name: 'sayhi'
runtime: 'python27'
handler: 'sayhi.handler'
codedir: 'var/db/openedge/module/func-nyeosbbch'
entry: "hub.baidubce.com/openedge/openedge-function-runtime-python27:0.1.1"
env:
USER_ID: acuiot
instance:
min: 0
max: 10
timeout: 1m
cpu:
cpus: 0.5
memory:
limit: 50m
- id: func-get
name: 'getheader'
runtime: 'python27'
handler: 'getheader.handler'
codedir: 'var/db/openedge/module/func-get'
entry: "hub.baidubce.com/openedge/openedge-function-runtime-python27:0.1.1"
env:
USER_ID: acuiot
instance:
min: 0
max: 10
timeout: 1m
cpu:
cpus: 0.5
memory:
limit: 50m
logger:
path: var/log/openedge/localfunc/localfunc.log
console: true
level: "debug"
func-get/getheader.py
#!/usr/bin/env python
import requests
def handler(event, context):
"""
data: {"action": "A"}
"""
if 'action' in event:
if event['action'] == 'A':
r = requests.get('https://openedge.tech')
if str(r.status_code) == '200':
event['info'] = r.headers
else:
event['info'] = 'exception found'
else:
event['info'] = 'action error'
else:
event['error'] = 'action not found'
return event
if __name__ == "__main__":
event = {"action": "A"}
print handler(event, None)```
目录结构:
.
├── bin
│ └── openedge
├── etc
│ └── openedge
│ └── openedge.yml
└── var
├── db
│ └── openedge
│ ├── module
│ │ ├── func-get
│ │ │ ├── __init__.py
│ │ │ ├── certifi
│ │ │ ├── chardet
│ │ │ ├── getheader.py
│ │ │ ├── idna
│ │ │ ├── module.yml
│ │ │ ├── requests
│ │ │ └── urllib3
│ │ ├── func-nyeosbbch
│ │ │ ├── __init__.py
│ │ │ ├── module.yml
│ │ │ └── sayhi.py
│ │ ├── localfunc
│ │ │ └── module.yml
│ │ ├── localhub
│ │ │ └── module.yml
│ │ └── module.yml
│ └── volume
│ ├── func-get
│ ├── func-nyeosbbch
│ ├── localfunc
│ └── localhub
│ ├── msgqos1.db
│ ├── offset.db
│ └── session.db
├── log
│ └── openedge
│ ├── func-get
│ │ └── getheader.log
│ ├── func-nyeosbbch
│ │ ├── sayhi.log
│ │ └── sayhi.log.2019-01-29_09
│ ├── localfunc
│ │ └── localfunc.log
│ ├── localhub
│ │ └── localhub.log
│ └── openedge.log
└── run
└── openedge.sock
![image](https://user-images.githubusercontent.com/3654864/51964703-460bef80-24a2-11e9-81c3-60a933c8c5e1.png)
**OS-platform (please complete the following information):**
- OS: Darwin
- OpenEdge Version [0.1.1]
**Additional context**
希望可以找到可以运行错误的日志,docker运行时一闪而过,日志看不到。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.