Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BIBO -- O
09-22-2020, 07:41 PM
Post: #31
RE: BIBO
测试了端口,runxun1能连接本地20050,runxun1能连接ada.zettadom.com:22242(g1b),g1b能连接本地62818。但是我不知道20050能否连到g1b:62818。
Code:
[zhihao@barbarossa-35 ~]$ telnet  localhost 20050
Trying ::1...
Connected to localhost.
Escape character is '^]'.
^]
telnet> Connection closed.
[zhihao@barbarossa-35 ~]$ telnet ada.zettadom.com 22242
Trying 218.71.141.62...
Connected to ada.zettadom.com.
Escape character is '^]'.
SSH-2.0-OpenSSH_6.6.1
^C^]
telnet> Connection closed.
Code:
[zhihao@g1b-2 zhihao]$ telnet localhost 62818
Trying ::1...
Connected to localhost.
Escape character is '^]'.
^]
telnet> Connection closed.
[zhihao@g1b-2 zhihao]$
Quote this message in a reply
09-22-2020, 07:42 PM
Post: #32
RE: BIBO
[quote='zhihao' pid='43428' dateline='1600768821']
limbo30-1上执行ncat,一段时间后还是没有返回值
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
[/quote]

when i use g1b-2:62818 directly, the connection is fine and simpleserv.log shows the following.
[code]
working [0922-18:39:20]
      received: /a^M/ ..more
      received: /b^M/ ..more
      received: /ccd^M/ ..more
      received: /^M/ ..more
      received a blank line
  talk2thinker reqno: 2
    received new case in /thinker/storage/udata/lingu/testy/procuratorate/tests/newcase/newcase.txt [0922-18:39:28]
      ts file /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts generated
      torun   sage_user=sage2 /thinker/globe/.think/run/auntie register /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts
      auntie completes with exit code 0
    collecting results from /thinker/storage/udata/lingu/testy/procuratorate/tests/res2
    session returns 0

But when I use trajan to relay, it does not work.
Code:
[root@limbo30-1 processed]# telnet trajan.d-thinker.org 20050
Trying 211.154.134.173...
Connected to trajan.d-thinker.org.
Escape character is '^]'.
abc
dd
ewf


^]
telnet> q
Connection closed.
[root@limbo30-1 processed]#

simpleserv.log continues with the following.
Code:
for exit status 1, we recycle thinker
working [0922-18:41:30]
    session returns 0
  tardy client. abandoning this session
Find all posts by this user
Quote this message in a reply
09-22-2020, 08:09 PM
Post: #33
RE: BIBO
看到g1b-2的simpleserv.sh后台显示Permission denied。
Code:
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 63: /tmp/grep404.out: Permission denied

g1b-2 上重新开启连接runxun1的通道
Code:
[zhihao@g1b-2 zhihao]$ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
nohup: ignoring input and appending output to ‘nohup.out’
^Z
[1]+  Stopped                 nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
[zhihao@g1b-2 zhihao]$ bg
[1]+ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org &
[zhihao@g1b-2 zhihao]$ ps aux | grep "ssh -t"
zhihao    10213  0.0  0.0  83556  8056 pts/44   T    19:03   0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao    15442  0.0  0.0 112728  2316 pts/44   S+   19:04   0:00 grep --color=auto ssh -t
[zhihao@g1b-2 zhihao]$

limbo30-1提示Connection refused.
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
Ncat: Connection refused.
Quote this message in a reply
09-22-2020, 08:22 PM
Post: #34
RE: BIBO
(09-22-2020 08:09 PM)zhihao Wrote:  看到g1b-2的simpleserv.sh后台显示Permission denied。

/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied

Perhaps that file was created by user lingu. You can delete this file manytasks.ts and try again.

Quote:
Quote:/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 63: /tmp/grep404.out: Permission denied
[/code]


