Skip to main content
1-Visitor
April 26, 2021
Question

Browser Client Dashboard Authentication after Tomcat Restart

  • April 26, 2021
  • 1 reply
  • 5787 views

All - We run Thingworx mashups as "dashboards" around our facilities quite frequently.  What this basically means is that we have large flat screens mounted showing data that is pulled into Thingworx from various sources on a Thingworx mashups/webpage.  We are embedding application keys in the URL to work around any sort of user having to login.  The users just have to open a URL shortcut, or it's automatically launched when the device boots up. I understand this isn't best practice, but it works well for us and these app key accounts are very locked down.

 

One issue we've unable to overcome is that when the Thingworx server is restarted, or if just Tomcat is restarted, the browser client gets briefly disconnected and then it shows it's default login prompt. In our case we primarily use Chrome, so after a restart, all our users see is this:

 

bmehringer_1-1619442545617.png

 

The resolution is fairly simple, just close and re-open the browser shortcut, but in some cases, the devices running the browsers aren't easily accessible.  I suspect this really happens because once a Thingworx Mashup URL is loaded, it changes from the entered URL to a runtime URL that no longer stores the embedded app key.

 

Is there anything that can be done from the server, or client, side to where these dashboard clients will just automatically reconnect to the Thingworx server?

 

Looking for any ideas.  Only current one that is showing progress is running a schedule batch file that closes all instances of Chrome and re-opens Chrome to the Thingworx URL.  While this is functional, it will leave gaps between scheduled runs where users will still get the login prompt.

 

Thanks

1 reply

19-Tanzanite
April 27, 2021

Hi @bmehringer 

 

Could you possibly provide the URL you are using (change the servername and appkey), so we can see all the parameters passed.

Also what is the version of ThingWorx used ?

 

Thank you

Christophe

1-Visitor
April 30, 2021

The basic URL structure is below:

 

https://servername/Thingworx/Mashups/My.Mashup?x-thingworx-session=true&appKey=12345

 

After a link that is opened, it goes to something like this:

 

https://servername/Thingworx/Runtime/index.html#mashup=My.Mashup&appKey=12345&x-thingworx-session=true

 

Then when the server restarts and the client browser tries to use the "runtime" URL, it requires a user to login, and creates our situation.

1-Visitor
May 12, 2021

Thank you Christophe for the suggestions.

 

I tried the suggested URL, but still ran into the same issue where a login was requested.  In this case, though, I was able to hit the "Cancel" button and the mashup proceeded to open, which is an improvement.

 

Seems like when Tomcat Restarts, all connections are challenged for credentials.