Getting 'Invalid HTTP/2 preamble' when 'DISABLE_SSL: true'
I have my jetconf server working fine with 'DISABLE_SSL: false'
When I try to use jetconf with http instead of https, it fails with 'Invalid HTTP/2 preamble'
So, I set 'DISABLE_SSL: true' and restart jetconf server
/usr/local/bin/curl --http2 -v http://localhost:8443/restconf/data/jnas:nas/storage/disk
* Trying ::1:8443...
* TCP_NODELAY set
* Connected to localhost (::1) port 8443 (#0)
> GET /restconf/data/jnas:nas/storage/disk HTTP/1.1
> Host: localhost:8443
> User-Agent: curl/7.67.0-DEV
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
>
* Empty reply from server
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server
2019-11-12 16:41:38,514 INFO Jetconf version 0.3.7.dev3+g487d7a5.d20191112
2019-11-12 16:41:38,517 INFO Using config:
GLOBAL:
BACKEND_PACKAGE: jnas
CLIENT_CN: false
DATA_JSON_FILE: data.json
LOGFILE: '-'
LOG_DBG_MODULES:
GLOBAL:
- '*'
LOG_LEVEL: debug
PERSISTENT_CHANGES: true
PIDFILE: /tmp/jetconf.pid
TIMEZONE: Europe/Paris
VALIDATE_TRANSACTIONS: true
YANG_LIB_DIR: models/
HTTP_SERVER:
API_ROOT: /restconf
API_ROOT_RUNNING: /restconf_running
CA_CERT: /root/my_ca_cert/ca_localhost.pem
DBG_DISABLE_CERT: true
DISABLE_SSL: true
DOC_DEFAULT_NAME: index.html
DOC_ROOT: doc-root
LISTEN_LOCALHOST_ONLY: false
PORT: 8443
SERVER_NAME: jnas-server
SERVER_SSL_CERT: /root/my_ca_cert/server_localhost.crt
SERVER_SSL_PRIVKEY: /root/my_ca_cert/server_localhost.key
UPLOAD_SIZE_LIMIT: 1
NACM:
ALLOWED_USERS:
- example@mail.cz
ENABLED: false
2019-11-12 16:41:38,693 INFO Backend: init
2019-11-12 16:41:38,700 INFO Server started on ('::', 8443, 0, 0)
2019-11-12 16:41:44,240 ERROR Fatal error: protocol.data_received() call failed.
protocol: <jetconf.rest_server.H2Protocol object at 0x7f2fdfaac358>
transport: <_SelectorSocketTransport fd=9 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/selector_events.py", line 813, in _read_ready__data_received
self._protocol.data_received(data)
File "/root/jetconf/jetconf/rest_server.py", line 76, in data_received
events = self.conn.receive_data(data)
File "/root/jetconf/lib/python3.7/site-packages/h2/connection.py", line 1448, in receive_data
self.incoming_buffer.add_data(data)
File "/root/jetconf/lib/python3.7/site-packages/h2/frame_buffer.py", line 52, in add_data
raise ProtocolError("Invalid HTTP/2 preamble.")
h2.exceptions.ProtocolError: Invalid HTTP/2 preamble.
Am I missing something ?