cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Browser Client Dashboard Authentication after Tomcat Restart

bmehringer
13-Aquamarine

Browser Client Dashboard Authentication after Tomcat Restart

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

7 REPLIES 7
cmorfin
19-Tanzanite
(To:bmehringer)

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

bmehringer
13-Aquamarine
(To:cmorfin)

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.

cmorfin
19-Tanzanite
(To:bmehringer)

Hi @bmehringer 

 

Sorry for the delay.

 

Could you try using URL of type

 

http://server/Thingworx/Runtime/index.html?appKey=12345&x-thingworx-session=true#mashup=MyMashup

 

This works for me while the ones you sent don't and request a login indeed.
Note the order of the parameters appears to be important

 

Hope this helps

Regards

Christophe

 

 

 

bmehringer
13-Aquamarine
(To:cmorfin)

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.

cmorfin
19-Tanzanite
(To:bmehringer)

Hi @bmehringer 

 

Would it be possible you specify the exact version of ThingWorx you are using (under Help > About)

and the exact version of the browser you see this behaviour .

That might make a difference because that did work for me .

 

Thanks

Christophe

 

bmehringer
13-Aquamarine
(To:cmorfin)

ThingWorx version is 9.0.6 and the Chrome version is 89.0.4389.114.
You think there is anything in the Thingwrox Subsystems, or Authenticators that can be adjusted to allow the Chrome web clients to skip that authentication?
bmehringer
13-Aquamarine
(To:cmorfin)

It may also help to know that the dashboard mashups have an AutoRefresh widget on them.  Maybe it's the refresh mechanism that is making a call back to the server when the Tomcat service is down that is causing the login prompt..?

Announcements


Top Tags