OSCollector 无法运行程序“python”:错误=13,权限被拒绝

OSCollector 无法运行程序“python”:错误=13,权限被拒绝

当我倾向于安装和使用名为 benchmarksql-5.0 的工具时,我发现了以下问题

[oracle@db01 run]$ ./runBenchmark.sh props.ora
09:43:33,081 [main] INFO   jTPCC : Term-00,
09:43:33,083 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
09:43:33,083 [main] INFO   jTPCC : Term-00,      BenchmarkSQL v5.0
09:43:33,083 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
09:43:33,083 [main] INFO   jTPCC : Term-00,  (c) 2003, Raul Barbosa
09:43:33,084 [main] INFO   jTPCC : Term-00,  (c) 2004-2016, Denis Lussier
09:43:33,086 [main] INFO   jTPCC : Term-00,  (c) 2016, Jan Wieck
09:43:33,086 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
09:43:33,086 [main] INFO   jTPCC : Term-00,
09:43:33,086 [main] INFO   jTPCC : Term-00, db=oracle
09:43:33,086 [main] INFO   jTPCC : Term-00, driver=oracle.jdbc.driver.OracleDriver
09:43:33,086 [main] INFO   jTPCC : Term-00, conn=jdbc:oracle:thin:@localhost:1521:cc
09:43:33,086 [main] INFO   jTPCC : Term-00, user=benchmarksql
09:43:33,086 [main] INFO   jTPCC : Term-00,
09:43:33,086 [main] INFO   jTPCC : Term-00, warehouses=1
09:43:33,086 [main] INFO   jTPCC : Term-00, terminals=1
09:43:33,088 [main] INFO   jTPCC : Term-00, runTxnsPerTerminal=10
09:43:33,088 [main] INFO   jTPCC : Term-00, limitTxnsPerMin=300
09:43:33,088 [main] INFO   jTPCC : Term-00, terminalWarehouseFixed=true
09:43:33,088 [main] INFO   jTPCC : Term-00,
09:43:33,088 [main] INFO   jTPCC : Term-00, newOrderWeight=45
09:43:33,088 [main] INFO   jTPCC : Term-00, paymentWeight=43
09:43:33,088 [main] INFO   jTPCC : Term-00, orderStatusWeight=4
09:43:33,088 [main] INFO   jTPCC : Term-00, deliveryWeight=4
09:43:33,088 [main] INFO   jTPCC : Term-00, stockLevelWeight=4
09:43:33,089 [main] INFO   jTPCC : Term-00,
09:43:33,089 [main] INFO   jTPCC : Term-00, resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
09:43:33,089 [main] INFO   jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
09:43:33,089 [main] INFO   jTPCC : Term-00,
09:43:33,235 [main] INFO   jTPCC : Term-00, copied props.ora to my_result_2021-12-30_094333/run.properties
09:43:33,235 [main] INFO   jTPCC : Term-00, created my_result_2021-12-30_094333/data/runInfo.csv for runID 8
09:43:33,235 [main] INFO   jTPCC : Term-00, writing per transaction results to my_result_2021-12-30_094333/data/result.csv
09:43:33,236 [main] INFO   jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
09:43:33,236 [main] INFO   jTPCC : Term-00, osCollectorInterval=1
09:43:33,236 [main] INFO   jTPCC : Term-00, osCollectorSSHAddr=null
09:43:33,236 [main] INFO   jTPCC : Term-00, osCollectorDevices=net_eth0 blk_sda
09:43:33,243 [main] ERROR  OSCollector : OSCollector Cannot run program "python": error=13, Permission denied
java.io.IOException: Cannot run program "python": error=13, Permission denied
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at OSCollector.<init>(OSCollector.java:83)
        at jTPCC.<init>(jTPCC.java:256)
        at jTPCC.main(jTPCC.java:53)
Caused by: java.io.IOException: error=13, Permission denied
        at java.lang.UNIXProcess.forkAndExec(Native Method)
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
        at java.lang.ProcessImpl.start(ProcessImpl.java:134)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 3 more

我首先抓住了通过yum安装python36和python2的解决方案,但没有帮助。那么出现这个错误时应该怎么办呢?感谢您的意见。

为了完成,当我使用 command 时sh -x runBenchmark.sh props.ora,以下命令发生错误: java -cp '.:../lib/oracle/*:/oracle/product/122/lib/*:../lib/*:../dist/*' -Dprop=props.ora -DrunID=19 jTPCC 总流程显示在此处

