question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bad Request This combination of host and port requires TLS.

See original GitHub issue

Describe the bug I am using spring-cloud-gcp-starter with custom domain + custom certificate(not google managed). Although the configuration in app.yaml works fine but at the backend the redirection doesn’t work as intended as I am seeing the error:- Bad Request This combination of host and port requires TLS. on a HTTPS connection. This is my app.yaml

runtime: java11
instance_class: F2
handlers:
  - url: /.*
    script: auto
    secure: always
    redirect_http_response_code: 301

And the related application.properties

server.ssl.enabled=true
server.ssl.protocol=TLS
server.port=${PORT:8080}
server.ssl.client-auth=none
server.ssl.key-store=classpath:data/someKeystore.p12
server.ssl.key-store-password=somePassword
server.ssl.key-store-type=PKCS12
server.ssl.key-alias=something
server.ssl.key-password=anotherpassword

Sample I have tested the app locally, for some reason the redirection on localhost doesn’t work at all but if I add https the request processes without the ‘Bad Request’ error. To reproduce: Get a Cert from CA> Add it to GAE> Use the same cert to Configure Spring boot server for SSL> Deploy the app> See the error.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
meltsufincommented, Sep 10, 2020

@Guneetgstar This is a great example of a very valuable community contribution! Hopefully, others will find this thread when they encounter the same problem before it’s fixed, and won’t have to spend time on it like you did. Thanks again!

0reactions
Guneetgstarcommented, Sep 10, 2020

Yeah this seems to me too as I have messed a whole day to find/fix this small requisite with no success and spent more time testing alternatives. What made me think that its rather a spring-cloud-gcp related issue is that I didn’t find a single issue regarding this with GAE and its been here for years whereas spring-cloud-gcp has less users as compared to GAE itself which makes one not to expect a bug from GAE at least.

I have filed a bug on the link you given to issuetacker. I guess you can finally close it now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bad Request - This combination of host and port requires TLS ...
I'm trying to make a https call to a service, I have a Privake key to secure connection. I hit: http://localhost:8081/points/12345/search. I ...
Read more >
Bad request - This combination of host and port requires TLS.
I run my Unify Controller on an Azure windows vm (windows server 2012R2). The controller runs as a service. When I log into...
Read more >
This combination of host and port requires TLS
Problem Description: If you are trying to log into TIBCO JasperReports ® Server via SSL and you believe you have configured the connector...
Read more >
Bad Request This combination of host and port requires TLS.
Hi!I tried to use a self signed cert and after restarting SDP I received this error message:"Bad RequestThis combination of host and port...
Read more >
Got "Bad Request This combination of host and port requires ...
We have started with ESP REST API STC with TLS configured. When access it thru web browser with HTTPS, we got error: Bad...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found