Morefarther commented on issue #91: URL: https://github.com/apache/dolphinscheduler-sdk-python/issues/91#issuecomment-1517283434
> No need for other configs anymore, please try not change the token default value and check wether it work or not. this is not the answer. the client command list ``` (mysql) PS E:\Machinelearning> pydolphinscheduler config --init E:\python_env\mysql\lib\site-packages\pydolphinscheduler\java_gateway.py:316: UserWarning: Using unmatched version of pydolphinscheduler (version 4.0.0) 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() (mysql) PS E:\Machinelearning> pydolphinscheduler config --set java_gateway.address 10.60.0.61 E:\python_env\mysql\lib\site-packages\pydolphinscheduler\java_gateway.py:316: UserWarning: Using unmatched version of pydolphinscheduler (version 4.0.0) 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() Set configuration done. (mysql) PS E:\Machinelearning> pydolphinscheduler config --get java_gateway E:\python_env\mysql\lib\site-packages\pydolphinscheduler\java_gateway.py:316: UserWarning: Using unmatched version of pydolphinscheduler (version 4.0.0) 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() The configuration query as below: java_gateway = ordereddict([('auth_token', 'jwUDzpLsNKEFER4*a8gruBH_GsAurNxU7A@Xc'), ('address', '10.60.0.61'), ('port', 25333), ('auto_convert', True)]) (mysql) PS E:\Machinelearning> python E:\program\shell\test.py E:\python_env\mysql\lib\site-packages\pydolphinscheduler\java_gateway.py:316: UserWarning: Using unmatched version of pydolphinscheduler (version 4.0.0) 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 "E:\python_env\mysql\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 "E:\program\shell\test.py", line 11, in <module> task_parent = Shell(name="task_parent", command="echo hello pydolphinscheduler") File "E:\python_env\mysql\lib\site-packages\pydolphinscheduler\tasks\shell.py", line 58, in __init__ super().__init__(name, TaskType.SHELL, *args, **kwargs) File "E:\python_env\mysql\lib\site-packages\pydolphinscheduler\core\task.py", line 172, in __init__ self.code, self.version = self.gen_code_and_version() File "E:\python_env\mysql\lib\site-packages\pydolphinscheduler\core\task.py", line 391, in gen_code_and_version result = gateway.get_code_and_version( File "E:\python_env\mysql\lib\site-packages\pydolphinscheduler\java_gateway.py", line 139, in get_code_and_version return self.gateway.entry_point.getCodeAndVersion( File "E:\python_env\mysql\lib\site-packages\py4j\java_gateway.py", line 1321, in __call__ answer = self.gateway_client.send_command(command) File "E:\python_env\mysql\lib\site-packages\py4j\java_gateway.py", line 1036, in send_command connection = self._get_connection() File "E:\python_env\mysql\lib\site-packages\py4j\java_gateway.py", line 984, in _get_connection connection = self._create_connection() File "E:\python_env\mysql\lib\site-packages\py4j\java_gateway.py", line 990, in _create_connection connection.start() File "E:\python_env\mysql\lib\site-packages\py4j\java_gateway.py", line 1136, in start self._authenticate_connection() File "E:\python_env\mysql\lib\site-packages\py4j\java_gateway.py", line 1158, in _authenticate_connection raise Py4JAuthenticationError( py4j.protocol.Py4JAuthenticationError: Failed to authenticate with gateway server. (mysql) PS E:\Machinelearning> ``` the api-server command list ``` [dolphinscheduler@hadoop002 dolphinscheduler-3.1.4]$ bin/dolphinscheduler-daemon.sh stop api-server Begin stop api-server...... stopping api-server End stop api-server. [dolphinscheduler@hadoop002 dolphinscheduler-3.1.4]$ bin/dolphinscheduler-daemon.sh start api-server Begin start api-server...... starting api-server, logging to /opt/module/dolphinscheduler-3.1.4/api-server/logs Overwrite api-server/conf/dolphinscheduler_env.sh using bin/env/dolphinscheduler_env.sh. End start api-server. [dolphinscheduler@hadoop002 dolphinscheduler-3.1.4]$ grep -A 10 token api-server/conf/application.yaml # Authentication token for connection from python api to python gateway server. Should be changed the default v alue # when you deploy in public network. auth-token: jwUDzpLsNKEFER4*a8gruBH_GsAurNxU7A@Xc # auth-token: bb65ea96-dfea-11ed-90cd-047f0e130e0b # The address of Python gateway server start. Set its value to `0.0.0.0` if your Python API run in different # between Python gateway server. It could be be specific to other address like `127.0.0.1` or `localhost` gateway-server-address: 0.0.0.0 # The port of Python gateway server start. Define which port you could connect to Python gateway server from # Python API side. gateway-server-port: 25333 # The address of Python callback client. python-address: 127.0.0.1 # The port of Python callback client. python-port: 25334 ``` the api-server logs ``` [ERROR] 2023-04-21 13:15:52.221 +0800 py4j.GatewayConnection:[251] - Authentication error. py4j.Py4JAuthenticationException: Client authentication unsuccessful. at py4j.commands.AuthCommand.execute(AuthCommand.java:79) at py4j.GatewayConnection.run(GatewayConnection.java:236) at java.lang.Thread.run(Thread.java:748) [INFO] 2023-04-21 13:15:52.222 +0800 py4j.GatewayConnection:[164] - Connection Stopped [INFO] 2023-04-21 13:15:57.970 +0800 py4j.GatewayConnection:[227] - Gateway Connection ready to receive messages [INFO] 2023-04-21 13:15:57.970 +0800 py4j.GatewayServer:[519] - Connection Started [ERROR] 2023-04-21 13:15:57.971 +0800 py4j.GatewayConnection:[251] - Authentication error. py4j.Py4JAuthenticationException: Client authentication unsuccessful. at py4j.commands.AuthCommand.execute(AuthCommand.java:79) at py4j.GatewayConnection.run(GatewayConnection.java:236) at java.lang.Thread.run(Thread.java:748) [INFO] 2023-04-21 13:15:57.971 +0800 py4j.GatewayConnection:[164] - Connection Stopped [INFO] 2023-04-21 13:16:04.409 +0800 py4j.GatewayServer:[519] - Connection Started [INFO] 2023-04-21 13:16:04.409 +0800 py4j.GatewayConnection:[227] - Gateway Connection ready to receive messages [ERROR] 2023-04-21 13:16:04.410 +0800 py4j.GatewayConnection:[251] - Authentication error. py4j.Py4JAuthenticationException: Client authentication unsuccessful. at py4j.commands.AuthCommand.execute(AuthCommand.java:79) at py4j.GatewayConnection.run(GatewayConnection.java:236) at java.lang.Thread.run(Thread.java:748) [INFO] 2023-04-21 13:16:04.410 +0800 py4j.GatewayConnection:[164] - Connection Stopped [INFO] 2023-04-21 13:16:04.433 +0800 py4j.GatewayServer:[519] - Connection Started [INFO] 2023-04-21 13:16:04.433 +0800 py4j.GatewayConnection:[227] - Gateway Connection ready to receive messages [ERROR] 2023-04-21 13:16:04.434 +0800 py4j.GatewayConnection:[251] - Authentication error. py4j.Py4JAuthenticationException: Client authentication unsuccessful. at py4j.commands.AuthCommand.execute(AuthCommand.java:79) at py4j.GatewayConnection.run(GatewayConnection.java:236) at java.lang.Thread.run(Thread.java:748) [INFO] 2023-04-21 13:16:04.435 +0800 py4j.GatewayConnection:[164] - Connection Stopped ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
