Failed to bootstrap: Failure with receiving network data


#1

Edit: The error changed, see 2nd post.

I tried rebuilding my app today.

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && git pull failed with return #<Process::Status: pid 189 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"code", "cmd"=>["git reset --hard", "git clean -f", "git remote set-branches --add origin master", "git pull", "git fetch origin $version", "git checkout $version", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p                    /shared/log/rails", "bash -c \"touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log\"", "bash -c \"ln    -s           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log $home/log\"", "bash -c \"mkdir -p           /shared/{uploads,backups}\"", "bash -c \"ln    -s           /shared/{uploads,backups} $home/public\"", "chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups"]}
5eb4b2121e0bf2175cbf9ad39f9fb36bffa72011858ff54d6405c009bc0b0068
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Error is here:

INFO -- : > cd /var/www/discourse && git pull
fatal: unable to access 'https://github.com/discourse/discourse.git/': GnuTLS recv error (-54): Error in the pull function.

The bigger picture:
This morning there was an issue with the Encryption of the site. Chrome reported: NET::ERR_CERT_AUTHORITY_INVALID
That’s why I tried a rebuild. At the first attempt I had an Failed To Bootstrap-Error related to the acme.sh-Script

discourse Pups::ExecError: cd /root/acme.sh && LE_WORKING_DIR="${LETSENCRYPT_DIR}" ./acme.sh --upgrade --auto-upgrade failed with return #<Process::Status: pid 18927 exit 1>

I tried to this Debugging guide from Setting up Let's Encrypt

I got no error there.

Any ideas?


#2

Ok, I tried another rebuild and now it’s again the acme.sh-Error:

FAILED
--------------------
Pups::ExecError: cd /root/acme.sh && LE_WORKING_DIR="${LETSENCRYPT_DIR}" ./acme.sh --upgrade --auto-upgrade failed with return #<Process::Status: pid 18791 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cmd"=>["cd /root && git clone https://github.com/Neilpang/acme.sh.git && cd /root/acme.sh && git reset --hard c4c5ecd03de497fd4c3079cbac9d3c56edaffc89", "touch /var/spool/cron/crontabs/root", "install -d -m 0755 -g root -o root $LETSENCRYPT_DIR", "cd /root/acme.sh && LE_WORKING_DIR=\"${LETSENCRYPT_DIR}\" ./acme.sh --install --log \"${LETSENCRYPT_DIR}/acme.sh.log\"", "cd /root/acme.sh && LE_WORKING_DIR=\"${LETSENCRYPT_DIR}\" ./acme.sh --upgrade --auto-upgrade"]}
285cbf01ab9ff0047b3d235ccd31697a47cf82e33fb8842badfb27b05a34b611
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Error is produced by this command:

INFO -- : > cd /root/acme.sh && LE_WORKING_DIR="${LETSENCRYPT_DIR}" ./acme.sh --upgrade --auto-upgrade
* 10 changes in 300 seconds. Saving...
* Background saving started by pid 18825
* DB saved on disk
* RDB: 0 MB of memory used by copy-on-write
* Background saving terminated with success
Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: 56
Download error.
Upgrade failed!

Error Code 56 refers to https://curl.haxx.se/libcurl/c/libcurl-errors.html:

CURLE_RECV_ERROR (56)
Failure with receiving network data.

(Jay Pfaffman) #3

That sounds like network problems.


#4

sure :slight_smile:

I’m running my app on a Linode server. I followed the 30 min docker setup and currently have no idea where to dive in tackling network problems. Do you have some keywords where to start?


(Rafael dos Santos Silva) #5

I recommend using Ubuntu as the server distro image, it’s easier.


#6

I use an Ubuntu 16.04 LTS x64 image, kernel 4.9.15


(Jay Pfaffman) #7

Not really. Linode should work. It could be some temporary DNS problem.

You can see if you can do this from the command line:

git clone https://github.com/Neilpang/acme.sh.git

If it fails, then you know that’s the problem, and if it does, there’s not much you can do but whine to Linode and/or github.


#8

Allright, thanks for your answer.

The manual git clone command works fine. The failure comes from different git pull commands during ./launcher rebuild app.

I opened a linode-Ticket.


(Jay Pfaffman) #9

Do you have any non official plug-ins installed?


#10

yes, there’s one.
but last trial of ./launcher rebuild app it failed already during

cd /var/www/discourse && git pull
fatal: unable to access 'https://github.com/discourse/discourse.git/': GnuTLS recv error (-54): Error in the pull function.

Is there anything plugin-related happening before that?
Anyway: I’ll try rebuilding without that plugin.


(Dean Taylor) #11

Sounds like you have a connectivity issue inside the docker instance (yeah I know obvious)…

In CURL the error “56” is:

CURLE_RECV_ERROR (56)
Failure with receiving network data.

It also looks like this relates to TLS / certificates - this can also be to do with several things:

  • Incorrect time / clock on your machine
  • Certificate installation issues
  • Check for OS updates (these might include certificates)
  • Check for docker updates
  • Actual connectivity issues

To get more information I would probably check the above things…

… and then if still at a loss modify the templates/web.template.yml temporarily on that specific git pull line from:

        - git remote set-branches --add origin master
        - git pull
        - git fetch origin $version

To:

        - git remote set-branches --add origin master
        - GIT_TRACE=1; GIT_CURL_VERBOSE=1 git pull --verbose
        - git fetch origin $version

Well, something like that should help get more detailed error information.


#12

Thank you very much for that detailed answer.

I was facing two issues, that had nothing to do with each other:

  1. One of the network service providers of the Linode Datacenter was having trouble this morning, that was the problem with the rebuilding and the git pull commands.
  2. I administrate the app for a non-profit organisation. They commissioned a domain transfer a week ago. I didn’t know, that the transfer was happening this morning, but it did :slight_smile:
    And due to that, there was a certificate of the new domain name registrar which got into the way. It’s still not solved, because I don’t have the login information for the domain-configuration yet, but I’m pretty sure it has nothing to do with discourse.

Thank you all very much. I like this viral community on meta.discourse.org a lot :heart_eyes: