排查Pentaho Server作业执行时网络路径的‘文件或目录不存在’错误
Pentaho Server执行Python脚本访问网络驱动器Excel文件失败问题排查求助
运行执行Automacao_latromi_relatoriobi_inbound_V4.py的Pentaho Server作业时,访问网络驱动器上的Excel文件触发No such file or directory错误。该问题仅在Pentaho Server环境中出现,脚本在本地机器和PDI Spoon中均可正常运行。
已尝试的路径写法
r'H:\POWER_BI.sao\Bases_Shein\Latromi\Relatório Janelas e Apontamentos - YMS Shein.xlsx''H:\POWER_BI.sao\Bases_Shein\Latromi\Relatório Janelas e Apontamentos - YMS Shein.xlsx''H:/POWER_BI.sao/Bases_Shein/Latromi/Relatório Janelas e Apontamentos - YMS Shein.xlsx''H://POWER_BI.sao//Bases_Shein//Latromi//Relatório Janelas e Apontamentos - YMS Shein.xlsx'r'H://POWER_BI.sao//Bases_Shein//Latromi//Relatório Janelas e Apontamentos - YMS Shein.xlsx'
以上写法在Pentaho Server上运行作业时错误仍存在。
错误日志
2024-02-22 11:33:34,339 INFO [org.pentaho.di] 2024/02/22 11:33:34 - Automacao_latromi_relatoriobi_inbound_V4.py - (stdout) importando dados 2024-02-22 11:33:34,339 ERROR [org.pentaho.di] 2024/02/22 11:33:34 - Automacao_latromi_relatoriobi_inbound_V4.py - ERROR : (stderr) File "D:\KN_BI_MASTER\Pentaho_pipelines_e_scripts\1. Latromi\1. Check in Inbound\1. Scripts\Automacao_latromi_relatoriobi_inbound_V4.py", line 150, in 2024-02-22 11:33:34,339 INFO [org.pentaho.di] 2024/02/22 11:33:34 - Automacao_latromi_relatoriobi_inbound_V4.py - (stdout) Falha na tentativa 1: [Errno 2] No such file or directory: 'H:\POWER_BI.sao\Bases_Shein\Latromi/Relatório Janelas e Apontamentos - YMS Shein.xlsx'
已完成的排查步骤
- 确认网络路径和文件可访问性,本地机器可正常访问该文件,路径正确
- 脚本在本地机器和PDI Spoon中运行成功
- 检查了网络权限,Pentaho Server应具备该网络驱动器的访问权限
怀疑问题与Pentaho Server处理网络路径或权限的方式有关,但不确定后续排查方向,恳请有类似经验的人士提供进一步的排查和解决指导。
内容的提问来源于stack exchange,提问作者Lucas Abrantes
相关产品推荐
相关产品推荐

