I had this issue when working on a Java Project in Debian 10 with Tomcat as the application server. Show The issue was that the application already had https defined as it's default protocol while I was using http to call the application in the browser. I however tried using the https protocol in the browser but it didn't connect throwing the error:
Here's how I solved it: I first had to create a keystore file for the application, more like a self-signed certificate for the https protocol:
Note: You need to have Java installed on the server to be able to do this. Java can be installed using Next, I added a https Tomcat server connector for the application in the Tomcat server configuration file (
Add the following to the configuration of the application. Notice that the keystore file location and password are specified. Also a port for the https protocol is defined, which is different from the port for the http protocol:
So the full server configuration for the application looked liked this in the Tomcat server configuration file (
This time when I tried accessing the application from the browser using:
In my case it was:
it worked fine. Although, I had to accept a warning which added a security exception for the website, since the certificate used is a self-signed one. That's all. I hope this helps Got "Bad Request This combination of host and port requires TLS" when access the link to CA WA ESP REST APIcalendar_today Updated On:ProductsESP Workload Automation Issue/IntroductionWe have started with ESP REST API STC with TLS configured. When access it thru web browser with HTTPS, we got error: EnvironmentRelease : 12.0 Component : CA ESP WORKLOAD AUTOMATION CauseThere are two possible causes: ResolutionSolutions: #2 Check if AT-TLS is set on MVS system; if yes, then the ESP REST API port should be excluded. Feedbackthumb_up Yes thumb_down No How do I fix bad request this combination of host and port requires TLS?We can fix this by either of below listed solutions.. Use HTTPS instead of HTTP.. Disable TLS encryption from POSTMAN setting and use HTTP.. Check application properties server.ssl.enabled= true- HTTPS , false-HTTP.. Add correct authorization credential like username and password in POSTMAN enter image description here.. What does requires TLS mean?Transport Layer Security (TLS) is a security protocol that encrypts email for privacy. TLS prevents unauthorized access of your email when it's in transit over internet connections.
Can you use TLS with HTTP?HTTPS uses TLS (or SSL) to encrypt HTTP requests and responses, so instead of the plaintext, an attacker would see a series of seemingly random characters. TLS uses a technology called public key encryption: there are two keys, a public key and a private key.
How does TLS encryption work?SSL/TLS uses both asymmetric and symmetric encryption to protect the confidentiality and integrity of data-in-transit. Asymmetric encryption is used to establish a secure session between a client and a server, and symmetric encryption is used to exchange data within the secured session.
|