Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Algorand and indexer nodes not starting when attempting to start Algorand Sandbox in Ubuntu 22 #140

Open
primarchsolutions opened this issue Aug 17, 2022 · 9 comments
Labels
new-bug Bug report that needs triage Team Lamprey

Comments

@primarchsolutions
Copy link

Subject of the issue

I am attempting to set up and run the Algorand Sandbox in Ubuntu 22 following instructions from https://developer.algorand.org/tutorials/create-and-test-smart-contracts-using-python/. I installed docker composer as required but when I attempt to run

./sandbox/sandbox up

I get the error

        Starting default sandbox: release
        see sandbox.log for detailed progress, or use -v.
        * docker containers started!
        * waiting for services to initialize.
        
        the following did not start:
        * algorand node
        * indexer node
        
        One or more services failed to start.

Is there a step I missed?

Your environment

Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

Steps to reproduce

[1.(https://developer.algorand.org/tutorials/create-and-test-smart-contracts-using-python/. )

Expected behaviour

Actual behaviour

        Starting default sandbox: release
        see sandbox.log for detailed progress, or use -v.
        * docker containers started!
        * waiting for services to initialize.
        
        the following did not start:
        * algorand node
        * indexer node
@primarchsolutions primarchsolutions added the new-bug Bug report that needs triage label Aug 17, 2022
@winder
Copy link
Contributor

winder commented Aug 18, 2022

@tzaffi do you think this could be related to the .env changes?

@tzaffi
Copy link
Contributor

tzaffi commented Aug 18, 2022

@tzaffi do you think this could be related to the .env changes?

That is the most likely explanation. I'm investigating and will keep you posted.

@tzaffi
Copy link
Contributor

tzaffi commented Aug 18, 2022

@winder - After further investigation, I can confirm that sandbox is broken in Ubuntu 22.

However, the problem appears to be orthogonal to any of the recent changes.

I see the following happening:

  1. indexer docker calles install.sh
  2. install.sh calls indexer's make
  3. indexer's Makefile calls operations that are "not permitted" (I still get same errors with a sudo):
  • make: pwd: Operation not permitted
  • make: /mule/scripts/compute_build_number.sh: Operation not permitted
  • make: /mule/scripts/ostype.sh: Operation not permitted
  • make: /bin/sh: Operation not permitted
  • make: /bin/sh: Operation not permitted
  • make: /bin/sh: Operation not permitted
  • (from make go-algorand) make: *** [Makefile:30: go-algorand] Error 127

Here is how I reproduced with some log info:

> git clone https://github.com/algorand/sandbox.git
> cd sandbox

# Checkout a commit from July
> git checkout 0f74ac78b6ef4958f06b1d81e2b34102aa871a5e
> cd ..
> ./sandbox/sandbox up -v

(87/87) Installing make (4.3-r0)
Executing busybox-1.34.1-r3.trigger
OK: 527 MiB in 101 packages
Removing intermediate container 9d946525203b
 ---> 1d0d61e9fa47
Step 10/14 : COPY images/indexer/disabled.go /tmp/disabled.go
 ---> 030ca3bfb20b
Step 11/14 : COPY images/indexer/start.sh /tmp/start.sh
 ---> b910ccdd1f7f
Step 12/14 : COPY images/indexer/install.sh /tmp/install.sh
 ---> e4b8eeb87e80
Step 13/14 : RUN /tmp/install.sh
 ---> Running in 7924560cae60
Cloning into '/opt/indexer'...
make: pwd: Operation not permitted
make: /mule/scripts/compute_build_number.sh: Operation not permitted
make: /mule/scripts/ostype.sh: Operation not permitted
make: /bin/sh: Operation not permitted
git submodule update --init && cd third_party/go-algorand && \
make crypto/libs/`scripts/ostype.sh`/`scripts/archtype.sh`/lib/libsodium.a
make: /bin/sh: Operation not permitted
make: /bin/sh: Operation not permitted
make: *** [Makefile:30: go-algorand] Error 127
ERROR: Service 'indexer' failed to build: The command '/bin/sh -c /tmp/install.sh' returned a non-zero code: 2

@yeyouchuan
Copy link

The same problem

How can I fix it?

@r0ushann
Copy link

is this an issue with the sandbox itself??

@d13co
Copy link
Contributor

d13co commented Sep 25, 2022

I had a similar issue in 22.04 where the indexer-db/postgres image didn't spin up. I didn't have an issue with algod to begin with though, so it may be a separate but related issue.

Running docker-compose up manually made the postgres image error with chmod: /var/lib/postgresql/data: Operation not permitted

On a whim I tried to change the image required in the docker-compose.yml file from postgres:13-alpine to postgres:14-alpine and it worked.

Diff:

diff --git a/docker-compose.yml b/docker-compose.yml
index 058c13e..1c799d8 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -50,7 +50,7 @@ services:
       - algod
       
   indexer-db:
-    image: "postgres:13-alpine"
+    image: "postgres:14-alpine"
     container_name: "${POSTGRES_CONTAINER:-algorand-sandbox-postgres}"
     ports:
       - ${POSTGRES_PORT:-5433}:5432

@tzaffi
Copy link
Contributor

tzaffi commented Sep 26, 2022

This is a great tip. I'll try it!

@tzaffi
Copy link
Contributor

tzaffi commented Sep 26, 2022

Didn't work for me.

@Niceural
Copy link

Niceural commented Nov 1, 2022

hi! I have the same issue how could I fix it? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-bug Bug report that needs triage Team Lamprey
Projects
None yet
Development

No branches or pull requests

7 participants