g1b-2 上重新开启连接runxun1的通道
Code:
[zhihao@g1b-2 zhihao]$ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
nohup: ignoring input and appending output to ‘nohup.out’
^Z
[1]+  Stopped                 nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
[zhihao@g1b-2 zhihao]$ bg
[1]+ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org &
[zhihao@g1b-2 zhihao]$ ps aux | grep "ssh -t"
zhihao    10213  0.0  0.0  83556  8056 pts/44   T    19:03   0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao    15442  0.0  0.0 112728  2316 pts/44   S+   19:04   0:00 grep --color=auto ssh -t
[zhihao@g1b-2 zhihao]$

You do not need to input password?
Find all posts by this user
Quote this message in a reply
09-22-2020, 08:29 PM
Post: #35
RE: BIBO
(09-22-2020 08:09 PM)zhihao Wrote:  看到g1b-2的simpleserv.sh后台显示Permission denied。
Code:
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 63: /tmp/grep404.out: Permission denied

上面运行的simpleserv.sh为添加了插入逻辑后脚本
Code:
[zhihao@g1b-2 procuratorate]$ pwd
/home/zhihao/forest/prada/prada/procuratorate
[zhihao@g1b-2 procuratorate]$ ./simpleserv.sh
Quote this message in a reply
09-22-2020, 08:38 PM
Post: #36
RE: BIBO
(09-22-2020 08:22 PM)lingu Wrote:  
(09-22-2020 08:09 PM)zhihao Wrote:  看到g1b-2的simpleserv.sh后台显示Permission denied。

/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 44: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied

Perhaps that file was created by user lingu. You can delete this file manytasks.ts and try again.

Quote:
Quote:/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 63: /tmp/grep404.out: Permission denied
[/code]


g1b-2 上重新开启连接runxun1的通道
Code:
[zhihao@g1b-2 zhihao]$ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
nohup: ignoring input and appending output to ‘nohup.out’
^Z
[1]+  Stopped                 nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
[zhihao@g1b-2 zhihao]$ bg
[1]+ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org &
[zhihao@g1b-2 zhihao]$ ps aux | grep "ssh -t"
zhihao    10213  0.0  0.0  83556  8056 pts/44   T    19:03   0:00 ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
zhihao    15442  0.0  0.0 112728  2316 pts/44   S+   19:04   0:00 grep --color=auto ssh -t
[zhihao@g1b-2 zhihao]$

You do not need to input password?

之前没有输入密码就挂起了,这次有输密码,ssh有连通上。
Code:
[zhihao@g1b-2 zhihao]$ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
nohup: ignoring input and appending output to ‘nohup.out’
zhihao@trajan.d-thinker.org's password:
^Z
[1]+  Stopped                 nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org
[zhihao@g1b-2 zhihao]$ bg
[1]+ nohup ssh -t -t -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 -R 211.154.134.173:20050:localhost:62818 -p532 zhihao@trajan.d-thinker.org &
[zhihao@g1b-2 zhihao]$

删除manytasks.ts后尝试 ncat,返回404。
Code:
[zhihao@g1b-2 zhihao]$ sudo rm /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts
[zhihao@g1b-2 zhihao]$

Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 404,
"msg": "not found",
"children": [
]
}

[zhihao@limbo30-1 processed]$

同时g1b-2内的simpleserve服务后台输出表示有权限问题。
Code:
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 81: /tmp/grep404.out: Permission denied
Quote this message in a reply
09-22-2020, 08:56 PM
Post: #37
RE: BIBO
(09-22-2020 08:38 PM)zhihao Wrote:  同时g1b-2内的simpleserve服务后台输出表示有权限问题。
Code:
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 62: /thinker/storage/udata/lingu/testy/procuratorate/tests/manytasks.ts: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 81: /tmp/grep404.out: Permission denied

将文件夹设为777权限后,文件夹里面的文件没有权限。准备将涉及权限问题的文件newreq,newcase.txt重命名为其他,让其重新生成
Code:
[zhihao@g1b-2 zhihao]$ sudo chmod 777 /thinker/storage/udata/lingu/testy/procuratorate/tests
[sudo] password for zhihao:
[zhihao@g1b-2 zhihao]$ pwd

