Giter Club home page Giter Club logo

Comments (9)

joseolcese avatar joseolcese commented on July 30, 2024 2

I think this issue can be closed. the echo dot does not support self-signed certs.

from geemusic.

jolcese avatar jolcese commented on July 30, 2024

I've exactly the same problem... Even an ubiquiti Edgerouter and can't make it work... Do you know why do you need to pass the external URL to the app? I'm wondering if that is somehow used by the dot but the dot does not like the self signed certificate. I will try with a real cert

from geemusic.

jolcese avatar jolcese commented on July 30, 2024

I was able to make it work with Nginx. One thing I did was to use a real cert but I still was having the same issue and I realized that the echo dot does a request to the server and the server does a 302 redirect to google.
The problem was that the external url when requested inside my lan was resolving incorrectly so the echo dot was not able to reach my server. Hope it helps. I'll try to revert back to a self signed cert but my guess is that the echo dot requires a proper signed cert.

from geemusic.

citrusfizz avatar citrusfizz commented on July 30, 2024

@jolcese
I actually am using a ERL as well, i have had hairpin nat turned on this whole time, which should allow external domain name to resolve to my server. what changes did you make in the ERL configure?

from geemusic.

jolcese avatar jolcese commented on July 30, 2024

I also have hairpin NAT enabled.

My config looks like this:

 port-forward {                                                                   
     auto-firewall enable                                                         
     hairpin-nat enable                                                           
     lan-interface br0                                                            
     rule 1 {                                                                     
         description GeeMusic                                                     
         forward-to {                                                             
             address 192.168.1.70                                                 
             port 6443                                                            
         }                                                                        
         original-port 443                                                        
         protocol tcp_udp                                                         
     }                                                                            
     wan-interface eth0                                                           
 }    

from geemusic.

leaskovski avatar leaskovski commented on July 30, 2024

Hey guys, I seem to have the exact same issue as you, however Im not using a similar setup to you.

Initially I was running flask using the 4000 port, and using ngrok to hook that up to an ngrok https address. I decided to drop the use of ngrok and modify the server.py file to basically start flask up with an sslcontext using a key and certificate generated following amazons guide.

from geemusic import app
import os
import ssl
if name == 'main': port = int(os.environ.get("PORT", 4000))
  app.run(host='0.0.0.0', port=port, debug=True, ssl_context=('/opt/geemusic/certificate.pem', '/opt/geemusic/private-key.pem'))

My router is set to forward requests on 443 down to my PI which is running flask with a HTTPS setup. When this is running, the test page works for hello commands. All good.

Then when I test to play some music, basically the request is fielded by the Echo Dot, but music never plays. I can see the request come in, the dot tells me it is going to play some msuic by the artist requests, but never starts playing.

The output of the flask server is basically this:

54.240.197.12 - - [10/Feb/2017 15:38:35] "POST /alexa HTTP/1.1" 200 -
54.240.197.12 - - [10/Feb/2017 15:38:36] "POST /alexa HTTP/1.1" 400 -

Any ideas? I am guessing I am having the same issue as you. Whats the best way to debug this issue?

from geemusic.

leaskovski avatar leaskovski commented on July 30, 2024

So I installed tcpdump on my rig to monitor what traffic is going on:

21:58:31.304324 IP 72.21.217.107.19806 > raspberrypi.https: Flags [S], seq 246487640, win 17922, options [mss 1460,sackOK,TS val 52631063 ecr 0,nop,wscale 8], length 0
21:58:31.305114 IP raspberrypi.https > 72.21.217.107.19806: Flags [S.], seq 2886229757, ack 246487641, win 28960, options [mss 1460,sackOK,TS val 703151 ecr 52631063,nop,wscale 6], length 0
21:58:31.389065 IP 72.21.217.107.19806 > raspberrypi.https: Flags [.], ack 1, win 71, options [nop,nop,TS val 52631076 ecr 703151], length 0
21:58:31.389069 IP 72.21.217.107.19806 > raspberrypi.https: Flags [P.], seq 1:228, ack 1, win 71, options [nop,nop,TS val 52631076 ecr 703151], length 227
21:58:31.390437 IP raspberrypi.https > 72.21.217.107.19806: Flags [.], ack 228, win 470, options [nop,nop,TS val 703159 ecr 52631076], length 0
21:58:31.393823 IP raspberrypi.https > 72.21.217.107.19806: Flags [P.], seq 1:1023, ack 228, win 470, options [nop,nop,TS val 703159 ecr 52631076], length 1022
21:58:31.478507 IP 72.21.217.107.19806 > raspberrypi.https: Flags [.], ack 1023, win 78, options [nop,nop,TS val 52631085 ecr 703159], length 0
21:58:31.478510 IP 72.21.217.107.19806 > raspberrypi.https: Flags [P.], seq 228:495, ack 1023, win 78, options [nop,nop,TS val 52631085 ecr 703159], length 267
21:58:31.479934 IP 72.21.217.107.19806 > raspberrypi.https: Flags [P.], seq 495:501, ack 1023, win 78, options [nop,nop,TS val 52631085 ecr 703159], length 6
21:58:31.479937 IP 72.21.217.107.19806 > raspberrypi.https: Flags [P.], seq 501:554, ack 1023, win 78, options [nop,nop,TS val 52631085 ecr 703159], length 53
21:58:31.513957 IP raspberrypi.https > 72.21.217.107.19806: Flags [.], ack 554, win 486, options [nop,nop,TS val 703172 ecr 52631085], length 0
21:58:31.575021 IP raspberrypi.https > 72.21.217.107.19806: Flags [P.], seq 1023:1082, ack 554, win 486, options [nop,nop,TS val 703178 ecr 52631085], length 59
21:58:31.660387 IP 72.21.217.107.19806 > raspberrypi.https: Flags [.], seq 554:2002, ack 1082, win 78, options [nop,nop,TS val 52631103 ecr 703178], length 1448
21:58:31.660391 IP 72.21.217.107.19806 > raspberrypi.https: Flags [P.], seq 2002:2015, ack 1082, win 78, options [nop,nop,TS val 52631103 ecr 703178], length 13
21:58:31.667532 IP raspberrypi.https > 72.21.217.107.19806: Flags [.], ack 2002, win 532, options [nop,nop,TS val 703187 ecr 52631103], length 0
21:58:31.668250 IP raspberrypi.https > 72.21.217.107.19806: Flags [.], ack 2015, win 532, options [nop,nop,TS val 703187 ecr 52631103], length 0
21:58:31.723743 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [S], seq 862761188, win 29200, options [mss 1460,sackOK,TS val 703192 ecr 0,nop,wscale 6], length 0
21:58:31.807852 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [S.], seq 193843834, ack 862761189, win 29200, options [mss 1432,wscale 8,nop,sackOK,nop,nop], length 0
21:58:31.808713 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [.], ack 1, win 457, length 0
21:58:31.814691 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [P.], seq 1:518, ack 1, win 457, length 517
21:58:31.897456 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [.], ack 518, win 62, length 0
21:58:31.897460 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [P.], seq 1:93, ack 518, win 62, length 92
21:58:31.899076 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [.], seq 93:1525, ack 518, win 62, length 1432
21:58:31.900205 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [P.], seq 1525:2749, ack 518, win 62, length 1224
21:58:31.900209 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [P.], seq 2749:3087, ack 518, win 62, length 338
21:58:31.900211 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [P.], seq 3087:3096, ack 518, win 62, length 9
21:58:31.906974 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [.], ack 93, win 457, length 0
21:58:31.907695 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [.], ack 1525, win 502, length 0
21:58:31.908344 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [.], ack 2749, win 547, length 0
21:58:31.908984 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [.], ack 3087, win 592, length 0
21:58:31.909621 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [.], ack 3096, win 592, length 0
21:58:32.006137 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [P.], seq 518:644, ack 3096, win 592, length 126
21:58:32.089484 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [P.], seq 3096:3102, ack 644, win 62, length 6
21:58:32.089487 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [P.], seq 3102:3147, ack 644, win 62, length 45
21:58:32.094946 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [.], ack 3102, win 592, length 0
21:58:32.095669 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [.], ack 3147, win 592, length 0
21:58:32.104540 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [P.], seq 644:820, ack 3147, win 592, length 176
21:58:32.203350 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [P.], seq 3147:3567, ack 820, win 66, length 420
21:58:32.205378 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [.], seq 3567:4999, ack 820, win 66, length 1432
21:58:32.205382 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [.], seq 4999:6431, ack 820, win 66, length 1432
21:58:32.205384 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [P.], seq 6431:7430, ack 820, win 66, length 999
21:58:32.205385 IP s3-1.amazonaws.com.https > raspberrypi.59842: Flags [P.], seq 7430:7461, ack 820, win 66, length 31
21:58:32.210403 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [.], ack 4999, win 682, length 0
21:58:32.211152 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [.], ack 7430, win 773, length 0
21:58:32.222412 IP raspberrypi.59842 > s3-1.amazonaws.com.https: Flags [R.], seq 820, ack 7461, win 773, length 0
21:58:32.322129 IP raspberrypi.55104 > lhr25s07-in-f10.1e100.net.https: Flags [F.], seq 1813425635, ack 424703522, win 2534, options [nop,nop,TS val 703252 ecr 15304693], length 0
21:58:32.346131 IP raspberrypi.54296 > lhr25s10-in-f170.1e100.net.https: Flags [S], seq 2082322867, win 29200, options [mss 1460,sackOK,TS val 703255 ecr 0,nop,wscale 6], length 0
21:58:32.357416 IP lhr25s10-in-f170.1e100.net.https > raspberrypi.54296: Flags [S.], seq 2709553736, ack 2082322868, win 42540, options [mss 1430,sackOK,TS val 875448570 ecr 703255,nop,wscale 7], length 0
21:58:32.358157 IP raspberrypi.54296 > lhr25s10-in-f170.1e100.net.https: Flags [.], ack 1, win 457, options [nop,nop,TS val 703256 ecr 875448570], length 0
21:58:32.533990 IP raspberrypi.55104 > lhr25s07-in-f10.1e100.net.https: Flags [F.], seq 0, ack 1, win 2534, options [nop,nop,TS val 703274 ecr 15304693], length 0

I can see traffic going out to the google servers and messages coming back, but Im not sure what is happening. Running with ngrok, it all works fine, running my own HTTPS server opened up, does not. I only have a self signed cert as per the amazon docs, do we know if the Google Music API doesn't like those types of certs?

from geemusic.

joseolcese avatar joseolcese commented on July 30, 2024

My guess is when the echo DOT tries to access the server to get the streaming URL, it fails because the cert is self-signed. Try with a proper cert.

from geemusic.

leaskovski avatar leaskovski commented on July 30, 2024

Yep, I managed to use LetsEncrypt to get a proper cert, and now I am a little further down the line, though I have stumbled on to a new issue which is described here:

#66

I guess maybe the readme needs updating to say that self signed certs aren't good for this, because of the coms with Google.

from geemusic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.