我正在尝试在 Apama 中使用 Python 插件。不幸的是,我在启动相关器时总是收到以下错误消息。
无法初始化相关器:无法初始化 Python 插件。将 AP_PYTHONHOME 设置为 python 的位置
如果我在本地对其进行测试,该应用程序将正常工作。但是,一旦我切换到生产系统并尝试通过.mon
文件调用 Python 应用程序,就会发生此错误。
谁能告诉我为什么它不能初始化 Python?
Apama 使用以下命令配置和启动。
/correlator --config /opt/apama-rules/deploy --applicationLogLevel DEBUG -l /usr/apama/properties/apama/license/icense.xml
2019-01-31 13:39:27.479 ##### [140402990063488] - There are 2 CPU(s)
2019-01-31 13:39:27.479 ##### [140402990063488] - Correlator command line: ./correlator --config /opt/apama-rules/deploy --applicationLogLevel DEBUG -l /usr/apama/properties/apama/license/ApamaServerLicense.xml
2019-01-31 13:39:27.479 ##### [140402990063488] - Current Working Directory: /opt/Apama/bin
2019-01-31 13:39:27.479 ##### [140402990063488] - PATH: /opt/Apama/bin:/jre/bin:/bin:/jre/../bin:/sbin:/usr/sbin:/bin:/usr/bin
2019-01-31 13:39:27.479 ##### [140402990063488] - LD_LIBRARY_PATH: /opt/apama-rules/deploy/lib:/apamawork_10.3/lib:/opt/Apama/lib:/jre/lib/amd64/server:/jre/lib/amd64
2019-01-31 13:39:27.480 ##### [140402990063488] - Current UTC time: 2019-01-31 12:39:27, local timezone: TZ not set so using system default
2019-01-31 13:39:27.480 ##### [140402990063488] - Input value - port = 15903
2019-01-31 13:39:27.480 ##### [140402990063488] - Input value - output queue size = 10000
2019-01-31 13:39:27.480 ##### [140402990063488] - Input value - output queue batch size = 100
2019-01-31 13:39:27.480 ##### [140402990063488] - Input value - output queue mode = blocking
2019-01-31 13:39:27.480 ##### [140402990063488] - Input value - environment variable = APAMA_PLATFORM=amd64-rhel7
2019-01-31 13:39:27.480 ##### [140402990063488] - Input value - environment variable = AP_PYTHONHOME=/opt/Apama/third_party/python/lib/python3.6/site-packages
2019-01-31 13:39:27.480 ##### [140402990063488] - Input value - environment variable = APAMA_LIBRARY_VERSION=10.3
2019-01-31 13:39:27.480 ##### [140402990063488] - Input value - environment variable = APAMA_JRE=/jre
2019-01-31 13:39:27.480 ##### [140402990063488] - Input value - environment variable = APAMA_ENVSET=10.3:/opt/Apama:amd64-rhel7
2019-01-31 13:39:27.480 ##### [140402990063488] - Input value - environment variable = APAMA_WORK=/apamawork_10.3
2019-01-31 13:39:27.480 ##### [140402990063488] - Input value - environment variable = APAMA_HOME=/opt/Apama
2019-01-31 13:39:27.480 ##### [140402990063488] - Using memory allocator = TBB scalable allocator
[...]
2019-01-31 13:39:27.717 ERROR [140402990063488] - Failed to initialize correlator: Could not initialise the Python plugin. Set AP_PYTHONHOME to the location of python