pydolphinscheduler使用os.environ设置环境变量后,调用api创建项目依然使用默认配置? #13781
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
python 3.9.9,PyCharm Community Edition 2022.3.3,pydolphinscheduler 4.0.1,dolphinscheduler 3.1.4
代码:
报错:
H:\Work\PyDolphinSchedulerTest\venv\Scripts\python.exe H:\Work\PyDolphinSchedulerTest\src\main.py
Auth token is default token, highly recommend add a token in production, especially you deploy in public network.
H:\Work\PyDolphinSchedulerTest\venv\lib\site-packages\pydolphinscheduler\java_gateway.py:314: UserWarning: Using unmatched version of pydolphinscheduler (version 4.0.1) and Java gateway (version unknown) may cause errors. We strongly recommend you to find the matched version (check: https://pypi.org/project/apache-dolphinscheduler)
gateway = GatewayEntryPoint()
Traceback (most recent call last):
File "H:\Work\PyDolphinSchedulerTest\venv\lib\site-packages\py4j\java_gateway.py", line 982, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "H:\Work\PyDolphinSchedulerTest\venv\lib\site-packages\py4j\java_gateway.py", line 1132, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "H:\Work\PyDolphinSchedulerTest\src\main.py", line 16, in
pydsProject.create_if_not_exists()
File "H:\Work\PyDolphinSchedulerTest\venv\lib\site-packages\pydolphinscheduler\models\project.py", line 41, in create_if_not_exists
gateway.create_or_grant_project(user, self.name, self.description)
File "H:\Work\PyDolphinSchedulerTest\venv\lib\site-packages\pydolphinscheduler\java_gateway.py", line 147, in create_or_grant_project
return self.gateway.entry_point.createOrGrantProject(user, name, description)
File "H:\Work\PyDolphinSchedulerTest\venv\lib\site-packages\py4j\java_gateway.py", line 1321, in call
answer = self.gateway_client.send_command(command)
File "H:\Work\PyDolphinSchedulerTest\venv\lib\site-packages\py4j\java_gateway.py", line 1036, in send_command
connection = self._get_connection()
File "H:\Work\PyDolphinSchedulerTest\venv\lib\site-packages\py4j\java_gateway.py", line 984, in _get_connection
connection = self._create_connection()
File "H:\Work\PyDolphinSchedulerTest\venv\lib\site-packages\py4j\java_gateway.py", line 990, in _create_connection
connection.start()
File "H:\Work\PyDolphinSchedulerTest\venv\lib\site-packages\py4j\java_gateway.py", line 1144, in start
raise Py4JNetworkError(msg, e)
py4j.protocol.Py4JNetworkError: An error occurred while trying to connect to the Java server (127.0.0.1:25333)
Process finished with exit code 1
可以看到连接的还是127.0.0.1:25333,不是我设置的配置
Beta Was this translation helpful? Give feedback.
All reactions