#Failing to connect to DB

4 messages · Page 1 of 1 (latest)

desert arrow
#

Hi guys, I'm getting these error messages when trying to run Backstage locally. Any ideas what it might be? Feels like i have tried everything. I'm running an M1 Mac if that might be something that affects due to difference in architecture from intel based machines.

[1] 2023-06-20T06:37:27.289Z entityFeedback info Initializing Entity Feedback backend type=plugin
[1] Backend failed to start up Error: `connection.filename` is not supported for the base sqlite connection. Prefer `connection.directory` or provide a filename for the plugin connection instead.
[1]     at DatabaseManager.getConnectionConfig (/Users/chrwal/Documents/backstage/backstage-orgname/node_modules/@backstage/backend-common/dist/index.cjs.js:910:13)
[1]     at DatabaseManager.getConfigForPlugin (/Users/chrwal/Documents/backstage/backstage-orgname/node_modules/@backstage/backend-common/dist/index.cjs.js:941:24)
[1]     at /Users/chrwal/Documents/backstage/backstage-orgname/node_modules/@backstage/backend-common/dist/index.cjs.js:978:14
[0] webpack compiled successfully
oblique lodge
#

Can you provide the config file you are using?

desert arrow
#

Sure, this is the app-config.local.yaml i'm using

# Backstage override config for local development

app:
  title: Org Backstage App
  baseUrl: http://localhost:3000

backend: 
  baseUrl: http://localhost:7007
  listen: 
    port: 7007
  database: 
    client: better-sqlite3
    connection: 'memory:'
  cache: 
    store: memory 

# Use docs from local. Avoid S3 and pipe docs publish. 
techdocs:
  builder: 'local' 
  publisher:
    type: 'local' 
  generator:
    runIn: local 
#

And the regular config:

app:
  title: Org Backstage App
  baseUrl: ${BASE_URL_BACKSTAGE}

organization:
  name: Org

backend:
  baseUrl:
    $env: BASE_URL_BACKSTAGE
  listen:
    port: 7007
  csp:
    connect-src: ["'self'", 'http:', 'https:']
  cors:
    origin: http://localhost:3000
    methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
    credentials: true
  database:
    client: pg
    connection:
      host: ${POSTGRES_SERVICE_HOST}
      port: ${POSTGRES_PORT}
      user: ${POSTGRES_USER}
      password: ${POSTGRES_PASSWORD}
  cache:
    store: memory
  reading:
    allow:
      - host: '*.org.com'

techdocs:
  builder: 'external' 
  generator:
    runIn: 'local' 
  publisher:
    type: 'awsS3' 
    awsS3:
      bucketName: ${S3_BUCKET_NAME}
        
catalog:
  rules:
    - allow:
        - Component
        - API
        - Resource
        - System
        - Domain
        - Location
        - Group
        - User
        - Template
  import:
    entityFilename: catalog-info.yaml
  locations:
    - type: gitlab-discovery
      target: https://gitlab.com/org/blob/*/catalog-info.yaml
  providers:
    microsoftGraphOrg:
      default:
        tenantId: ${AUTH_MICROSOFT_TENANT_ID}
        clientId: ${AUTH_MICROSOFT_CLIENT_ID}
        clientSecret: ${AUTH_MICROSOFT_CLIENT_SECRET}
        group:
          filter: "displayName eq 'app_sso_backstage (Dynamic)'"
        userGroupMember:
          filter: "displayName eq 'app_sso_backstage (Dynamic)'"

integrations:
  gitlab:
    - host: gitlab.com
      token: ${GITLAB_TOKEN}
      apiBaseUrl: https://gitlab.com/api/v4
      baseUrl: https://gitlab.com

#auth:
#  environment: development
#  providers:
#    microsoft:
#      development:
#        clientId: ${AUTH_MICROSOFT_CLIENT_ID}
#        clientSecret: ${AUTH_MICROSOFT_CLIENT_SECRET}
#        tenantId: ${AUTH_MICROSOFT_TENANT_ID}

sonarqube:
  baseUrl: ${SONARQUBE_URL}
  apiKey: ${SONARQUBE_USER_API_TOKEN}