curl_easy_perform() failed: Couldn't connect to server #yocto #linux


Vijay Rakesh Munganda
 

Hi, 

I'm trying to do HTTPS POST using curl with CA certificate, but I got an error as "curl_easy_perform() failed: Couldn't connect to server". The same code works on a Linux machine but not on my target board, I can't understand what I'm missing. I have an active internet connection without any firewall. Kindly please give any suggestions.

Thanks & Regards,
Vijay


Khem Raj
 

On 12/11/20 2:26 AM, vijayrakeshmunganda@gmail.com wrote:
Hi,
I'm trying to do HTTPS POST using curl with CA certificate, but I got an error as "curl_easy_perform() failed: Couldn't connect to server". The same code works on a Linux machine but not on my target board, I can't understand what I'm missing. I have an active internet connection without any firewall. Kindly please give any suggestions.
check what all packageconfig is being used are you using gnutls, then you might want to try nss or openssl and see if that helps.

Thanks & Regards,
Vijay


Vijay Rakesh Munganda
 

On Fri, Dec 11, 2020 at 09:04 AM, Khem Raj wrote:
On 12/11/20 2:26 AM, vijayrakeshmunganda@... wrote:
Hi,

I'm trying to do HTTPS POST using curl with CA certificate, but I got an
error as "curl_easy_perform() failed: Couldn't connect to server". The
same code works on a Linux machine but not on my target board, I can't
understand what I'm missing. I have an active internet connection
without any firewall. Kindly please give any suggestions.
check what all packageconfig is being used are you using gnutls, then
you might want to try nss or openssl and see if that helps.

Thanks & Regards,
Vijay




 Hi Khem Raj,

Thanks for the reply. I had installed openssl and curl, but not gnutls because compilation was successful. I’ll definitely try ur suggestion. Thank you! 

Please correct me if I’m wrong, even if dependent packages are not installed on target system will compilation done successfully? I’m
also facing similar issue with zbar, compilation was successful and perfectly executing on Linux PC, but not my target board even after installing zbar package. 

Thanks & Regards,
Vijay Rakesh. 


Khem Raj
 

On Fri, Dec 11, 2020 at 9:51 AM <vijayrakeshmunganda@gmail.com> wrote:

On Fri, Dec 11, 2020 at 09:04 AM, Khem Raj wrote:

On 12/11/20 2:26 AM, vijayrakeshmunganda@gmail.com wrote:

Hi,

I'm trying to do HTTPS POST using curl with CA certificate, but I got an
error as "curl_easy_perform() failed: Couldn't connect to server". The
same code works on a Linux machine but not on my target board, I can't
understand what I'm missing. I have an active internet connection
without any firewall. Kindly please give any suggestions.

check what all packageconfig is being used are you using gnutls, then
you might want to try nss or openssl and see if that helps.
hard to say, unless more details are available, usually runtime deps
and build time deps are handled fine but there might
be some outliers.

Thanks & Regards,
Vijay




Hi Khem Raj,

Thanks for the reply. I had installed openssl and curl, but not gnutls because compilation was successful. I’ll definitely try ur suggestion. Thank you!

Please correct me if I’m wrong, even if dependent packages are not installed on target system will compilation done successfully? I’m
also facing similar issue with zbar, compilation was successful and perfectly executing on Linux PC, but not my target board even after installing zbar package.

Thanks & Regards,
Vijay Rakesh.




Vijay Rakesh Munganda
 

Hi Khem Raj,

It worked. Included gnutls and tested with other network.

Thanks & Regards,
Vijay Rakesh

On 12-Dec-2020, at 00:07, Khem Raj <raj.khem@gmail.com> wrote:

On Fri, Dec 11, 2020 at 9:51 AM <vijayrakeshmunganda@gmail.com> wrote:

On Fri, Dec 11, 2020 at 09:04 AM, Khem Raj wrote:

On 12/11/20 2:26 AM, vijayrakeshmunganda@gmail.com wrote:

Hi,

I'm trying to do HTTPS POST using curl with CA certificate, but I got an
error as "curl_easy_perform() failed: Couldn't connect to server". The
same code works on a Linux machine but not on my target board, I can't
understand what I'm missing. I have an active internet connection
without any firewall. Kindly please give any suggestions.

check what all packageconfig is being used are you using gnutls, then
you might want to try nss or openssl and see if that helps.
hard to say, unless more details are available, usually runtime deps
and build time deps are handled fine but there might
be some outliers.

Thanks & Regards,
Vijay




Hi Khem Raj,

Thanks for the reply. I had installed openssl and curl, but not gnutls because compilation was successful. I’ll definitely try ur suggestion. Thank you!

Please correct me if I’m wrong, even if dependent packages are not installed on target system will compilation done successfully? I’m
also facing similar issue with zbar, compilation was successful and perfectly executing on Linux PC, but not my target board even after installing zbar package.

Thanks & Regards,
Vijay Rakesh.




Vijay Rakesh Munganda
 

Hi Khem raj,

Regarding zbar, I found the video option was disabled in the .bb file, so I had changed it to --enable-video and ran the build, but the build failed at do_install. Do I Need to make change anything else? 

