Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Connecting timed out. #20

Closed
charleschen84 opened this issue Jun 6, 2017 · 4 comments
Closed

Connecting timed out. #20

charleschen84 opened this issue Jun 6, 2017 · 4 comments

Comments

@charleschen84
Copy link

charleschen84 commented Jun 6, 2017

I built this project on my computer(Ubuntu64).
Every testing case is ok when i do unit test(make test).

Then i input "make integration" in the cmd line:

xianlee@intel:~/workspace/staging/build$ make integration
[100%] Built target AVSUtils
[100%] Built target AVSCommon
[100%] Built target ACL
[100%] Built target AuthDelegate
[100%] Built target Integration
[100%] Built target gmock
[100%] Built target gtest
[100%] Built target ADSL
[100%] Built target AFML
[100%] Built target ContextManager
[100%] Built target MediaPlayer
[100%] Built target KWD
[100%] Built target KITTAI
[100%] Built target AIP
[100%] Built target SpeechSynthesizer
[100%] Built target AudioInputProcessorIntegrationTest
[100%] Built target SpeechSynthesizerIntegrationTest
[100%] Built target AlexaCommunicationsLibraryTest
[100%] Built target AlexaDirectiveSequencerLibraryTest
[100%] Built target AlexaAuthorizationDelegateTest
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from AlexaAuthorizationDelegateTest
[ RUN      ] AlexaAuthorizationDelegateTest.refreshAuthToken
ConfigurationNode:initializeSuccess:configuration=**redacted**
HttpPost:doPostSucceeded:code=200
AuthDelegate:handleLwaResponseSucceeded:refreshToken=**redacted**,expiresInSeconds=3600
AuthDelegate:onAuthStateChangeCalled:state=1,error=0
[       OK ] AlexaAuthorizationDelegateTest.refreshAuthToken (1178 ms)
[ RUN      ] AlexaAuthorizationDelegateTest.invalidRefreshTokenWithUnrecoverableError
ConfigurationNode:initializeSuccess:configuration=**redacted**
ConfigurationNode:mergeDocument:reason=objectsMerged,path=root.authDelegate
ConfigurationNode:mergeDocument:reason=valueReplaced,path=root.authDelegate.refreshToken,old=**redacted**,new="InvalidRefreshToken"
ConfigurationNode:initializeSuccess:configuration=**redacted**
HttpPost:doPostSucceeded:code=400
AuthDelegate:handleLwaResponseFailed:error=invalid_grant,isUnrecoverable=true
AuthDelegate:calculatedTimeToRetry:delayMs=0
AuthDelegate:threadStopping:reason=encounteredUnrecoverableError
AuthDelegate:onAuthStateChangeCalled:state=3,error=6
[       OK ] AlexaAuthorizationDelegateTest.invalidRefreshTokenWithUnrecoverableError (1049 ms)
[----------] 2 tests from AlexaAuthorizationDelegateTest (2227 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (2227 ms total)
[  PASSED  ] 2 tests.
[==========] Running 9 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 9 tests from AlexaCommunicationsLibraryTest
[ RUN      ] AlexaCommunicationsLibraryTest.testConnectAndDisconnect
ConfigurationNode:initializeSuccess:configuration=**redacted**
HttpPost:doPostSucceeded:code=200
AuthDelegate:handleLwaResponseSucceeded:refreshToken=**redacted**,authToken=**redacted**,expiresInSeconds=3600
AuthDelegate:onAuthStateChangeCalled:state=1,error=0
*   Trying 54.239.23.243...
* Connected to avs-alexa-na.amazon.com (54.239.23.243) port 443 (#0)
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* Server certificate:
*  subject: C=US; ST=Washington; L=Seattle; O=Amazon.com, Inc.; CN=latinum.amazon.com
*  start date: Sep 22 00:00:00 2016 GMT
*  expire date: Oct 16 23:59:59 2017 GMT
*  subjectAltName: host "avs-alexa-na.amazon.com" matched cert's "avs-alexa-na.amazon.com"
*  issuer: C=US; O=Symantec Corporation; OU=Symantec Trust Network; CN=Symantec Class 3 Secure Server CA - G4
*  SSL certificate verify ok.
> GET /v20160207/directives HTTP/1.1
Host: avs-alexa-na.amazon.com
Accept: */*
Authorization: Bearer **redacted**

* Connection #0 to host avs-alexa-na.amazon.com left intact
Could not setup downchannel, retry count: 1
* Connection 0 seems to be dead!
* Closing connection 0
* Hostname avs-alexa-na.amazon.com was found in DNS cache
*   Trying 54.239.23.243...
* Connected to avs-alexa-na.amazon.com (54.239.23.243) port 443 (#1)
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* SSL re-using session ID
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* old SSL session ID is stale, removing
* Server certificate:
*  subject: C=US; ST=Washington; L=Seattle; O=Amazon.com, Inc.; CN=latinum.amazon.com
*  start date: Sep 22 00:00:00 2016 GMT
*  expire date: Oct 16 23:59:59 2017 GMT
*  subjectAltName: host "avs-alexa-na.amazon.com" matched cert's "avs-alexa-na.amazon.com"
*  issuer: C=US; O=Symantec Corporation; OU=Symantec Trust Network; CN=Symantec Class 3 Secure Server CA - G4
*  SSL certificate verify ok.
> GET /v20160207/directives HTTP/1.1
Host: avs-alexa-na.amazon.com
Accept: */*
Authorization: Bearer **redacted**
* Connection #1 to host avs-alexa-na.amazon.com left intact
Could not setup downchannel, retry count: 2
* Connection 1 seems to be dead!
* Closing connection 1
* Hostname avs-alexa-na.amazon.com was found in DNS cache
*   Trying 54.239.23.243...
* Connected to avs-alexa-na.amazon.com (54.239.23.243) port 443 (#2)
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* SSL re-using session ID
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* old SSL session ID is stale, removing
* Server certificate:
*  subject: C=US; ST=Washington; L=Seattle; O=Amazon.com, Inc.; CN=latinum.amazon.com
*  start date: Sep 22 00:00:00 2016 GMT
*  expire date: Oct 16 23:59:59 2017 GMT
*  subjectAltName: host "avs-alexa-na.amazon.com" matched cert's "avs-alexa-na.amazon.com"
*  issuer: C=US; O=Symantec Corporation; OU=Symantec Trust Network; CN=Symantec Class 3 Secure Server CA - G4
*  SSL certificate verify ok.
> GET /v20160207/directives HTTP/1.1
Host: avs-alexa-na.amazon.com
Accept: */*
Authorization: Bearer **redacted**

* Connection #2 to host avs-alexa-na.amazon.com left intact
Could not setup downchannel, retry count: 3
/home/xianlee/doc/alexa-client-sdk-master/Integration/test/AlexaCommunicationsLibraryTest.cpp:213: Failure
Value of: m_connectionStatusObserver->waitFor(ConnectionStatus::CONNECTED)
  Actual: false
Expected: true
Connecting timed out.
[  FAILED  ] AlexaCommunicationsLibraryTest.testConnectAndDisconnect (11146 ms)
[ RUN      ] AlexaCommunicationsLibraryTest.testSendEvent
ConfigurationNode:initializeSuccess:configuration=**redacted**
HttpPost:doPostSucceeded:code=200
AuthDelegate:handleLwaResponseSucceeded:refreshToken=**redacted**,authToken=**redacted**,expiresInSeconds=3600
AuthDelegate:onAuthStateChangeCalled:state=1,error=0
*   Trying 54.239.23.243...
* Connected to avs-alexa-na.amazon.com (54.239.23.243) port 443 (#0)
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* Server certificate:
*  subject: C=US; ST=Washington; L=Seattle; O=Amazon.com, Inc.; CN=latinum.amazon.com
*  start date: Sep 22 00:00:00 2016 GMT
*  expire date: Oct 16 23:59:59 2017 GMT
*  subjectAltName: host "avs-alexa-na.amazon.com" matched cert's "avs-alexa-na.amazon.com"
*  issuer: C=US; O=Symantec Corporation; OU=Symantec Trust Network; CN=Symantec Class 3 Secure Server CA - G4
*  SSL certificate verify ok.
> GET /v20160207/directives HTTP/1.1
Host: avs-alexa-na.amazon.com
Accept: */*
Authorization: Bearer **redacted**
.
.
.
.
**Finally, the testing program exited with these:**
* Connection #2 to host avs-alexa-na.amazon.com left intact
Could not setup downchannel, retry count: 3
/home/xianlee/doc/alexa-client-sdk-master/Integration/test/AlexaCommunicationsLibraryTest.cpp:213: Failure
Value of: m_connectionStatusObserver->waitFor(ConnectionStatus::CONNECTED)
  Actual: false
Expected: true
Connecting timed out.
[  FAILED  ] AlexaCommunicationsLibraryTest.testPersistentConnection (11107 ms)
[----------] 9 tests from AlexaCommunicationsLibraryTest (100363 ms total)

[----------] Global test environment tear-down
[==========] 9 tests from 1 test case ran. (100363 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 9 tests, listed below:
[  FAILED  ] AlexaCommunicationsLibraryTest.testConnectAndDisconnect
[  FAILED  ] AlexaCommunicationsLibraryTest.testSendEvent
[  FAILED  ] AlexaCommunicationsLibraryTest.testSendInvalidEvent
[  FAILED  ] AlexaCommunicationsLibraryTest.testSendEventWithAttachment
[  FAILED  ] AlexaCommunicationsLibraryTest.testSendEventAndReceiveDirective
[  FAILED  ] AlexaCommunicationsLibraryTest.testSendEventsSerially
[  FAILED  ] AlexaCommunicationsLibraryTest.testSendEventsConcurrently
[  FAILED  ] AlexaCommunicationsLibraryTest.testReceiveDirectiveOnDownchannel
[  FAILED  ] AlexaCommunicationsLibraryTest.testPersistentConnection

 9 FAILED TESTS
make[3]: *** [Integration/test/CMakeFiles/integration] Error 1
make[2]: *** [Integration/test/CMakeFiles/integration.dir/all] Error 2
make[1]: *** [Integration/test/CMakeFiles/integration.dir/rule] Error 2
make: *** [integration] Error 2

Any suggestions ? Thanks!

@JamieMeyers
Copy link
Contributor

Hi @charleschen84,

Can you please confirm the version of libcurl you are using, and that libcurl was compiled with nghttp2/HTTP2 support enabled. If you have a curl binary that links to the libcurl you are using, you can run curl --version | grep HTTP2 to see if the feature flag HTTP2 is set. You can also look at your ./configure output to see if it shows HTTP2 support: enabled (nghttp2). You may need to run ./configure --with-nghttp2 and provide the nghttp2 path to find it.

Also, please make sure to redact any of the client secrets, ids, auth bearers, refresh tokens, etc. I've gone ahead and done so for you. We're pushing a change in an upcoming release to ensure we don't log this privacy information in the future.

Thanks,
Jamie

@charleschen84
Copy link
Author

@JamieMeyers

Thanks for your reply.

xianlee@intel:~/workspace/staging/build/Integration/test$ curl --version

curl 7.50.1 (x86_64-pc-linux-gnu) libcurl/7.50.1 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 nghttp2/1.23.1 librtmp/2.3 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets

@boyce-xx
Copy link

boyce-xx commented Jun 7, 2017

@charleschen84 Your version doesn't match the required minimum:

  • C++ 11 or later
  • GNU Compiler Collection (GCC) 4.8.5 or later OR Clang 3.3 or later
  • CMake 3.0 or later
  • libcurl 7.50.2 or later
  • nghttp2 1.0 or later
  • OpenSSL 1.0.2 or later
  • Doxygen 1.8.13 or later (required to build API documentation)

Post my version for your reference:

king@wks:~/Project/DB20_Linux/AVS/Alexa_Make$ curl --version
curl 7.53.0 (x86_64-pc-linux-gnu) libcurl/7.53.0 mbedTLS/2.4.0 zlib/1.2.8 nghttp2/1.22.0 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: IPv6 Largefile SSL libz HTTP2 UnixSockets

@charleschen84
Copy link
Author

@boyce-xx Thank you.
I upgraded libcurl and openssl, it works well now.

Guillaume0477 pushed a commit to Guillaume0477/avs-device-sdk that referenced this issue Sep 16, 2019
Add XMOS changes from v1.6 and new ones
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants