apache/dolphinscheduler-sdk-python

Is Java Gateway Token and Web UI token-manage the same?

Closed this issue · 4 comments

I generate a token like: 13cc1637a92432cf06598c7dfe06d2f6 on web site.

And set by environ

os.environ['PYDS_JAVA_GATEWAY_AUTH_TOKEN'] = '13cc1637a92432cf06598c7dfe06d2f6'

Got a auth failed Log:

'2023-02-23 21:00:02,825 [30520] DEBUG [MainThread] py4j.java_gateway java_gateway.py:1206 Command to send: A
13cc1637a92432cf06598c7dfe06d2f6
'
'2023-02-23 21:00:02,862 [30520] DEBUG [MainThread] py4j.java_gateway java_gateway.py:1218 Answer received: !xsAuthentication error: bad auth token received.'
'2023-02-23 21:00:02,862 [30520] ERROR [MainThread] py4j.java_gateway java_gateway.py:1138 Cannot authenticate with gateway server.'

Default Token is OK!

'2023-02-23 21:10:22,701 [23660] DEBUG [MainThread] py4j.java_gateway java_gateway.py:1206 Command to send: A
jwUDzpLsNKEFER4*a8gruBH_GsAurNxU7A@Xc
'
'2023-02-23 21:10:22,934 [23660] DEBUG [MainThread] py4j.java_gateway java_gateway.py:1218 Answer received: !yv'

Any Thing Wrong?

Version Info:

Client side:
Python 3.10.9
apache-dolphinscheduler 4.0.0
OpenJDK 11 (Windows)
Sever side:
OpenJDK 11( yum install java-11-openjdk)
dolphinscheduler 3.1.3

Hi @piscesvivian , not the same. java gateway token is in application.yaml in api-server your can find it under node python-gateway

python-gateway:
  # Weather enable python gateway server or not. The default value is true.
  enabled: true
  # Authentication token for connection from python api to python gateway server. Should be changed the default value
  # when you deploy in public network.
  auth-token: jwUDzpLsNKEFER4*a8gruBH_GsAurNxU7A@Xc
  # 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
  # Close connection of socket server if no other request accept after x milliseconds. Define value is (0 = infinite),
  # and socket server would never close even though no requests accept
  connect-timeout: 0
  # Close each active connection of socket server if python program not active after x milliseconds. Define value is
  # (0 = infinite), and socket server would never close even though no requests accept
  read-timeout: 0

close due to no further information

could you add a doc in somewhere?

could you add a doc in somewhere?

actual we have, you can see in https://dolphinscheduler.apache.org/python/main/start.html
image