Log:
|  /home/bl-docker/rity/bsp/tmp/hosttools/mkdir -p '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/image/usr/bin'
|   ./aarch64-poky-linux-libtool   --mode=install /home/bl-docker/rity/bsp/tmp/hosttools/install -c zbarcam/zbarcam '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/image/usr/bin'
|  /home/bl-docker/rity/bsp/tmp/hosttools/install -c -m 644 ../git/doc/man/zbarcam.1 '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/image/usr/share/man/man1'
| /home/bl-docker/rity/bsp/tmp/hosttools/install: cannot stat '../git/doc/man/zbarcam.1': No such file or directory
| Makefile:2386: recipe for target 'install-man1' failed
| make[3]: *** [install-man1] Error 1
| make[3]: *** Waiting for unfinished jobs....
| aarch64-poky-linux-libtool: warning: 'zbar/libzbar.la' has not been installed in '/usr/lib'
| aarch64-poky-linux-libtool: install: /home/bl-docker/rity/bsp/tmp/hosttools/install -c zbarcam/.libs/zbarcam /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/image/usr/bin/zbarcam
| make[3]: Leaving directory '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/build'
| Makefile:2850: recipe for target 'install-am' failed
| make[2]: *** [install-am] Error 2
| make[2]: Leaving directory '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/build'
| Makefile:2541: recipe for target 'install-recursive' failed
| make[1]: *** [install-recursive] Error 1
| make[1]: Leaving directory '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/build'
| Makefile:2844: recipe for target 'install' failed
| make: *** [install] Error 2
| WARNING: /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/temp/run.do_install.15449:1 exit 1 from 'exit 1'

Thanks & Regards,
Vijay Rakesh.


Khem Raj
 

On Mon, Dec 14, 2020 at 12:02 AM Vijay Rakesh Munganda
<vijayrakeshmunganda@gmail.com> wrote:

Hi Khem raj,

Regarding zbar, I found the video option was disabled in the .bb file, so I had changed it to --enable-video and ran the build, but the build failed at do_install. Do I Need to make change anything else?

Log:
| /home/bl-docker/rity/bsp/tmp/hosttools/mkdir -p '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/image/usr/bin'
| ./aarch64-poky-linux-libtool --mode=install /home/bl-docker/rity/bsp/tmp/hosttools/install -c zbarcam/zbarcam '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/image/usr/bin'
| /home/bl-docker/rity/bsp/tmp/hosttools/install -c -m 644 ../git/doc/man/zbarcam.1 '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/image/usr/share/man/man1'
| /home/bl-docker/rity/bsp/tmp/hosttools/install: cannot stat '../git/doc/man/zbarcam.1': No such file or directory
| Makefile:2386: recipe for target 'install-man1' failed
| make[3]: *** [install-man1] Error 1
| make[3]: *** Waiting for unfinished jobs....
| aarch64-poky-linux-libtool: warning: 'zbar/libzbar.la' has not been installed in '/usr/lib'
| aarch64-poky-linux-libtool: install: /home/bl-docker/rity/bsp/tmp/hosttools/install -c zbarcam/.libs/zbarcam /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/image/usr/bin/zbarcam
| make[3]: Leaving directory '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/build'
| Makefile:2850: recipe for target 'install-am' failed
| make[2]: *** [install-am] Error 2
| make[2]: Leaving directory '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/build'
| Makefile:2541: recipe for target 'install-recursive' failed
| make[1]: *** [install-recursive] Error 1
| make[1]: Leaving directory '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/build'
| Makefile:2844: recipe for target 'install' failed
| make: *** [install] Error 2
| WARNING: /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/temp/run.do_install.15449:1 exit 1 from 'exit 1'
you might want to check if there is a way to disable
building/installing manpages, most of the times you don't need them on
embedded targets.

Thanks & Regards,
Vijay Rakesh.



Vijay Rakesh Munganda
 

Hi Khem Raj,

I had checked, but I couldn’t find any such option in .bb file. As I’m to new to Yocto, can you kindly please tell me how to remove man page option.

Thanks & Regards,
Vijay Rakesh

On 15-Dec-2020, at 03:00, Khem Raj <raj.khem@gmail.com> wrote:
On Mon, Dec 14, 2020 at 12:02 AM Vijay Rakesh Munganda
<vijayrakeshmunganda@gmail.com> wrote:

Hi Khem raj,

Regarding zbar, I found the video option was disabled in the .bb file, so I had changed it to --enable-video and ran the build, but the build failed at do_install. Do I Need to make change anything else?

Log:
| /home/bl-docker/rity/bsp/tmp/hosttools/mkdir -p '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/image/usr/bin'
| ./aarch64-poky-linux-libtool --mode=install /home/bl-docker/rity/bsp/tmp/hosttools/install -c zbarcam/zbarcam '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/image/usr/bin'
| /home/bl-docker/rity/bsp/tmp/hosttools/install -c -m 644 ../git/doc/man/zbarcam.1 '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/image/usr/share/man/man1'
| /home/bl-docker/rity/bsp/tmp/hosttools/install: cannot stat '../git/doc/man/zbarcam.1': No such file or directory
| Makefile:2386: recipe for target 'install-man1' failed
| make[3]: *** [install-man1] Error 1
| make[3]: *** Waiting for unfinished jobs....
| aarch64-poky-linux-libtool: warning: 'zbar/libzbar.la' has not been installed in '/usr/lib'
| aarch64-poky-linux-libtool: install: /home/bl-docker/rity/bsp/tmp/hosttools/install -c zbarcam/.libs/zbarcam /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/image/usr/bin/zbarcam
| make[3]: Leaving directory '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/build'
| Makefile:2850: recipe for target 'install-am' failed
| make[2]: *** [install-am] Error 2
| make[2]: Leaving directory '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/build'
| Makefile:2541: recipe for target 'install-recursive' failed
| make[1]: *** [install-recursive] Error 1
| make[1]: Leaving directory '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/build'
| Makefile:2844: recipe for target 'install' failed
| make: *** [install] Error 2
| WARNING: /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/zbar/0.10+gitAUTOINC+67003d2a98-r0/temp/run.do_install.15449:1 exit 1 from 'exit 1'
you might want to check if there is a way to disable
building/installing manpages, most of the times you don't need them on
embedded targets.

Thanks & Regards,
Vijay Rakesh.