Curl failed with code 7 (Couldn't connect to server)
Closed this issue · 6 comments
Hello, I am having issues connecting to the server after compiling the program
export LD_LIBRARY_PATH=/usr/local/acvp/lib:/usr/local/lib:/usr/local/ssl/lib:$LD_LIBRARY_PATH
./scripts/nist_setup.sh
app/acvp_app --aes --verbose
Using the following parameters:
ACV_SERVER: 127.0.0.1
ACV_PORT: 443
ACV_URI_PREFIX: /acvp/v1/
Warning: No server set, using default. Please define ACV_SERVER in your environment.
Run acvp_app --help for more information on this and other environment variables.
***ACVP [STATUS][acvp_login:2509]--> Logging in...
***ACVP [INFO][acvp_http_user_agent_handler:483]--> HTTP User-Agent: libacvp/1.0;Linux;4.4.0-210-generic;x86_64;Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz;GCC/5.3.1
***ACVP [ERR][acvp_curl_http_post:726]--> Curl failed with code 7 (Couldn't connect to server)
***ACVP [INFO][log_network_status:1464]--> POST Login...
Status: 0
Url: https://127.0.0.1:443/acvp/v1/login
Resp: Recieved
***ACVP [ERR][log_network_status:1489]--> Received no response from server.
***ACVP [STATUS][acvp_login:2521]--> Login Send Failed
***ACVP [ERR][acvp_run:3200]--> Failed to login with ACVP server
Can you please help with this?
Hello,
it looks like your environment never got set up - the ACV server is still set to localhost (127.0.0.1) instead of the NIST server. Somehow the variables in nist_setup.sh never got set. Maybe try running source scripts/nist_setup.sh
instead of just calling it regularly?
Hope this helps,
Andrew
Hi Andrew,
I tried both ./nist_setup.sh and source nist_setup.sh, noticed different behavior.
- when I do source nist_setup.sh - I see segmentation fault**_
root@gm:/libacvp/scripts# source nist_setup.sh
root@gm:/home/mchp/libacvp# cd app/
root@mchp:/home/mchp/libacvp/app# ./acvp_app --aes
Using the following parameters:
ACV_SERVER: demo.acvts.nist.gov
ACV_PORT: 443
ACV_URI_PREFIX: /acvp/v1/
ACV_CA_FILE: /home/mchp/libacvp/certs/mozzila_trust_anchors.pem
ACV_CERT_FILE: /home/mchp/libacvp/certs/Microchip_Goutham_Markandeya_Demo.cer
ACV_KEY_FILE: /home/mchp/libacvp/certs/Private_nopasscode.key
***ACVP [STATUS][acvp_login:2509]--> Logging in...
Segmentation fault (core dumped)
- When I do ./nist_setup.sh - I see Curl failed with code 7 (Couldn't connect to server)
root@gm:/home/mchp/libacvp/scripts# ./nist_setup.sh
root@gm:/home/mchp/libacvp/scripts# cd ../
root@gm:/home/mchp/libacvp# cd app/
root@gm:/home/mchp/libacvp/app# ./acvp_app --aes
Using the following parameters:
ACV_SERVER: 127.0.0.1
ACV_PORT: 443
ACV_URI_PREFIX: /acvp/v1/
Warning: No server set, using default. Please define ACV_SERVER in your environment.
Run acvp_app --help for more information on this and other environment variables.
***ACVP [STATUS][acvp_login:2509]--> Logging in...
***ACVP [ERR][acvp_curl_http_post:726]--> Curl failed with code 7 (Couldn't connect to server)
***ACVP [ERR][log_network_status:1489]--> Received no response from server.
***ACVP [STATUS][acvp_login:2521]--> Login Send Failed
***ACVP [ERR][acvp_run:3200]--> Failed to login with ACVP server
Apparently whatever shell you are using does not like if your run ./nist_setup.sh. When you source it the env variables are getting set but you're hitting the seg fault. We can't analyze the seg fault without you providing a backtrace. gdb would be your best bet to provide that.
When did you pull the libacvp code and from what branch ?
Regards,
Barry
Hi Barry,
Sorry for Segmentation fault I opened another ticket and uploaded the trace and details.
Please refer #648
OK, since the issue is with your shell - it does not handle ./nist_setup.sh properly and you have a way to accomplish it anyway with 'source' we should just close this ticket and focus on the seg fault. I think Andrew just provided some guidance.
Agreed, we can close this ticket. THank you!!