Installing Foxx service from GitHub fails #28

Open
bard opened this Issue Feb 10, 2017 · 5 comments

Projects

None yet

2 participants

@bard
bard commented Feb 10, 2017

Installing a service from GitHub using the web interface fails silently.

The log says:

Failed to update Foxx store: ArangoError: service download failed: Github download from 
'https://github.com/arangodb/foxx-apps/archive/master.zip' failed with error code 500

Perhaps a problem with certificates, because this (d9b609c73057 being the id of the arangodb container):

$ docker exec -it d9b609c73057 curl https://github.com/arangodb/foxx-apps/archive/master.zip

Results in this:

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
@bard
bard commented Feb 10, 2017

apt-get update && apt-get install ca-certificates in the container fixed it.

@dothebart
Contributor

which container do you use?

@bard
bard commented Feb 10, 2017 edited

https://hub.docker.com/_/arangodb/ (pulled yesterday)

$docker images | grep arango
arangodb                      latest              5aa989580ba8        3 days ago          322.6 MB
@dothebart dothebart added the bug label Feb 10, 2017
@dothebart
Contributor

Hm,
one of the template steps is:

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        libjemalloc1 \
	libsnappy1 \
        ca-certificates \
        pwgen \
        curl \
    && \
    rm -rf /var/lib/apt/lists/*

So, do you get the certificate package as an update? So basically 'apt-get update; apt-get upgrade' ?

@bard
bard commented Feb 10, 2017

No, I have to install the package explicitly.

Here's a session transcript on a freshly pulled container:

$ docker exec -it 0b9b  /bin/bash
root@0b9b1895a235:/# dpkg --get-selections | grep ca-cert
root@0b9b1895a235:/#
root@0b9b1895a235:/# apt-get update && apt-get upgrade
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Ign http://deb.debian.org jessie InRelease                                     
Get:2 http://deb.debian.org jessie-updates InRelease [145 kB]              
Get:3 http://security.debian.org jessie/updates/main amd64 Packages [437 kB]      
Get:4 http://deb.debian.org jessie Release.gpg [2373 B]           
Get:5 http://deb.debian.org jessie Release [148 kB]                                          
Get:6 http://deb.debian.org jessie-updates/main amd64 Packages [17.6 kB]            
Get:7 http://deb.debian.org jessie/main amd64 Packages [9049 kB]                      
Fetched 9862 kB in 16s (598 kB/s)                                                                                                                             
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... The following package was automatically installed and is no longer required:
  openssl
Use 'apt-get autoremove' to remove it.
Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@0b9b1895a235:/# dpkg --get-selections | grep ca-cert    
root@0b9b1895a235:/# apt-get install ca-certificates
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  ca-certificates
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 207 kB of archives.
After this operation, 468 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian/ jessie/main ca-certificates all 20141019+deb8u2 [207 kB]
Fetched 207 kB in 1s (199 kB/s)        
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package ca-certificates.
(Reading database ... 15735 files and directories currently installed.)
Preparing to unpack .../ca-certificates_20141019+deb8u2_all.deb ...
Unpacking ca-certificates (20141019+deb8u2) ...
Setting up ca-certificates (20141019+deb8u2) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/p
erl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/loc
al/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
/usr/sbin/update-ca-certificates: [--verbose] [--fresh]
Processing triggers for ca-certificates (20141019+deb8u2) ...
Updating certificates in /etc/ssl/certs... 174 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....done.
root@0b9b1895a235:/# dpkg --get-selections | grep ca-cert                                               
ca-certificates                                 install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment