skyvern icon indicating copy to clipboard operation
skyvern copied to clipboard

Unable to run skyvern locally following README guide

Open jfelten opened this issue 1 year ago • 1 comments

Hi,

New user here and I hope this is user error.

I tried setting up skyvern locally, but am unable to do so, because no org or skyvern API key gets created. I tried both docker-compose and running the setup.sh/runSkyvern.sh on my mac.

The issue seems to be in the script that generates the org:

poetry run python scripts/create_organization.py test-org

│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │           attempt = {                                                    │ │
│ │                     │   'host': 'localhost',                             │ │
│ │                     │   'dbname': 'skyvern',                             │ │
│ │                     │   'user': 'skyvern',                               │ │
│ │                     │   'options': '-c statement_timeout=60000',         │ │
│ │                     │   'hostaddr': '127.0.0.1'                          │ │
│ │                     }                                                    │ │
│ │          attempts = [                                                    │ │
│ │                     │   {                                                │ │
│ │                     │   │   'host': 'localhost',                         │ │
│ │                     │   │   'dbname': 'skyvern',                         │ │
│ │                     │   │   'user': 'skyvern',                           │ │
│ │                     │   │   'options': '-c statement_timeout=60000',     │ │
│ │                     │   │   'hostaddr': '::1'                            │ │
│ │                     │   },                                               │ │
│ │                     │   {                                                │ │
│ │                     │   │   'host': 'localhost',                         │ │
│ │                     │   │   'dbname': 'skyvern',                         │ │
│ │                     │   │   'user': 'skyvern',                           │ │
│ │                     │   │   'options': '-c statement_timeout=60000',     │ │
│ │                     │   │   'hostaddr': '127.0.0.1'                      │ │
│ │                     │   }                                                │ │
│ │                     ]                                                    │ │
│ │        autocommit = False                                                │ │
│ │          conninfo = "host=localhost dbname=skyvern user=skyvern          │ │
│ │                     options='-c statement_timeout=60000' "+18            │ │
│ │           context = <psycopg.adapt.AdaptersMap object at 0x108ffcc10>    │ │
│ │    cursor_factory = None                                                 │ │
│ │            kwargs = {                                                    │ │
│ │                     │   'host': 'localhost',                             │ │
│ │                     │   'dbname': 'skyvern',                             │ │
│ │                     │   'user': 'skyvern',                               │ │
│ │                     │   'options': '-c statement_timeout=60000'          │ │
│ │                     }                                                    │ │
│ │           last_ex = OperationalError('connection failed: fe_sendauth: no │ │
│ │                     password supplied')                                  │ │
│ │            params = {                                                    │ │
│ │                     │   'host': 'localhost',                             │ │
│ │                     │   'dbname': 'skyvern',                             │ │
│ │                     │   'user': 'skyvern',                               │ │
│ │                     │   'options': '-c statement_timeout=60000'          │ │
│ │                     }                                                    │ │
│ │ prepare_threshold = 5                                                    │ │
│ │       row_factory = None                                                 │ │
│ │                rv = None                                                 │ │
│ │           timeout = 130                                                  │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────╯
OperationalError: (psycopg.OperationalError) connection failed: fe_sendauth: no 
password supplied

The database is running in a docker container and I can connect locally on port 5432 using pgadmin with the credentials skyvern/skyvern.

I do see that the credentials are defined here: https://github.com/Skyvern-AI/skyvern/blob/4103b7594cd2f67eba4064137ff2b17a2f38f6a2/skyvern/config.py#L28 but adding a password to the connection string did not fix the issue.

Any pointers are appreciated.

jfelten avatar Nov 25 '24 07:11 jfelten

hope to help. I modified the docker command like this:

docker run -d
--name postgres
-e PGDATA=/var/lib/postgresql/data
-e POSTGRES_USER=skyvern
-e POSTGRES_PASSWORD=skyvern
-e POSTGRES_POSTGRES_DB=skyvern
-e POSTGRES_HOST_AUTH_METHOD=trust \ # add -v ./postgres-data:/var/lib/postgresql/data
-p 5432:5432
postgres:14-alpine

chloecd avatar Dec 20 '24 06:12 chloecd