Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The setting for service.protocol option may is not in effect #84

Open
fengguangke opened this issue Mar 18, 2023 · 3 comments
Open

The setting for service.protocol option may is not in effect #84

fengguangke opened this issue Mar 18, 2023 · 3 comments
Assignees

Comments

@fengguangke
Copy link

i set the value of the service.protocol option to "https":

docker run --env OTEL_JAVAAGENT_ENABLED=false -d --name diffy-01 \
  -p 8880:8880 -p 8888:8888 \
  diffy/diffy  env \
    --candidate=lambda-api.sn126.com:443 \
    --master.primary=lambda-api.sn126.com:443 \
    --master.secondary=lambda-api.sn126.com:443 \
    --allowHttpSideEffects=true \
    --responseMode=primary \
    --service.protocol=https \
    --serviceName="Example Service" \
    --proxy.port=8880 \
    --http.port=8888 \
    --rootUrl=localhost:8888

but the settings value in Diffy UI is also "http"

image

and when i send https request, the resonse retures:

 body=<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
</body>
</html>
@puneetkhanduri
Copy link
Collaborator

For https requests, please just include the protocol in the base urls. e.g. https://yourdomain.com/basePathPrefix

@puneetkhanduri puneetkhanduri self-assigned this Mar 20, 2023
@ayushdixitp
Copy link

Hi @puneetkhanduri, am I missing anything here?

java -jar diffy.jar -candidate='qa-chatbot-configurations-api.aws.phenom.local:80' -master.primary='qa-chatbot-configurations-api.aws.phenom.local:80' -master.secondary='qa-chatbot-configurations-api.aws.phenom.local:80' -service.protocol='http' -serviceName='My-Service' -proxy.port=:31900 -admin.port=:8881 -http.port=:8888 -rootUrl='localhost:8889'

The issue is even if I am passing these the jar file is not honoring it. can you please check once.

@zhlu32
Copy link

zhlu32 commented Feb 29, 2024

i set the value of the service.protocol option to "https":

docker run --env OTEL_JAVAAGENT_ENABLED=false -d --name diffy-01 \
  -p 8880:8880 -p 8888:8888 \
  diffy/diffy  env \
    --candidate=lambda-api.sn126.com:443 \
    --master.primary=lambda-api.sn126.com:443 \
    --master.secondary=lambda-api.sn126.com:443 \
    --allowHttpSideEffects=true \
    --responseMode=primary \
    --service.protocol=https \
    --serviceName="Example Service" \
    --proxy.port=8880 \
    --http.port=8888 \
    --rootUrl=localhost:8888

but the settings value in Diffy UI is also "http"

image

and when i send https request, the resonse retures:

 body=<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
</body>
</html>

May Diffy not support https traffic proxy? @puneetkhanduri

I didn't find any paramters to set https certificate, like:
--proxy.sslPort=8443
--proxy.keystorePath=/path/to/your/keystore.jks
--proxy.keystorePassword=your_keystore_password
--proxy.keyPassword=your_key_password \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants