Skip to main content
17-Peridot
January 21, 2022
Question

Logout Function Failing

  • January 21, 2022
  • 2 replies
  • 4025 views

Hi Folks,

 

I am working on Thingworx version 8.5 and using Logout function within mashup to redirect user to FormLogin page.

It is terminating the session but not redirecting to Form Login but throwing below html error.

 

Bad Request
This combination of host and port requires TLS.

 

Here is the url for login: https://MyServer:8443/Thingworx/FormLogin/MyOrganization/

Redirect URL(logout) : http://MyServer:8443/Thingworx/FormLogin/MyOrganization/

 

Note: Its a production server and required certificate is installed.

2 replies

16-Pearl
January 21, 2022

@TanmeyTWX 

 

Check the redirect URL, you are making a http request on 8443 port. The 8443 port is for https requests, so update the URL to https and then check.

 

Regards,

Sachin Sharma

TanmeyTWX17-PeridotAuthor
17-Peridot
January 21, 2022

Hi Sachin,

 

Its a common mashup deployed at non-secure(Dev environment) as well that's why I don't want to hardcode Https or any change at mashup level but looking for a way to configure from server end. May be some configuration at Tomcat level.

Doing composer level specific changes for Prod instance would be my last option 🙂 

16-Pearl
January 21, 2022

@TanmeyTWX 

 

The SSL configuration is defined in tomcat server.xml file located in tomcat\conf directory. You can check there if SSL is configured or not.

 

SachinSharma_0-1642757230505.png

If your login URL and redirect URL are of the same server then I think SSL is configured.

Even if you don't want to use https then you should use the non secure port with http which is 8080 by default, you can verify the port in same server.xml file, look for Connector port(first line in above screenshot.) Use that port in the redirect URL http://MyServer:<yourPort>/Thingworx/FormLogin/MyOrganization/

Basically you cannot use same port for both http and https. On my local instance I have SSL configured i.e. https on 8443 and http on 8080 and when I tried to access Thingworx on 8443 using http I got the same error.

SachinSharma_1-1642757822701.png

 

 

Regards,

Sachin Sharma

 

24-Ruby III
January 21, 2022

 Hi,

 

TanmeyTWX17-PeridotAuthor
17-Peridot
January 21, 2022

Hi @VladimirN,

 

The port I am using (8443) is already a TLS port still it is throwing error on redirecting.

Do I need to set both connector and redirect port as 8443? Below is the tomcat server configuration.

 

TanmeyTWX_1-1642757734735.png