question

mark4in avatar image
mark4in asked

Remote HTTPS server with Client : Problem accessing the service

Hi, I have an HTTPS aws ec2 instance implementing the server side functionality of Alexa Voice Service. This works perfectly : Listening on port 3000 The problem is when I "mvn exec:java" on my client, I get this message : Requesting Registration Code There was a problem accessing the service. Please make sure the server is running. Retrying in 2 seconds. There was a problem accessing the service. Please make sure the server is running. Retrying in 2 seconds. There was a problem accessing the service. Please make sure the server is running. Retrying in 2 seconds. There were too many retries. Please restart the server and try again. I was successfully able to implement the alexa sample code when both the server and client are on the localhost. Please help me trouble shoot this remote client-server setup to run AVS.
alexa skills kitsubmission testing certification
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mark4in avatar image
mark4in answered
adding more info... I was also able to manually generate the regcode by putting this on the web browser url : https:// /device/regcode/ / . and then use this regcode in url : https:// /device/register/ to successfully get "device tokens ready" but things dont work as expected when I try to execute mvn exec:java on the client machine. The Alexa Voise Service popup opens but the "Bearer Code" never gets populated.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

swasey@amazon avatar image
swasey@amazon answered
Could you please post what you have listed as your url in your config.json? By default it's "https://localhost:3000", but in this situation it'd be the server address of your ec2 instance. Also make sure it doesn't have a trailing slash: that has been an issue in the past. I'd also like to make sure you imported the self signed certificate of the service into the keystore of the JVM that is running the sample Java code. Without doing that the sample code won't be able to validate that the certificate is valid, causing it to not connect. When you got the regCode from your browser you also probably got a warning saying that the connection was insecure or something along those lines that you had to dismiss; the sample code is getting basically the same thing but it's not able to just "dismiss" it. To get around that, please make sure you did step #9 on the following page: https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/docs/reference-implementation-guide#Generating%20A%20Self-Signed%20Certificate%20for%20the%20Server
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.