The simulator seems to fail on the storj-sim network run
command.
I would appreciate any insight on how to resolve this,.
The simulator seems to fail on the storj-sim network run
command.
I would appreciate any insight on how to resolve this,.
Hello @aneyzb,
Welcome to the forum!
Can you check that you actually created the teststorj
database, because I have a such docker-compose.yml
:
version: '3'
services:
postgres:
image: postgres:latest
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_DB=teststorj
ports:
- 5432:5432
storj-sim:
build:
context: .
image: "storj-sim:latest"
ports:
- 10000:10000
- 10002:10002
- 11000:11000
- 12000:12000
- 13000:13000
volumes:
- "~/:/storj"
depends_on:
- postgres
And all running successfully.
My Dockerfile
for storj-sim
is look like:
FROM golang:1.14 as builder
RUN git clone https://github.com/storj/storj.git storj
RUN cd storj && make install-sim
# RUN cd storj && go install -v ./...
FROM frolvlad/alpine-miniconda2
RUN apk --no-cache add ca-certificates redis
WORKDIR /storj/
COPY --from=builder /go/bin /bin
COPY --from=builder /go/storj/web /go/storj/web
RUN storj-sim network setup --postgres=postgres://postgres@postgres/teststorj?sslmode=disable
RUN sed -i 's/127.0.0.1:11000/0.0.0.0:11000/g' /root/.local/share/storj/local-network/gateway/0/config.yaml
RUN sed -i 's/server.address: 127.0.0.1:10000/server.address: :10000/g' /root/.local/share/storj/local-network/satellite/0/config.yaml
# RUN uplink import $(storj-sim network env GATEWAY_0_ACCESS)
EXPOSE 10000
EXPOSE 11000
CMD [ "network", "run" ]
ENTRYPOINT [ "storj-sim" ]
To check your postgres instance:
psql -U postgres -h localhost
postgres=# \l
Should return a list of databases. Check that it has the teststorj
database here.
Hi Alexey - I was able to resolve the issue. I was having a permissions issue with my posgres user. Thank you!