2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

HAproxyでの”Client sent an HTTP request to an HTTPS server”

Posted at

Openstackやopenshiftでよく目にするHAproxyですが「Client sent an HTTP request to an HTTPS server」なるエラーで先に進めないことがあり、忘備録として記載。

haproxy.conf mode設定

defaultでmode httpの宣言があるため、省略するとhttp通信として発信してしまう。
https通信を期待しているのに、httpは何事ぞ?となった結果が表題のエラーです。
フロントエンド、バックエンドともにmode tcpの記載を忘れずに。
片方だけmode tcpを設定した場合は、エラーとなり起動できない。
お試しなら各所追加でよいでしょうけど、本気の場合はdefault設定は削除しないとですね。
なお、httpsはありませんのでご注意。

haproxy.conf例(OCPでのPort22623通信はhttps通信):

frontend machine-config
bind *:22623
option tcplog
mode tcp
default_backend config-22623

backend config-22623
mode tcp
balance roundrobin
server bootstrap bootstrap.ocp43.rh.world:22623 check
server master-0 master-0.ocp43.rh.world:22623 check
server master-1 master-1.ocp43.rh.world:22623 check
server master-2 master-2.ocp43.rh.world:22623 check


あまり検索でも引っかかってこないので、どなたかの役にたてば!

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?