(09-22-2020 02:40 PM)zhihao Wrote: [ -> ]coolauntie代码内有flog相关代码,但是对应的coolauntie.log没有生成,说明命令没有执行,但是coolauntie确实位于$PATH路径内,不明白为什么不能执行
Code:
[zhihao@g1b-2 bin]$ pwd
/home/sage2/sage/bin
[zhihao@g1b-2 bin]$ head -n 20 /thinker/bin/coolauntie
#!/bin/bash
# Copyright since 2018, Ningbo Shufang Information Technology Co., Ltd.
# Copyright since 2018, Hututa Technologies Limited
# All rights reserved.
#
# A tool to help use auntie
# Refer to http://tab.d-thinker.org/showthread.php?tid=10679 for more details
#
# Authors: Xinjie Yu
progname=coolauntie
source /thinker/local/forest/util/utilib/bash.inc
flog ""
flog "[$(date)] coolauntie $*"
AUNTIE=/thinker/globe/.think/run/auntie
## set -o errexit
[zhihao@g1b-2 bin]$
Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ ls | grep "cool"
[zhihao@g1b-2 root]$
将sage_clear内出错语句单独拿到终端执行,会一直卡住,无任何输出
Code:
function Action () {
# Generate command file
todaypfn=$(todaydir)/$progname
local turbots=${todaypfn}.ts
echo '@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase' > $turbots
flog " erase with $turbots log to $log_pfn"
coolauntie register $turbots >> $log_pfn
}
flog " "
flog "sage_clear run by $USER"
Action
Code:
[zhihao@g1b-2 ~]$ pwd
/home/zhihao
[zhihao@g1b-2 ~]$ echo '@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase' > turbots
[zhihao@g1b-2 ~]$ cat turbots
@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase
[zhihao@g1b-2 ~]$ coolauntie register turbots >> log_pfn
^C
[zhihao@g1b-2 ~]$ cat log_pfn
[zhihao@g1b-2 ~]$
(09-22-2020 03:01 PM)zhihao Wrote: [ -> ]因为不用sudo的话会提示类似 “/thinker/storage/udata/lingu/testy/procuratorate/tests/typical/” permission deny的问题,但是现在无法复现。使用bash simpleserv.sh一样会卡住
还是用你的用户,不要用root
把permission问题记录下来,我们找100年解法。你不记录,肯定是没法正确工作的。
(09-22-2020 05:45 PM)zhihao Wrote: [ -> ] (09-22-2020 02:40 PM)zhihao Wrote: [ -> ]coolauntie代码内有flog相关代码,但是对应的coolauntie.log没有生成,说明命令没有执行,但是coolauntie确实位于$PATH路径内,不明白为什么不能执行
Code:
[zhihao@g1b-2 bin]$ pwd
/home/sage2/sage/bin
[zhihao@g1b-2 bin]$ head -n 20 /thinker/bin/coolauntie
#!/bin/bash
# Copyright since 2018, Ningbo Shufang Information Technology Co., Ltd.
# Copyright since 2018, Hututa Technologies Limited
# All rights reserved.
#
# A tool to help use auntie
# Refer to http://tab.d-thinker.org/showthread.php?tid=10679 for more details
#
# Authors: Xinjie Yu
progname=coolauntie
source /thinker/local/forest/util/utilib/bash.inc
flog ""
flog "[$(date)] coolauntie $*"
AUNTIE=/thinker/globe/.think/run/auntie
## set -o errexit
[zhihao@g1b-2 bin]$
Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ ls | grep "cool"
[zhihao@g1b-2 root]$
将sage_clear内出错语句单独拿到终端执行,会一直卡住,无任何输出
那就debug "sage clear"。这是一条比较独立的命令,容易调试。
你是否用了screen? screen名称是什么?我进该screen查看。
Quote:[quote]
Code:
function Action () {
# Generate command file
todaypfn=$(todaydir)/$progname
local turbots=${todaypfn}.ts
echo '@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase' > $turbots
flog " erase with $turbots log to $log_pfn"
coolauntie register $turbots >> $log_pfn
}
flog " "
flog "sage_clear run by $USER"
Action
Code:
[zhihao@g1b-2 ~]$ pwd
/home/zhihao
[zhihao@g1b-2 ~]$ echo '@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase' > turbots
[zhihao@g1b-2 ~]$ cat turbots
@-1 (-1 -1 -1 -1 -1 -1) (-1 1 1) erase
[zhihao@g1b-2 ~]$ coolauntie register turbots >> log_pfn
^C
[zhihao@g1b-2 ~]$ cat log_pfn
[zhihao@g1b-2 ~]$
coolauntie阻塞了。可能是用户zhihao的设置未能配合sage工作。
(09-22-2020 05:55 PM)lingu Wrote: [ -> ] (09-22-2020 05:45 PM)zhihao Wrote: [ -> ] (09-22-2020 02:40 PM)zhihao Wrote: [ -> ]coolauntie代码内有flog相关代码,但是对应的coolauntie.log没有生成,说明命令没有执行,但是coolauntie确实位于$PATH路径内,不明白为什么不能执行
Code:
[zhihao@g1b-2 bin]$ pwd
/home/sage2/sage/bin
[zhihao@g1b-2 bin]$ head -n 20 /thinker/bin/coolauntie
#!/bin/bash
# Copyright since 2018, Ningbo Shufang Information Technology Co., Ltd.
# Copyright since 2018, Hututa Technologies Limited
# All rights reserved.
#
# A tool to help use auntie
# Refer to http://tab.d-thinker.org/showthread.php?tid=10679 for more details
#
# Authors: Xinjie Yu
progname=coolauntie
source /thinker/local/forest/util/utilib/bash.inc
flog ""
flog "[$(date)] coolauntie $*"
AUNTIE=/thinker/globe/.think/run/auntie
## set -o errexit
[zhihao@g1b-2 bin]$
Code:
[zhihao@g1b-2 root]$ pwd
/thinker/local/today/users/root
[zhihao@g1b-2 root]$ ls | grep "cool"
[zhihao@g1b-2 root]$
将sage_clear内出错语句单独拿到终端执行,会一直卡住,无任何输出
那就debug "sage clear"。这是一条比较独立的命令,容易调试。
你是否用了screen? screen名称是什么?我进该screen查看。
没有使用screen操作。现在创建了一个screen
Code:
[zhihao@g1b-2 ~]$ screen -r zh-scr
[detached from 90643.zh-scr]
(09-22-2020 05:50 PM)lingu Wrote: [ -> ] (09-22-2020 03:01 PM)zhihao Wrote: [ -> ]因为不用sudo的话会提示类似 “/thinker/storage/udata/lingu/testy/procuratorate/tests/typical/” permission deny的问题,但是现在无法复现。使用bash simpleserv.sh一样会卡住
还是用你的用户,不要用root
把permission问题记录下来,我们找100年解法。你不记录,肯定是没法正确工作的。
现在已经在zhihao用户下的screen ”119609.simpleserv“ 内将simperserv.sh换成zhihao用户执行。
Code:
[zhihao@g1b-2 procuratorate]$ ./simpleserv.sh
之前没有把问题记录下来,现在卡在sage_clear,无法复现permission deny
(09-22-2020 06:11 PM)zhihao Wrote: [ -> ] (09-22-2020 05:50 PM)lingu Wrote: [ -> ] (09-22-2020 03:01 PM)zhihao Wrote: [ -> ]因为不用sudo的话会提示类似 “/thinker/storage/udata/lingu/testy/procuratorate/tests/typical/” permission deny的问题,但是现在无法复现。使用bash simpleserv.sh一样会卡住
还是用你的用户,不要用root
把permission问题记录下来,我们找100年解法。你不记录,肯定是没法正确工作的。
现在已经在zhihao用户下的screen ”119609.simpleserv“ 内将simperserv.sh换成zhihao用户执行。
Code:
[zhihao@g1b-2 procuratorate]$ ./simpleserv.sh
执行sage clear即可,这样调试的功能规模比较合适,简化一些。
Quote:之前没有把问题记录下来,现在卡在sage_clear,无法复现permission deny
我现在登录到你的screen。
(09-22-2020 06:23 PM)lingu Wrote: [ -> ]Quote:之前没有把问题记录下来,现在卡在sage_clear,无法复现permission deny
我现在登录到你的screen。
i went to screen simpleserv and stopped the simpleserv program.
sage_clear seems to complete quickly.
Code:
[zhihao@g1b-2 procuratorate]$ sage_user=sage2 /home/sage2/sage/bin/sage_clear
[zhihao@g1b-2 procuratorate]$
Strangely there is no error reported.
Code:
[Tue Sep 22 17:41:24 CST 2020] coolauntie register /thinker/local/today/users/zhihao/.ts
coolauntie register /thinker/local/today/users/zhihao/.ts [Tue Sep 22 17:41:24 CST 2020]
0: /thinker/globe/.think/run/auntie runs /thinker/globe/.think/run/auntie register /thinker/local/today/users/zhihao/.ts
to run /thinker/globe/.think/run/auntie register /thinker/local/today/users/zhihao/.ts with timeout 20s
timeout run completes with 0
this try exits with 0 [0922-17:41:24]
[Tue Sep 22 17:41:24 CST 2020] coolauntie completes (0)
auntie log seems to be happy, too.
Code:
auntie ::...- /thinker/globe/.think/run/auntie... 0x3 0x0 0x0
2020.09.22 17:41:24 (67): sage_user sage2
2020.09.22 17:41:24 (67): arguments starts..- register.. 0x1 0x0 0x0
2020.09.22 17:41:24 (67): auntie arg:..- register.. 0x3 0x1 0x1
2020.09.22 17:41:24 (67): vb - 63 0 0 0
2020.09.22 17:41:24 (67): auntie prelude()
2020.09.22 17:41:24 (67): nDown: - 3 0 0 0
2020.09.22 17:41:24 (67): auntie - opened up channel..- /thinker/local/sage2/atpdup.. 0x4 0x0 0x0
2020.09.22 17:41:24 (67): auntie::RegisterTasks: /thinker/local/today/users/zhihao/.ts
2020.09.22 17:41:24 (67): wrote to atpd: ..- TR... 0x5 0x0 0x0
2020.09.22 17:41:24 (67): Talker::sendBuffer: /thinker/local/today/users/zhihao/.ts 37
2020.09.22 17:41:24 (67): file:: /thinker/local/today/users/zhihao/.ts
2020.09.22 17:41:24 (67): atpd responds happily: AT.
2020.09.22 17:41:24 (67): WaveBye: Well Done
I think you can proceed to run simpleserve and see if there are any problems.
(09-22-2020 06:43 PM)lingu Wrote: [ -> ] (09-22-2020 06:23 PM)lingu Wrote: [ -> ]Quote:之前没有把问题记录下来,现在卡在sage_clear,无法复现permission deny
我现在登录到你的screen。
i went to screen simpleserv and stopped the simpleserv program.
sage_clear seems to complete quickly.
Code:
[zhihao@g1b-2 procuratorate]$ sage_user=sage2 /home/sage2/sage/bin/sage_clear
[zhihao@g1b-2 procuratorate]$
Strangely there is no error reported.
Code:
[Tue Sep 22 17:41:24 CST 2020] coolauntie register /thinker/local/today/users/zhihao/.ts
coolauntie register /thinker/local/today/users/zhihao/.ts [Tue Sep 22 17:41:24 CST 2020]
0: /thinker/globe/.think/run/auntie runs /thinker/globe/.think/run/auntie register /thinker/local/today/users/zhihao/.ts
to run /thinker/globe/.think/run/auntie register /thinker/local/today/users/zhihao/.ts with timeout 20s
timeout run completes with 0
this try exits with 0 [0922-17:41:24]
[Tue Sep 22 17:41:24 CST 2020] coolauntie completes (0)
auntie log seems to be happy, too.
Code:
auntie ::...- /thinker/globe/.think/run/auntie... 0x3 0x0 0x0
2020.09.22 17:41:24 (67): sage_user sage2
2020.09.22 17:41:24 (67): arguments starts..- register.. 0x1 0x0 0x0
2020.09.22 17:41:24 (67): auntie arg:..- register.. 0x3 0x1 0x1
2020.09.22 17:41:24 (67): vb - 63 0 0 0
2020.09.22 17:41:24 (67): auntie prelude()
2020.09.22 17:41:24 (67): nDown: - 3 0 0 0
2020.09.22 17:41:24 (67): auntie - opened up channel..- /thinker/local/sage2/atpdup.. 0x4 0x0 0x0
2020.09.22 17:41:24 (67): auntie::RegisterTasks: /thinker/local/today/users/zhihao/.ts
2020.09.22 17:41:24 (67): wrote to atpd: ..- TR... 0x5 0x0 0x0
2020.09.22 17:41:24 (67): Talker::sendBuffer: /thinker/local/today/users/zhihao/.ts 37
2020.09.22 17:41:24 (67): file:: /thinker/local/today/users/zhihao/.ts
2020.09.22 17:41:24 (67): atpd responds happily: AT.
2020.09.22 17:41:24 (67): WaveBye: Well Done
I think you can proceed to run simpleserve and see if there are any problems.
sage_clear没问题。
Code:
[zhihao@g1b-2 zhihao]$ sage_user=sage2 /home/sage2/sage/bin/sage_clear
[zhihao@g1b-2 zhihao]$
在zhihao 的screen “simmpleserv"内开启服务
Code:
[zhihao@g1b-2 ~]$ cd forest/prada/prada/procuratorate/
[zhihao@g1b-2 procuratorate]$ ./simpleserv.sh
limbo30-1上执行ncat,一段时间后还是没有返回值
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json; sleep 18 ) | ncat trajan.d-thinker.org 20050