Giter Club home page Giter Club logo

Comments (3)

tongtongxiaopeng1979 avatar tongtongxiaopeng1979 commented on June 1, 2024

==========Function config file======================
id: f9b3d8e7aea34b158773d714c357fb63
mark: modu-bkmu1jml8
name: edgeFuncSayhi
hub:
clientid: 978f71c22a90468a9bd2231ed435eb2b
address: 'tcp://edgeLocalHub:1883'
username: rtt
password: f786228d9eab434db0bc151292050391
meta:
name: rtt
logger:
path: var/log/edgeFuncSayhi.log
rules:

  • id: rule-pw0pnkbf6
    subscribe:
    topic: t
    qos: 0
    compute:
    function: sayhi-1
    publish:
    topic: t/py
    qos: 0
    functions:
  • id: func-1a5wy169g
    name: sayhi-1
    runtime: python2.7
    handler: index.handler
    codedir: app/func-1a5wy169g
    entry: 'hub.baidubce.com/openedge/openedge_function_runtime_python2.7:0.1.0'
    instance:
    min: 1
    max: 10
    timeout: 30s
    message:
    length:
    max: 4m
    meta:
    source: cfc
    name: sayhi
    version: '1'

==================local hub config file==================
id: e4a1cfd9347047c0b8f4717288f25c64
mark: modu-ond4778r5
name: edgeLocalHub
listen:

  • 'tcp://:1883'
  • 'ssl://:1884'
  • 'ws://:8080/mqtt'
  • 'wss://:8884/mqtt'
    certificate:
    ca: app/cert-i9jao01lr/ca.pem
    cert: app/cert-i9jao01lr/server.pem
    key: app/cert-i9jao01lr/server.key
    message:
    length:
    max: 32k
    logger:
    path: var/log/edgeLocalHub.log
    principals:
  • username: rtt
    password: 52ced4555bc22e2a14fc8dc8d9e5a0fd60ed67b0603cfe70fa5c7fe8a9d6abaf
    permissions:
    • action: pub
      permit:
      • hello
      • t
      • t/py
    • action: sub
      permit:
      • hello
      • t
      • t/py

=========sayhi log==========

time="2018-12-26T04:00:12Z" level=error msg="Failed to talk with function instance" error="rpc error: code = Unknown desc = Exception calling application: 'USER_ID'" function=sayhi-1 module=edgeFuncSayhi

============hub.log==============
time="2018-12-26T03:58:37Z" level=info msg="session connected successfully" client=978f71c22a90468a9bd2231ed435eb2b-rule-pw0pnkbf6 module=edgeLocalHub mqtt=session
time="2018-12-26T03:58:37Z" level=info msg="Topic subscribed" client=978f71c22a90468a9bd2231ed435eb2b-rule-pw0pnkbf6 module=edgeLocalHub mqtt=session topic=t
time="2018-12-26T03:59:59Z" level=info msg="session connected successfully" client=135d947e-d7b8-4eac-af44-4802275aa5601545796799927 module=edgeLocalHub mqtt=session
time="2018-12-26T04:00:04Z" level=info msg="Topic subscribed" client=135d947e-d7b8-4eac-af44-4802275aa5601545796799927 module=edgeLocalHub mqtt=session topic=t/py

============openedge log======
time="2018-12-26T11:53:09+08:00" level=info msg="network (a40902659071:openedge) exists" mode=docker openedge=master
time="2018-12-26T11:53:09+08:00" level=info msg="entry (map[]) prepared" mode=docker openedge=master
time="2018-12-26T11:53:09+08:00" level=info msg="all resident modules started" mode=docker openedge=master
time="2018-12-26T11:53:09+08:00" level=warning msg="failed to get gpu information" error="exit status 127: /bin/bash: nvidia-smi: command not found" openedge=master
time="2018-12-26T11:58:35+08:00" level=info msg="all resident modules stopped" mode=docker openedge=master
time="2018-12-26T11:58:35+08:00" level=info msg="all temporary modules stopped" mode=docker openedge=master
time="2018-12-26T11:58:36+08:00" level=info msg="entry (map[hub.baidubce.com/openedge/openedge_hub:0.1.0:{} hub.baidubce.com/openedge/openedge_function:0.1.0:{}]) prepared" mode=docker openedge=master
time="2018-12-26T11:58:37+08:00" level=info msg="container started" cid=b1d80ac13d9f module=edgeLocalHub openedge=master
time="2018-12-26T11:58:37+08:00" level=info msg="resident module (edgeLocalHub) started" mode=docker openedge=master
time="2018-12-26T11:58:37+08:00" level=info msg="container started" cid=46c5d36274b2 module=edgeFuncSayhi openedge=master
time="2018-12-26T11:58:37+08:00" level=info msg="resident module (edgeFuncSayhi) started" mode=docker openedge=master
time="2018-12-26T11:58:37+08:00" level=info msg="all resident modules started" mode=docker openedge=master
time="2018-12-26T11:58:37+08:00" level=info msg="app config (version:V1) loaded" openedge=master
time="2018-12-26T11:58:37+08:00" level=warning msg="failed to get gpu information" error="exit status 127: /bin/bash: nvidia-smi: command not found" openedge=master
time="2018-12-26T12:00:11+08:00" level=info msg="entry (map[hub.baidubce.com/openedge/openedge_function_runtime_python2.7:0.1.0:{}]) prepared" mode=docker openedge=master
time="2018-12-26T12:00:11+08:00" level=info msg="container started" cid=9ba1a3ebddab module=edgeFuncSayhi-sayhi-1-1 openedge=master
time="2018-12-26T12:00:11+08:00" level=info msg="temporary module (edgeFuncSayhi-sayhi-1-1) started" mode=docker openedge=master
time="2018-12-26T12:00:12+08:00" level=info msg="temporary module (edgeFuncSayhi-sayhi-1-1) stopped" mode=docker openedge=master
time="2018-12-26T12:00:12+08:00" level=info msg="container exited: { 0}" cid=9ba1a3ebddab module=edgeFuncSayhi-sayhi-1-1 openedge=master
time="2018-12-26T12:00:12+08:00" level=info msg="container stopped" cid=9ba1a3ebddab module=edgeFuncSayhi-sayhi-1-1 openedge=master
time="2018-12-26T12:00:12+08:00" level=info msg="container removed" cid=9ba1a3ebddab module=edgeFuncSayhi-sayhi-1-1 openedge=master

===========
if need more information, just let me know. thanks

from baetyl.

kuailehaibin avatar kuailehaibin commented on June 1, 2024

@tongtongxiaopeng1979

Hi, according to sayhi log, the problem is "Exception calling application: 'USER_ID'". The right way about variable "USER_ID" should be that:

  • firstly it shouble be defined in conf.yml(openedge_hub module config)
  • then it can be used in index.py

But, as the conf.yml(openedge_hub module config) you provide, it cannot be found.

Two methods to solve this problem:

  1. add "USER_ID" config info in conf.yml(openedge_hub module config), it can be found here
  2. add judgment logic at index.py.

That's all, many thanks for your problem feedback.

from baetyl.

tongtongxiaopeng1979 avatar tongtongxiaopeng1979 commented on June 1, 2024

thanks, it works according to your guide. :)

from baetyl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.