# Http ParserInvalidURLError on Rasa X running on server

**URL:** <https://forum.rasa.com/t/http-parserinvalidurlerror-on-rasa-x-running-on-server/20209>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [October 23, 2019, 6:15am UTC](https://forum.rasa.com/t/http-parserinvalidurlerror-on-rasa-x-running-on-server/20209 "2019-10-23T06:15:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmm3bbb](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@mmm3bbb](https://forum.rasa.com/u/mmm3bbb)\
**Post date:** [October 23, 2019, 6:15am UTC](https://forum.rasa.com/t/http-parserinvalidurlerror-on-rasa-x-running-on-server/20209/1 "2019-10-23T06:15:36Z")

</div>

I’m running Rasa X on an Ubuntu 18 server running in Alibaba cloud and it’s throwing these errors from time to time… note that this does not happen to me running locally (macos) or on Ubuntu on AWS.

Any ideas why this might be happening and fix?

File “httptools/parser/parser.pyx”, line 471, in httptools.parser.parser.parse\_url httptools.parser.errors.HttpParserInvalidURLError: invalid url b’[www.voanews.com:443](http://www.voanews.com:443)’

File “httptools/parser/parser.pyx”, line 471, in httptools.parser.parser.parse\_url httptools.parser.errors.HttpParserInvalidURLError: invalid url b’[cn.bing.com:443](http://cn.bing.com:443)’

File “httptools/parser/parser.pyx”, line 471, in httptools.parser.parser.parse\_url httptools.parser.errors.HttpParserInvalidURLError: invalid url b’[www.baidu.com:443](http://www.baidu.com:443)’

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [October 30, 2019, 9:57am UTC](https://forum.rasa.com/t/http-parserinvalidurlerror-on-rasa-x-running-on-server/20209/2 "2019-10-30T09:57:59Z")

</div>

@mmm3bbb at what point do these errors show up? Can you paste the full stack trace?

---

<div class="post-metadata">

**Author:** ![mmm3bbb](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@mmm3bbb](https://forum.rasa.com/u/mmm3bbb)\
**Post date:** [November 8, 2019, 3:54am UTC](https://forum.rasa.com/t/http-parserinvalidurlerror-on-rasa-x-running-on-server/20209/3 "2019-11-08T03:54:37Z")

</div>

The problem seems to have gone away.

---

<div class="post-metadata">

**Author:** ![mmm3bbb](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@mmm3bbb](https://forum.rasa.com/u/mmm3bbb)\
**Post date:** [November 8, 2019, 4:05pm UTC](https://forum.rasa.com/t/http-parserinvalidurlerror-on-rasa-x-running-on-server/20209/4 "2019-11-08T16:05:31Z")

</div>

@akelad Nope, it’s still there. Here is the full stack trace.

```
Traceback (most recent call last):
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/server.py", line 273, in data_received
    self.parser.feed_data(data)
  File "httptools/parser/parser.pyx", line 193, in httptools.parser.parser.HttpParser.feed_data
httptools.parser.errors.HttpParserCallbackError: the on_headers_complete callback failed
2019-11-08 20:24:48 ERROR sanic.root - Exception occurred while handling uri: unknown
Traceback (most recent call last):
  File "httptools/parser/parser.pyx", line 292, in httptools.parser.parser.cb_on_headers_complete
  File "httptools/parser/parser.pyx", line 129, in httptools.parser.parser.HttpParser._on_headers_complete
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/server.py", line 312, in on_headers_complete
    app=self.app,
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/request.py", line 99, in __init__
    self._parsed_url = parse_url(url_bytes)
  File "httptools/parser/parser.pyx", line 471, in httptools.parser.parser.parse_url
httptools.parser.errors.HttpParserInvalidURLError: invalid url b'www.ip.cn:443'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/server.py", line 273, in data_received
    self.parser.feed_data(data)
  File "httptools/parser/parser.pyx", line 193, in httptools.parser.parser.HttpParser.feed_data
httptools.parser.errors.HttpParserCallbackError: the on_headers_complete callback failed
2019-11-08 23:38:14 ERROR sanic.root - Exception occurred while handling uri: unknown
Traceback (most recent call last):
  File "httptools/parser/parser.pyx", line 292, in httptools.parser.parser.cb_on_headers_complete
  File "httptools/parser/parser.pyx", line 129, in httptools.parser.parser.HttpParser._on_headers_complete
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/server.py", line 312, in on_headers_complete
    app=self.app,
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/request.py", line 99, in __init__
    self._parsed_url = parse_url(url_bytes)
  File "httptools/parser/parser.pyx", line 471, in httptools.parser.parser.parse_url
httptools.parser.errors.HttpParserInvalidURLError: invalid url b'www.ip.cn:443'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/server.py", line 273, in data_received
    self.parser.feed_data(data)
  File "httptools/parser/parser.pyx", line 193, in httptools.parser.parser.HttpParser.feed_data
httptools.parser.errors.HttpParserCallbackError: the on_headers_complete callback failed
2019-11-08 23:38:14 ERROR sanic.root - Exception occurred while handling uri: unknown
Traceback (most recent call last):
  File "httptools/parser/parser.pyx", line 292, in httptools.parser.parser.cb_on_headers_complete
  File "httptools/parser/parser.pyx", line 129, in httptools.parser.parser.HttpParser._on_headers_complete
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/server.py", line 312, in on_headers_complete
    app=self.app,
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/request.py", line 99, in __init__
    self._parsed_url = parse_url(url_bytes)
  File "httptools/parser/parser.pyx", line 471, in httptools.parser.parser.parse_url
httptools.parser.errors.HttpParserInvalidURLError: invalid url b'cn.bing.com:443'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/server.py", line 273, in data_received
    self.parser.feed_data(data)
  File "httptools/parser/parser.pyx", line 193, in httptools.parser.parser.HttpParser.feed_data
httptools.parser.errors.HttpParserCallbackError: the on_headers_complete callback failed
2019-11-08 23:38:18 ERROR sanic.root - Exception occurred while handling uri: unknown
Traceback (most recent call last):
  File "httptools/parser/parser.pyx", line 292, in httptools.parser.parser.cb_on_headers_complete
  File "httptools/parser/parser.pyx", line 129, in httptools.parser.parser.HttpParser._on_headers_complete
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/server.py", line 312, in on_headers_complete
    app=self.app,
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/request.py", line 99, in __init__
    self._parsed_url = parse_url(url_bytes)
  File "httptools/parser/parser.pyx", line 471, in httptools.parser.parser.parse_url
httptools.parser.errors.HttpParserInvalidURLError: invalid url b'www.baidu.com:443'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/server.py", line 273, in data_received
    self.parser.feed_data(data)
  File "httptools/parser/parser.pyx", line 193, in httptools.parser.parser.HttpParser.feed_data
httptools.parser.errors.HttpParserCallbackError: the on_headers_complete callback failed
2019-11-08 23:38:20 ERROR sanic.root - Exception occurred while handling uri: unknown
Traceback (most recent call last):
  File "httptools/parser/parser.pyx", line 292, in httptools.parser.parser.cb_on_headers_complete
  File "httptools/parser/parser.pyx", line 129, in httptools.parser.parser.HttpParser._on_headers_complete
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/server.py", line 312, in on_headers_complete
    app=self.app,
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/request.py", line 99, in __init__
    self._parsed_url = parse_url(url_bytes)
  File "httptools/parser/parser.pyx", line 471, in httptools.parser.parser.parse_url
httptools.parser.errors.HttpParserInvalidURLError: invalid url b'www.voanews.com:443'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/fr/venv/lib/python3.6/site-packages/sanic/server.py", line 273, in data_received
    self.parser.feed_data(data)
  File "httptools/parser/parser.pyx", line 193, in httptools.parser.parser.HttpParser.feed_data
httptools.parser.errors.HttpParserCallbackError: the on_headers_complete callback failed
(venv) root@ECS-SH01:~/fr/scenarios/pets_scenario#
```

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [November 11, 2019, 10:24am UTC](https://forum.rasa.com/t/http-parserinvalidurlerror-on-rasa-x-running-on-server/20209/5 "2019-11-11T10:24:01Z")

</div>

but what happens before the error is thrown? Were you uploading data?

---

<div class="post-metadata">

**Author:** ![mmm3bbb](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@mmm3bbb](https://forum.rasa.com/u/mmm3bbb)\
**Post date:** [November 11, 2019, 4:44pm UTC](https://forum.rasa.com/t/http-parserinvalidurlerror-on-rasa-x-running-on-server/20209/6 "2019-11-11T16:44:04Z")

</div>

I don’t believe it’s related to any user activity. These just get emitted from time to time. My guess is that it’s originating outside of Rasa. I will close the Rasa ports to the internet and see if that stops it.
