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

Cannot pair fresh installed linux-mycroft - Cannot connect to mycroft service #2179

Closed
Starbase12 opened this issue Jun 30, 2019 · 13 comments
Closed

Comments

@Starbase12
Copy link

Dear Team,

it's the first time I tried to installed mycroft. Before I want to buy special hardware I want to test mycroft. Therefore I created a new VM with virtualbox and OS Debian Strech x64 (graphical installation). For the installation process i followed this simple howto: https://mycroft.ai/documentation/linux/. There seems to be no problems with that.

After installation i started all mycroft services with "./start-mycroft.sh all". After some minutes I tried speaking "Hey mycroft, pair my device". But the answers are: "it seems i cannot connect to the mycrosoft service. please give me a few minutes before trying to speak to me."

  • Checked with TCPDUMP. There seems to be no issue.
  • Checked with different Internet Connections without any firewall or proxy
  • Showing "voice.log", I found HTTP-Errors:
03:36:09.358 - mycroft.client.speech.listener:transcribe:221 - ERROR - HTTPError: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
Traceback (most recent call last):
  File "/home/chris/mycroft-core/.venv/lib/python3.5/site-packages/tornado/web.py", line 1489, in _execute
    result = self.prepare()
  File "/home/chris/mycroft-core/.venv/lib/python3.5/site-packages/tornado/web.py", line 2224, in prepare
    raise HTTPError(self._status_code)
tornado.web.HTTPError: HTTP 404: Not Found

I already tried to choose "stable"-version also (selected while install-process) but same error.

Thanks in advanced

Chris

  • I'm running a Mark 1
  • With version 0.9.10 of the Mycroft software
  • With the standard Wake Word
@forslund
Copy link
Collaborator

Hi, thanks for reporting. The pairing should have kicked off without interaction which is worrisome.

Looking into it it seems a server change is causing the backend to throw a 500 (Internal Server Error) when unauthorized accesses are tried. This causes the pairing to not trigger since it's checking for a 401 status (Not Authorized) to trigger the pairing.

The same thing seems to hold true for the STT requests. the server throws a 500 error causing the utterance to fail. The idea is that all 401 requests should be considered "pair my device" utterances but since the server hits an exception things fail.

I'll report this to the backend people, it's a really bad bug.

You should be able to work around it by using the mycroft cli to initate the pairing procedure:

./start-mycroft.sh all
./start-mycroft cli

Give Mycroft a couple of moments to bring up the pairing skill then enter "pair my device"

@hydrandt
Copy link

Even after initiating the pairing in CLI, I am unable to add new device in https://account.mycroft.ai/devices. The process seems to be successful ("Your device is ready!"), but the newly added device doesn't show in the device list, and mycroft keeps repeating the pairing code.

@forslund
Copy link
Collaborator

Hi @hydrandt,

I've gotten a similar report from @davidwagnerkc but haven't been able to reproduce myself. (tried a minute ago)

@chrisveilleux Do you have any theory?

@Starbase12
Copy link
Author

Hi @forslund,

your answer was helpful. Using the CLI I was able to register Mycroft successfully. It's working for now :-).

@hydrandt
Copy link

hydrandt commented Jul 1, 2019

The problem persists. Yesterday the log was showing 500 Internal Server Error responses, today

11:06:54.258 - mycroft.skills.padatious_service:train:93 - INFO - Mycroft is all loaded and ready to roll!
11:07:07.108 - mycroft.api:is_paired:498 - WARNING - Could not get device info: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='api.mycroft.ai', port=443): Read timed out. (read timeout=3.05)"))
11:07:27.183 - PairingSkill - INFO - Pairing code: XPCKX9
11:07:36.300 - mycroft.api:is_paired:498 - WARNING - Could not get device info: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='api.mycroft.ai', port=443): Read timed out. (read timeout=3.05)"))
11:07:39.867 - ConfigurationSkill - WARNING - Impossible to update configuration because device isn't paired

image

(I did enter the code and finished the process on https://account.mycroft.ai/devices , after finishing, the list of devices is empty)

Lots of timeouts for all the skills that are trying to get loaded. I'm in Thailand, ISP: yesterday on 3BB, today TOT. Let me know how I can help you troubleshoot. Never used mycroft before, just wanted to give it a try :-)

@hydrandt
Copy link

hydrandt commented Jul 1, 2019

I can telnet to api.mycroft.ai 443, response is immediate:

$ telnet api.mycroft.ai 443
Trying 134.209.165.212...
Connected to api.mycroft.ai.
Escape character is '^]'.
get hahaha
HTTP/1.1 400 Bad Request
Server: nginx/1.15.5 (Ubuntu)
Date: Mon, 01 Jul 2019 03:15:44 GMT
Content-Type: text/html
Content-Length: 166
Connection: close

<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.15.5 (Ubuntu)</center>
</body>
</html>
Connection closed by foreign host

@hydrandt
Copy link

hydrandt commented Jul 2, 2019

Not getting the timeout or 500s anymore, but still unable to pair - in the end of the process, nothing happens. Took a screencast:

https://cloud.ibbchina.com/f/b4fd93921b7b4d9fbf83/

@forslund
Copy link
Collaborator

forslund commented Jul 2, 2019

@hydrandt thanks for the screencast, it's likely an issue with our geography database...We've had similar issues with certain places.

I've reproduced the issue and will forward the info to @chrisveilleux who does most work on the backend.

@chrisveilleux
Copy link
Member

Hi @hydrandt,

I've gotten a similar report from @davidwagnerkc but haven't been able to reproduce myself. (tried a minute ago)

@chrisveilleux Do you have any theory?

The other day @penrods laid out what is probably an issue with pairing. If I remember correctly, there is a race condition between the time the pairing code is removed from the database and the device tries to verify the pairing. According to Steve, this has been an issue for some time. The proposed solution is to add a separate API call to delete the pairing code from the database after the device considers pairing complete. I will add this task to our scrum board.

@chrisveilleux
Copy link
Member

The problem persists. Yesterday the log was showing 500 Internal Server Error responses, today

11:06:54.258 - mycroft.skills.padatious_service:train:93 - INFO - Mycroft is all loaded and ready to roll!
11:07:07.108 - mycroft.api:is_paired:498 - WARNING - Could not get device info: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='api.mycroft.ai', port=443): Read timed out. (read timeout=3.05)"))
11:07:27.183 - PairingSkill - INFO - Pairing code: XPCKX9
11:07:36.300 - mycroft.api:is_paired:498 - WARNING - Could not get device info: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='api.mycroft.ai', port=443): Read timed out. (read timeout=3.05)"))
11:07:39.867 - ConfigurationSkill - WARNING - Impossible to update configuration because device isn't paired

image

(I did enter the code and finished the process on https://account.mycroft.ai/devices , after finishing, the list of devices is empty)

Lots of timeouts for all the skills that are trying to get loaded. I'm in Thailand, ISP: yesterday on 3BB, today TOT. Let me know how I can help you troubleshoot. Never used mycroft before, just wanted to give it a try :-)

This is a temporary issue that has since been addressed. You should not get a 500 error any more.

@forslund
Copy link
Collaborator

forslund commented Jul 2, 2019

@hydrandt We found the issue, the city Ko Pha Ngan had a duplicate entry in the geolocation database causing an error when completing the pairing. @chrisveilleux removed the duplicate and I could successfully pair using your information.

Thanks for reporting in such a concise way. Please retry and verify when you get the time!

@hydrandt
Copy link

hydrandt commented Jul 2, 2019

Great, now it works!

Now, installing skills from https://market.mycroft.ai/skills doesn't seem to work (clicking the button doesn't do anything; asking mycroft to install that skill does work), nor can I change the voice (I switched to American Female, but my mycroft is still a very robotic male) -- are these known issues or shall I start new ones?

@forslund
Copy link
Collaborator

forslund commented Jul 2, 2019

The market place is an issue we're working on.

American Female is subscriber only I think (bad feedback on that on the website) and takes quite some time to download. It will be replaced in the soonish (a month - or two maybe?) with a version based on the Mimic2 tech.

The least robotic voice should be the American Male which is based on Mimic2.

These are separate issues so I'll close this one and if you feel you want to open separate issues for these go right ahead.

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