[oracle@db01 run]$ sh -x runBenchmark.sh props.ora
+ '[' 1 -ne 1 ']'
+ SEQ_FILE=./.jTPCC_run_seq.dat
+ '[' '!' -f ./.jTPCC_run_seq.dat ']'
+++ cat ./.jTPCC_run_seq.dat
++ expr 18 + 1
+ SEQ=19
+ echo 19
+ source funcs.sh props.ora
++ PROPS=props.ora
++ '[' '!' -f props.ora ']'
++ case "$(getProp db)" in
+++ getProp db
+++ grep '^db=' props.ora
+++ sed -e 's/^db=//'
+ setCP
+ case "$(getProp db)" in
++ getProp db
++ grep '^db=' props.ora
++ sed -e 's/^db=//'
+ cp='../lib/oracle/*'
+ '[' '!' -z /oracle/product/122 -a -d /oracle/product/122/lib ']'
+ cp='../lib/oracle/*:/oracle/product/122/lib/*'
+ cp='../lib/oracle/*:/oracle/product/122/lib/*:../lib/*'
+ myCP='.:../lib/oracle/*:/oracle/product/122/lib/*:../lib/*:../dist/*'
+ export myCP
+ myOPTS='-Dprop=props.ora -DrunID=19'
+ java -cp '.:../lib/oracle/*:/oracle/product/122/lib/*:../lib/*:../dist/*' -Dprop=props.ora -DrunID=19 jTPCC
13:38:18,427 [main] INFO   jTPCC : Term-00,
13:38:18,429 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
13:38:18,429 [main] INFO   jTPCC : Term-00,      BenchmarkSQL v5.0
13:38:18,429 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
13:38:18,430 [main] INFO   jTPCC : Term-00,  (c) 2003, Raul Barbosa
13:38:18,430 [main] INFO   jTPCC : Term-00,  (c) 2004-2016, Denis Lussier
13:38:18,432 [main] INFO   jTPCC : Term-00,  (c) 2016, Jan Wieck
13:38:18,432 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
13:38:18,432 [main] INFO   jTPCC : Term-00,
13:38:18,432 [main] INFO   jTPCC : Term-00, db=oracle
13:38:18,432 [main] INFO   jTPCC : Term-00, driver=oracle.jdbc.driver.OracleDriver
13:38:18,432 [main] INFO   jTPCC : Term-00, conn=jdbc:oracle:thin:@localhost:1521:cc
13:38:18,433 [main] INFO   jTPCC : Term-00, user=benchmarksql
13:38:18,433 [main] INFO   jTPCC : Term-00,
13:38:18,433 [main] INFO   jTPCC : Term-00, warehouses=1
13:38:18,433 [main] INFO   jTPCC : Term-00, terminals=1
13:38:18,435 [main] INFO   jTPCC : Term-00, runTxnsPerTerminal=10
13:38:18,435 [main] INFO   jTPCC : Term-00, limitTxnsPerMin=300
13:38:18,435 [main] INFO   jTPCC : Term-00, terminalWarehouseFixed=true
13:38:18,435 [main] INFO   jTPCC : Term-00,
13:38:18,435 [main] INFO   jTPCC : Term-00, newOrderWeight=45
13:38:18,435 [main] INFO   jTPCC : Term-00, paymentWeight=43
13:38:18,435 [main] INFO   jTPCC : Term-00, orderStatusWeight=4
13:38:18,435 [main] INFO   jTPCC : Term-00, deliveryWeight=4
13:38:18,435 [main] INFO   jTPCC : Term-00, stockLevelWeight=4
13:38:18,435 [main] INFO   jTPCC : Term-00,
13:38:18,436 [main] INFO   jTPCC : Term-00, resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
13:38:18,436 [main] INFO   jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
13:38:18,436 [main] INFO   jTPCC : Term-00,
13:38:18,605 [main] INFO   jTPCC : Term-00, copied props.ora to my_result_2021-12-30_133818/run.properties
13:38:18,606 [main] INFO   jTPCC : Term-00, created my_result_2021-12-30_133818/data/runInfo.csv for runID 19
13:38:18,606 [main] INFO   jTPCC : Term-00, writing per transaction results to my_result_2021-12-30_133818/data/result.csv
13:38:18,606 [main] INFO   jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
13:38:18,607 [main] INFO   jTPCC : Term-00, osCollectorInterval=1
13:38:18,607 [main] INFO   jTPCC : Term-00, osCollectorSSHAddr=null
13:38:18,607 [main] INFO   jTPCC : Term-00, osCollectorDevices=net_eth0 blk_sda
13:38:18,614 [main] ERROR  OSCollector : OSCollector Cannot run program "python": error=13, Permission denied
java.io.IOException: Cannot run program "python": error=13, Permission denied
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at OSCollector.<init>(OSCollector.java:83)
        at jTPCC.<init>(jTPCC.java:256)
        at jTPCC.main(jTPCC.java:53)
Caused by: java.io.IOException: error=13, Permission denied
        at java.lang.UNIXProcess.forkAndExec(Native Method)
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
        at java.lang.ProcessImpl.start(ProcessImpl.java:134)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
        ... 3 more

顺便说一句,我尝试使用 chmod 命令和 sudo 命令来解决权限被拒绝的问题,但它也没有帮助。

相关内容