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

"Table 'tabby.app_user' doesn't exist" #119

Open
alwayslikethis777 opened this issue Jan 30, 2024 · 6 comments
Open

"Table 'tabby.app_user' doesn't exist" #119

alwayslikethis777 opened this issue Jan 30, 2024 · 6 comments

Comments

@alwayslikethis777
Copy link

Use the default Docker Compose.yml file without any modifications

image

@ency98
Copy link

ency98 commented Feb 4, 2024

I ran into the same issue.

When running the docker-compose file I noticed that the tabby-web container was not able to connect to the DB server.

I don't think the DB server was created or even running when the tabby web server went through its setup.

The fix I came up with was to create a docker compose for the DB server and remove that section from the docker-compose file for the tabby-web server.

I the started up the DB server and then the web server.

my setup looks something like this

docker

  • tabby
    • tabby-web
      • docker-compose.yml
    • tabby-db
      • docker-compose.yml
    • tabby-connection-gateway
      • docker-compose.yml

Start order

  1. tabby-db docker-compose.yml
  2. tabby-web docker-compose.yml
  3. tabby-connection-gateway docker-compose.yml

Here are the sanitized versions of the docker-compose.yml files.

tabby-db docker-compose.yml

services:
    db:
        image: mariadb:10.7.1
        restart: always
        environment:
            MARIADB_DATABASE: tabby
            MARIADB_USER: user
            MARIADB_PASSWORD: 123
            MYSQL_ROOT_PASSWORD: 123

tabby-web docker-compose.yml

services:
    tabby:
        build: .
        restart: always
        depends_on:
        - db
        ports:
        - 9090:80
        environment:
        - DATABASE_URL=mysql://root:123@IP/tabby
        - PORT=80
        - DEBUG=False
        - DOCKERIZE_ARGS="-wait tcp://db:3306 -timeout 60s"
        - SOCIAL_AUTH_GITHUB_KEY="XXX"
        - SOCIAL_AUTH_GITHUB_SECRET="YYY"

tabby-connection-gateway docker-compose.yml

services:
    eugeny:
        command: --token-auth --host 0.0.0.0 
        environment:
            - TABBY_AUTH_TOKEN="SuperSecretPassword"
        ports:
            - 9000:9000
        image: 'ghcr.io/eugeny/tabby-connection-gateway:master'

Having done all that to get the containers up and going I still cant make it work.

I think my issue is connecting tabby-web to the tabby-connection-gateway

when setting up the Connection Gateway I have tried

ws://IP:9000 < invalid - An insecure WebSocket connection may not be initiated from a page loaded over HTTPS
wss://IP:9000 < timeout

I don't see anything in the tabby-connection-gateway or tabby-web logs using " docker logs --follow "

@ency98
Copy link

ency98 commented Feb 4, 2024

Well I give up.

I blew away the directories and started over. I discovered if you run the tabby-web docker-compose.yml the stop it, then run it again the DB issue gets sorted out.

But now the oauth isn't working at all. The call back url, secrets, and client ID have not changed it just sends me to a github 404 page once I authenticate.

@Dmtrkozl
Copy link

Hello, change services order:
services:
db:
image: mariadb:10.7.1
restart: always
environment:
MARIADB_DATABASE: tabby
MARIADB_USER: user
MARIADB_PASSWORD: 123
MYSQL_ROOT_PASSWORD: 123
tabby:
build: .
restart: always
depends_on:
- db
ports:
- 9090:80
environment:
- DATABASE_URL=mysql://root:123@db/tabby
- PORT=80
- DEBUG=False
- DOCKERIZE_ARGS="-wait tcp://db:3306 -timeout 60s"
# - APP_DIST_STORAGE="file:///app-dist"

@Satone7
Copy link

Satone7 commented Feb 16, 2024

I just encountered and resolved this issue. By observing the first line of output from the tabby container, one can notice this error:

tabby-1  | 2024/02/16 06:02:54 Error starting command: `"-wait` - exec: "\"-wait": executable file not found in $PATH

It is evident that the issue was caused by the " symbol. Therefore, by modifying the docker-compose.yml file's source code from

DOCKERIZE_ARGS="-wait tcp://db:3306 -timeout 60s"

to

DOCKERIZE_ARGS=-wait tcp://db:3306 -timeout 60s

the issue can be resolved, and one can successfully access the webpage.

However, upon further consideration, it becomes apparent that this error will occur in the webpage as long as the tabby container does not successfully connect to the db. Therefore, the reason you encountered this error might be different from mine. You can try the above solution or carefully analyze the log of the tabby container to find the real cause of the error.
Wishing you good luck.

@Dmtrkozl
Copy link

@Satone7
Please, tell me.
Does telnet work in your installation?

@r2munz
Copy link

r2munz commented May 22, 2024

I just encountered and resolved this issue. By observing the first line of output from the tabby container, one can notice this error:

tabby-1  | 2024/02/16 06:02:54 Error starting command: `"-wait` - exec: "\"-wait": executable file not found in $PATH

It is evident that the issue was caused by the " symbol. Therefore, by modifying the docker-compose.yml file's source code from

DOCKERIZE_ARGS="-wait tcp://db:3306 -timeout 60s"

to

DOCKERIZE_ARGS=-wait tcp://db:3306 -timeout 60s

the issue can be resolved, and one can successfully access the webpage.

However, upon further consideration, it becomes apparent that this error will occur in the webpage as long as the tabby container does not successfully connect to the db. Therefore, the reason you encountered this error might be different from mine. You can try the above solution or carefully analyze the log of the tabby container to find the real cause of the error. Wishing you good luck.

This should be succested as PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants