IBMStreams / streamsx.topology

Develop streaming applications for IBM Streams in Python, Java & Scala.
http://ibmstreams.github.io/streamsx.topology
Apache License 2.0
29 stars 43 forks source link

CPD3.5: "invalid platform token" error #2609

Closed markheger closed 3 years ago

markheger commented 3 years ago

When using streamsx 1.17.x with Streams 5.5 in Cloud Pak for Data 3.5, it might occur that a "invalid platform token" error is received.

For example, when running a notebook longer than 20 minutes and/or multiple users are accessing the same Streams instance, it might happen that you observe an error like below:

Exception in thread \"main\" java.lang.IllegalStateException: Unexpected HTTP resource from service:500:Internal Server Error -- {\"code\":500,\"error\":\"Internal Server Error\",\"reason\":\"CDISW5001E An unexpected error occurred. The error is: CpdApi: invalid platform token: jwtInfo: loggedIn=eyJ...GoQ platform= instance=eyJ...GoQ persistent= expires=-1 user=test1 session=007f5e...9b76b3\",\"message\":\"An error occurred while running the streams.\"}",
markheger commented 3 years ago

token handling will change with v2.x

ghost commented 3 years ago

Resolved with the 2.0.0 release.

markheger commented 3 years ago

streamsx v2.0.0 requires that there is no toolkit in the toolkit path, that depends on topology toolkit 1.x. Therefore the IOT toolkit needs to be updated to v1.3.0.

a) Update the IOT toolkit on the Streams build service in Cloud Pak for Data (CP4D): http://ibmstreams.github.io/streamsx.documentation/docs/python/1.6/python-appapi-devguide-7/#uploading-toolkits-to-the-streams-build-service

b) Install Python package streamsx==2.0.0

For example in a notebook in CP4D:

!pip install streamsx==2.0.0 -t /home/wsuser/work
import sys
sys.path.insert(0, '/home/wsuser/work')