Hello All. We've been trying to deploy a POC on an...
# help
j
Hello All. We've been trying to deploy a POC on an EC2 and are encountering some issues when we try to run
lakefs setup --user-name root --access-key-id EXAMPLE_KEY --secret-access-key EXAMPLE_SECRET
the error message is:
Copy code
ERROR  [2021-07-27T18:44:43Z]lakeFS/pkg/db/migration.go:44 pkg/db.(*DatabaseMigrator).Migrate Failed to migrate                             direction=up error="dial tcp 127.0.0.1:5432: connect: connection refused"`
This is surprising as some of the setup appears to successfully connect to an RDS:
Copy code
INFO   [2021-07-27T18:44:30Z]lakeFS/pkg/db/connect.go:57 pkg/db.ConnectDBPool connecting to the DB                          conn_max_lifetime=5m0s driver=pgx max_idle_conns=25 max_open_conns=25 uri="<postgres://postgres>:paasword@<prefixes>.<http://us-east-1.rds.amazonaws.com/postgres|us-east-1.rds.amazonaws.com/postgres>"
INFO   [2021-07-27T18:44:30Z]lakeFS/pkg/db/connect.go:77 pkg/db.ConnectDBPool initialized DB connection                     conn_max_lifetime=5m0s driver=pgx max_idle_conns=25 max_open_conns=25 uri="<postgres://postgres>:paasword@<prefixes>.<http://us-east-1.rds.amazonaws.com/postgres|us-east-1.rds.amazonaws.com/postgres>"
DEBUG  [2021-07-27T18:44:30Z]lakeFS/cmd/lakefs/cmd/run.go:61 cmd/lakefs/cmd.glob..func9 No migration, setup required
...
...
INFO   [2021-07-27T18:44:30Z]lakeFS/pkg/auth/service.go:207 pkg/auth.NewDBAuthService initialized Auth service
DEBUG  [2021-07-27T18:44:30Z]lakeFS/pkg/stats/metadata.go:34 pkg/stats.NewMetadata failed to collect account metadata            error="ERROR: relation \"auth_installation_metadata\" does not exist (SQLSTATE 42P01)"
DEBUG  [2021-07-27T18:44:30Z]lakeFS/pkg/stats/collector.go:213 pkg/stats.(*BufferedCollector).CollectMetadata could not update metadata                     error="installation ID is missing: stats: send error" service=stats_collector
DEBUG  [2021-07-27T18:44:30Z]lakeFS/cmd/lakefs/cmd/run.go:211 cmd/lakefs/cmd.checkForeignRepos lakeFS isn't initialized, skipping mismatched adapter checks
Any help or guidance would be appreciated. We haven't connected the EC2 to an elastic IP, so the S3_Gateway may be faulty, but that doesn't seem to be the issue
i
Hey Jesse, sorry that you’re experiencing issues. Are you running the postgres instance on that EC2 server as well? Can you share the lakeFS
config.yaml
file that you’re using?
j
the postgres instance is on an RDS.
Copy code
logging:
  format: text
  level: DEBUG
  output: "-"
database:
  connection_string: "<postgres://postgres>:password@<prefixes>.<http://us-east-1.rds.amazonaws.com/postgres|us-east-1.rds.amazonaws.com/postgres>"
auth:
  encrypt:
    secret_key: "EXAMPLE_SECRET"
blockstore:
  type: s3
  s3:
    region: us-east-1
    profile: default
    credentials_file: /home/ubuntu/.aws/credentials
gateways:
  s3:
     # replace this with the host you will use for the lakeFS S3-compatible endpoint:
     domain_name: s3.lakefs.<company>.io
i
For some reason the migration doesn’t read the database connection string. I’m opening an issue for that. As a workaround, can you try using
lakefs run
with the same config file, and do the setup through the UI or REST api?
j
the password has a
!
in it. could that contribute to an issue?
i
Also, where is the config file located? If it’s not in the default path, can you try adding the flag
--config=path/to/config.yaml
?
j
path would be
/home/ubuntu/config.yml
i
default is
$HOME/.lakefs.yaml
👍 1
j
will change and note the outcome, then see what happens with the
lakefs run
option
i
great, let me know if it didn’t work
j
moving the config file solved the setup issue
all the DEBUG statements remained
i
Glad that it was solved. Debug logs seem accurate as some actions depend on lakeFS being initialised first.
j
👍 I would also rename this file in this guide: https://docs.lakefs.io/deploy/aws.html#on-ec2
i
Yap, it's confusing. We'll modify it, thanks for letting us know
🙏 2