simpleserv.sh后台输出:
Code:
...
...
[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[Btruncate: cannot open ‘/thinker/storage/udata/lingu/testy/procuratorate/tests/newreq’ for writing: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 96: /thinker/storage/udata/lingu/testy/procuratorate/tests/newreq: Permission denied
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 96: /thinker/storage/udata/lingu/testy/procuratorate/tests/newreq: Permission denied
/bin/cp: cannot create regular file ‘/thinker/storage/udata/lingu/testy/procuratorate/tests/newcase/newcase.txt’: Permission denied
/bin/rm: cannot remove ‘/thinker/storage/udata/lingu/testy/procuratorate/tests/res2/*.txt’: No such file or directory
mkdir: cannot create directory ‘/thinker/storage/udata/lingu/testy/procuratorate/tests/res2/../resprev’: File exists
/bin/rm: cannot remove ‘/thinker/storage/udata/lingu/testy/procuratorate/tests/res2/../resprev/*’: No such file or directory
/home/lingu/forest/prada/prada/procuratorate/talk2thinker.sh: line 81: /tmp/grep404.out: Permission denied
Quote this message in a reply
09-22-2020, 09:21 PM
Post: #38
RE: BIBO
修改newcase、resprev权限为777后,使用/data/20200906.1/processed内的案例查询,能得到返回结果
Code:
[zhihao@limbo30-1 processed]$ pwd
/data/20200906.1/processed
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 200,
"msg": "ok",
"children": [
  {
   "keys": [
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087e0145e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087e0216e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087e02cee4a911ea987a005056c00001"
     }
   ],
   "caseid": "67be23689e6311eabceb005056c00001",
   "caseyear": 2014,
   "casetitle": "张某、沈某某等七人抢劫案",
   "casetype": "最高人民检察院指导性案例",
   "caserate": "5.00",
   "caseaction": "抢劫罪",
   "score": 100
  },
  {
   "keys": [
     {
       "type": "key1",
       "value": "盗窃",
       "detailid": "087b7c01e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "盗窃",
       "detailid": "087b7e26e4a911ea987a005056c00001"
     }
   ],
   "caseid": "67be26729e6311eabceb005056c00001",
   "caseyear": 2017,
   "casetitle": "张四毛盗窃案",
   "casetype": "最高人民检察院指导性案例",
   "caserate": "5.00",
   "caseaction": "盗窃罪",
   "score": 100
  },
  {
   "keys": [
     {
       "type": "key3",
       "value": "入户抢劫",
       "detailid": "087dfc79e4a911ea987a005056c00001"
     },
     {
       "type": "key2",
       "value": "入户抢劫",
       "detailid": "087dfc79e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫、盗窃",
       "detailid": "087dfc79e4a911ea987a005056c00001"
     },
     {
       "type": "key3",
       "value": "补充起诉",
       "detailid": "087dfd91e4a911ea987a005056c00001"
     },
     {
       "type": "key2",
       "value": "入户抢劫",
       "detailid": "087dfd91e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫、盗窃",
       "detailid": "087dfd91e4a911ea987a005056c00001"
     },
     {
       "type": "key2",
       "value": "入户抢劫",
       "detailid": "087dfe86e4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫、盗窃",
       "detailid": "087dfe86e4a911ea987a005056c00001"
     }
   ],
   "caseid": "67be23409e6311eabceb005056c00001",
   "caseyear": 2014,
   "casetitle": "陈邓昌抢劫、盗窃,付志强盗窃案",
   "casetype": "最高人民检察院指导性案例",
   "caserate": "5.00",
   "caseaction": "抢劫罪",
   "score": 100
  },
  {
   "keys": [
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087b8e5ae4a911ea987a005056c00001"
     },
     {
       "type": "key1",
       "value": "抢劫",
       "detailid": "087b8faee4a911ea987a005056c00001"
     }
   ],
   "caseid": "67be23909e6311eabceb005056c00001",
   "caseyear": 2016,
   "casetitle": "马世龙(抢劫)核准追诉案",
   "casetype": "最高人民检察院指导性案例",
   "caserate": "5.00",
   "caseaction": "抢劫罪",
   "score": 100
  }
]
}

[zhihao@limbo30-1 processed]$

zengxingliang.json为插入请求,可以返回code 200
Code:
[zhihao@limbo30-1 processed]$ ( cat zengxingliang.json; sleep 18 ) | ncat trajan.d-thinker.org 20050
{
    code: 200,
    msg: ok,
    children: []
    }
[zhihao@limbo30-1 processed]$
Quote this message in a reply
09-22-2020, 09:21 PM (This post was last modified: 09-22-2020 09:21 PM by lingu.)
Post: #39
RE: BIBO
(09-03-2020 11:53 PM)lingu Wrote:  talk2thinker.sh
Code:
读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数

对于伪代码来说,这又太模糊了。请改为如下形式:
Code:
读取一个案例请求,保存到$toneroot/newreeq文件
tellThinker
getresults

Quote:...
...

尽快补齐省略部分。

Quote: /bin/cp $reqpfn $newcasepfn
flog_enable_timestamp=True flog " received new case in $newcasepfn"

insert (){

作为伪代码,这个insert()很突兀,不知怎么理解。

Quote: # if "type":"insert"
casetype=`jq '.type' $newcasepfn`
if [[ $casetype == "\"insert\"" ]]; then
newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)
mkdir $newdir
casecnt=$((++newdir))
cp $newcasepfn $newdir/insert.json

在下次运行simpleserv时,casecnt会重置为10,这就错了。

我们得保存casecnt,可以暂时用pcf来保存一个变量,我等会具体提议。
Find all posts by this user
Quote this message in a reply
09-22-2020, 09:41 PM (This post was last modified: 09-22-2020 09:51 PM by lingu.)
Post: #40
RE: BIBO
driver: we need handle case count well for the bibo system.

(09-03-2020 11:53 PM)lingu Wrote:  talk2thinker.sh

读取一个案例请求,保存到$toneroot/newreeq文件,执行tellThinker, getresults函数
...
...

If we have vars in bibo-ext.pcf -- http://rar.shufangkeji.com:60380/showthr...4#pid43444 I suggest we read case count here.
Code:
casecnt = use the pcf program to read bibo_doc_cnt in $bibo_base/bibo-ext.pcf

Quote:
/bin/cp $reqpfn $newcasepfn
flog_enable_timestamp=True flog " received new case in $newcasepfn"

insert (){
# if "type":"insert"
casetype=`jq '.type' $newcasepfn`
if [[ $casetype == "\"insert\"" ]]; then
newdir=$(ls /thinker/globe/udata/lingu/testy/procuratorate/tests/typical | wc -l)
mkdir $newdir
casecnt=$((++newdir))

We need update the case count here.
Code:
use the pcf program to write bibo_doc_cnt as casecnt in $bibo_base/bibo-ext.pcf

RR zhihao

--- working proactively. I added the logic in cod://prada commit 7b8c391

A simple test of pcf shows the functionality of pcf works as expected.
Code:
20:35:08 lingu@g1b-2:/home/lingu/forest/prada/prada> pcf --pcf /thinker/globe/soft/bibo/bibo-ext.pcf --get bibo_doc_cnt
10
20:49:09 lingu@g1b-2:/home/lingu/forest/prada/prada> pcf --pcf /thinker/globe/soft/bibo/bibo-ext.pcf --add bibo_doc_cnt 11
20:49:27 lingu@g1b-2:/home/lingu/forest/prada/prada> pcf --pcf /thinker/globe/soft/bibo/bibo-ext.pcf --get bibo_doc_cnt
11
20:49:29 lingu@g1b-2:/home/lingu/forest/prada/prada>
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: