Skip to content

init script fails to curl coder server #15825

Open

Description

@matifali

Discussed in #14934

Originally posted by MaxTNielsen October 2, 2024
From the container logs it shows that the curl command fails:

2024-10-02T14:00:31.713217679Z Trying again in 30 seconds...
curl: (35) Insufficient randomness
error: failed to download coder agent

Entropy:

cat /proc/sys/kernel/random/entropy_avail
3669

After an extensive search on google I've tried the following to fix the error with curl:

  • Increase the entropy (hail mary since the entropy is high)
  • Update openssl to the newest version

wget works.

I would like to petition if it is possible to modify the init_sript with error handling so it instead tries with wget if the exit code from the curl command is = 0:

status=""
	if command -v curl >/dev/null 2>&1; then
		curl -fsSL --compressed "${BINARY_URL}" -o "${BINARY_NAME}" && break
		status=$?
                # Check if curl was successful
                if [ "$status" -eq 0 ]; then
                    break
                fi

Or if you have any other suggestions that would be appriciated!

I'm running rootless and without privilege escalation.

Kind regards
Max

Activity

  1. added
    s2Broken use cases or features (with a workaround). Only humans may set this.
    on Dec 11, 2024
  2. matifali commented on Dec 11, 2024

    @matifali
    MemberAuthor

    We should handle this in our work on #15423.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug riskProne to bugss2Broken use cases or features (with a workaround). Only humans may set this.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions