question

mark4in avatar image
mark4in asked

Remote HTTPS Alexa server on AWS. 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. 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. Please help me trouble shoot this remote client-server setup to run AVS.
alexa voice service
10 |5000

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

Bobby@Amazon avatar image
Bobby@Amazon answered
Hi, Just to double check, you have updated the config.json file in the javaclient to point to the appropriate server endpoint right? Thanks, Bobby
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
Yes the config file is updated correctly. I double triple checked that.
10 |5000

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

Vikas S. avatar image
Vikas S. answered
Could this be a pom file issue? I dd not change anything in the (sample app) pom file when I migrated from AVS setup running on localhost to AVS server running on the cloud (aws ec2 instance). It has been 2 days and I am not able to figure out what's wrong. Please help.
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
I was able to Solve it my self. It was an trustcacerts issue as the server.crt was not imported into the keychain on the client side. Since the sample example given by amazon aws ( https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/docs/reference-implementation-guide) runs both the client and the server on the localhost, the guide talks about doing this step only once : Enter sudo keytool -import -v -trustcacerts -alias avs-companion-service -file server.crt -keystore $JAVA_HOME/jre/lib/security/cacerts -keypass changeit -storepass changeit but if the client and server are running on two different machines then both need to import the crt in keystore.
10 |5000

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