问题: oncedoc license授权版添加onceair隧穿远程访问支持


发布者 蓝澍黁  发布时间 1572154271787
关键字 二次开发  OnceAir 

oncedoc 硬件版本,安装官网最新2988版本后,无法使用原来的隧穿服务.

操作:

1. 将之前/onceai备份为了/onceaibak

2.按照教程安装了2988版本/onceai目录

3. 将/onceaibak中的 /onceaibak/oncedoc/mod/onceair目录copy回到/onceai/oncedoc/mod/onceair

4. 在/onceai/oncedoc目录下的USER_CONFIG文件中添加了onceair

5.在/onceai/oncedoc目录下的config中module——required部分添加了onceair

6.reboot

问题:

无法打开onceair隧穿功能。

(另外,查看onceair目录中的onceair.js,其中有验证license部分,是否该处与2988版本存在兼容问题。)

errorlog内容

 
{ [Error: ENOENT: no such file or directory, scandir '/onceai/oncedoc/mod/onceair/svr/mod/onceair/web']
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/onceai/oncedoc/mod/onceair/svr/mod/onceair/web' } '/onceai/oncedoc/mod/onceair/svr/mod/onceair/web'
{ [Error: ENOENT: no such file or directory, scandir '/onceai/oncedoc/mod/onceair/svr/mod/onceair/web']
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/onceai/oncedoc/mod/onceair/svr/mod/onceair/web' } '/onceai/oncedoc/mod/onceair/svr/mod/onceair/web'
(node:1149) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Error: Variable already exists in app.model: local
Error: Variable already exists in app.model: local
at Object.extendIfUndefined (/onceai/oncedoc/svr/onceio/onceio.js:1:436)
at ServerResponse.render (/onceai/oncedoc/svr/onceio/onceio.js:1:10003)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:619
at EventEmitter.checkRootFolder (/onceai/oncedoc/svr/oncedoc.js:1:7996)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:590
at /onceai/oncedoc/svr/oncedoc.util.js:1:8400
at try_callback (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:592:3)
at RedisClient.return_reply (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:714:4)
at ReplyParser.<anonymous> (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:321:8)
at ReplyParser.emit (events.js:198:13)
Error: Variable already exists in app.model: local
Error: Variable already exists in app.model: local
at Object.extendIfUndefined (/onceai/oncedoc/svr/onceio/onceio.js:1:436)
at ServerResponse.render (/onceai/oncedoc/svr/onceio/onceio.js:1:10003)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:619
at EventEmitter.checkRootFolder (/onceai/oncedoc/svr/oncedoc.js:1:7996)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:590
at /onceai/oncedoc/svr/oncedoc.util.js:1:8400
at try_callback (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:592:3)
at RedisClient.return_reply (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:714:4)
at ReplyParser.<anonymous> (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:321:8)
at ReplyParser.emit (events.js:198:13)
Error: Variable already exists in app.model: local
Error: Variable already exists in app.model: local
at Object.extendIfUndefined (/onceai/oncedoc/svr/onceio/onceio.js:1:436)
at ServerResponse.render (/onceai/oncedoc/svr/onceio/onceio.js:1:10003)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:619
at EventEmitter.checkRootFolder (/onceai/oncedoc/svr/oncedoc.js:1:7996)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:590
at /onceai/oncedoc/svr/oncedoc.util.js:1:8400
at try_callback (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:592:3)
at RedisClient.return_reply (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:714:4)
at ReplyParser.<anonymous> (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:321:8)
at ReplyParser.emit (events.js:198:13)
Error: Variable already exists in app.model: local
Error: Variable already exists in app.model: local
at Object.extendIfUndefined (/onceai/oncedoc/svr/onceio/onceio.js:1:436)
at ServerResponse.render (/onceai/oncedoc/svr/onceio/onceio.js:1:10003)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:619
at EventEmitter.checkRootFolder (/onceai/oncedoc/svr/oncedoc.js:1:7996)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:590
at /onceai/oncedoc/svr/oncedoc.util.js:1:8400
at try_callback (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:592:3)
at RedisClient.return_reply (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:714:4)
at ReplyParser.<anonymous> (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:321:8)
at ReplyParser.emit (events.js:198:13)
Error: Variable already exists in app.model: local
Error: Variable already exists in app.model: local
at Object.extendIfUndefined (/onceai/oncedoc/svr/onceio/onceio.js:1:436)
at ServerResponse.render (/onceai/oncedoc/svr/onceio/onceio.js:1:10003)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:619
at EventEmitter.checkRootFolder (/onceai/oncedoc/svr/oncedoc.js:1:7996)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:590
at /onceai/oncedoc/svr/oncedoc.util.js:1:8400
at try_callback (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:592:3)
at RedisClient.return_reply (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:714:4)
at ReplyParser.<anonymous> (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:321:8)
at ReplyParser.emit (events.js:198:13)
Error: Variable already exists in app.model: local
Error: Variable already exists in app.model: local
at Object.extendIfUndefined (/onceai/oncedoc/svr/onceio/onceio.js:1:436)
at ServerResponse.render (/onceai/oncedoc/svr/onceio/onceio.js:1:10003)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:619
at EventEmitter.checkRootFolder (/onceai/oncedoc/svr/oncedoc.js:1:7996)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:590
at /onceai/oncedoc/svr/oncedoc.util.js:1:8400
at try_callback (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:592:3)
at RedisClient.return_reply (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:714:4)
at ReplyParser.<anonymous> (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:321:8)
at ReplyParser.emit (events.js:198:13)
Error: Variable already exists in app.model: local
Error: Variable already exists in app.model: local
at Object.extendIfUndefined (/onceai/oncedoc/svr/onceio/onceio.js:1:436)
at ServerResponse.render (/onceai/oncedoc/svr/onceio/onceio.js:1:10003)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:619
at EventEmitter.checkRootFolder (/onceai/oncedoc/svr/oncedoc.js:1:7996)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:590
at /onceai/oncedoc/svr/oncedoc.util.js:1:8400
at try_callback (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:592:3)
at RedisClient.return_reply (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:714:4)
at ReplyParser.<anonymous> (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:321:8)
at ReplyParser.emit (events.js:198:13)
Error: Variable already exists in app.model: local
Error: Variable already exists in app.model: local
at Object.extendIfUndefined (/onceai/oncedoc/svr/onceio/onceio.js:1:436)
at ServerResponse.render (/onceai/oncedoc/svr/onceio/onceio.js:1:10003)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:619
at EventEmitter.checkRootFolder (/onceai/oncedoc/svr/oncedoc.js:1:7996)
at /onceai/oncedoc/mod/onceos/svr/onceos.main.js:1:590
at /onceai/oncedoc/svr/oncedoc.util.js:1:8400
at try_callback (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:592:3)
at RedisClient.return_reply (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:714:4)
at ReplyParser.<anonymous> (/onceai/oncedoc/svr/oncedb/node_modules/oncedb-client/index.js:321:8)
at ReplyParser.emit (events.js:198:13)





回复 (5)
  • #
  • #1 wx_15926 1572167662231

    1. USER_CONFIG和 config.js 只面只需要改一处就可以了,因为模块加载了两次,所以出了重复翻译的ERROR,不过不影响使用。

    Error: Variable already exists in app.model: local

    2. build.2800 以后的模块注册加载的路径机制改过了,由绝对目录改成了相对当前目录。

    \onceai\oncedoc\mod\onceair\svr\onceair.js

    中最新的应该是

    app.mod('onceair', '../web')

    以前是绝对目录。改成这样可能可以解决。

    下周我们把最新的onceair模块单独编出来发给你吧。

  • #2 wx_15926 1572229495410

    可以试试这个压缩包: http://onceoa.com/download/onceair.zip

  • #3 ptlddn 1572248542598

    谢谢,已经安装了最新版本的onceair,在“设置”的“服务"里也出现了内网穿透的选项 ”禁用外网访问 (内网穿透)“选的”否“,然后SSH远程登录和数据库远程登陆都打开了,网页端口8064.

    1.现在问题是,在onceair.com网站绑定的网卡mac地址不变,但是无法连接上,上面显示最后在线时间10月25,

    2.然后,同一局域网使用局域网查找,找不到onceair(2520版本的时候可以找到),同一件设备,隧穿的设置可能没有真正工作起来。

    3. 另外提个建议,优化下控制面板中的选项,把第一个”系统“更改为”状态”或“性能“,第二个”系统“换成”应用或服务“最后的”服务“才应该改成”系统设置“。误解的可能性会更小。

  • #4 wx_15926 1572260380486

    感谢建议,会考虑更改。

    你提到的问题,可能是服务器指向错误,可以尝试手动更改config.js: 将 MAIN_CONFIG.remoteSvr 改成 http://onceair.com

     

    var MAIN_CONFIG = {
    //domain name of this server
    mainSvr : 'localhost:' + ONCEIO_CONFIG.port
    //, remoteSvr : 'http://onceoa.com'
    , remoteSvr : 'http://onceair.com'
    , language : 'zh-CN'
    , textEncoding : 'gbk'


     

  • #5 ptlddn 1572273820342

    问题已解决,谢谢。

 关键字
二次开发 OnceAir

 关注我们

我们的微信公众号: OnceDoc
打开微信扫一扫即可关注我们:

OnceDoc