ever-co / ever-traduora

Ever® Traduora™ - Open Translation Management Platform - https://traduora.co
https://traduora.co
GNU Affero General Public License v3.0
1.97k stars 197 forks source link

Getting started instructions not working #381

Closed karel1980 closed 1 year ago

karel1980 commented 1 year ago

Describe the bug Following the instructions from https://docs.traduora.co/docs/getting-started does not seem to work There appears to be a problem with the mysqldb container. Its logs look like this:


2023-04-13 10:20:59+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-04-13 10:20:59+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.41-1.el7 started.
2023-04-13 10:21:00+00:00 [Note] [Entrypoint]: Initializing database files
2023-04-13T10:21:00.324850Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2023-04-13T10:21:00.544113Z 0 [Warning] InnoDB: Retry attempts for writing partial data failed.
2023-04-13T10:21:00.544697Z 0 [ERROR] InnoDB: Write to file ./ibdata1 failed at offset 0, 1048576 bytes should have been written, only 0 were written. Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
2023-04-13T10:21:00.545108Z 0 [ERROR] InnoDB: Error number 28 means 'No space left on device'
2023-04-13T10:21:00.545177Z 0 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space
2023-04-13T10:21:00.545276Z 0 [ERROR] InnoDB: InnoDB Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
2023-04-13T10:21:01.146557Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2023-04-13T10:21:01.146599Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2023-04-13T10:21:01.146629Z 0 [ERROR] Failed to initialize builtin plugins.
2023-04-13T10:21:01.146860Z 0 [ERROR] Aborting

2023-04-13 10:21:01+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.41-1.el7 started.
2023-04-13 10:21:02+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-04-13 10:21:02+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.41-1.el7 started.
2023-04-13 10:21:03+00:00 [Note] [Entrypoint]: Initializing database files
2023-04-13T10:21:03.614611Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2023-04-13T10:21:03.648886Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2023-04-13T10:21:03.649708Z 0 [ERROR] Aborting```

The latter block is repeated as the mysql instance auto-restarts

**To Reproduce**
Steps to reproduce the behavior:
1. Go to https://docs.traduora.co/docs/getting-started
2. Execute the 3 lines in a terminal
3. See error from the mysql container

**Expected behavior**
Traduora should start up and be available at localhost:8080

**Screenshots**
see logs above

** Environment (please complete the following information):**
 - Device: macbook with m2 running docker
 - OS: osx
 - Browser n/a
 - Version n/a
evereq commented 1 year ago

@karel1980 hm, but error states that you run out of disk space, see below

[ERROR] InnoDB: Error number 28 means 'No space left on device'
[ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space

Did you try to "purge" docker VMs/images etc or check your drive space?

karel1980 commented 1 year ago

I'm pretty confident that it's not (really) a space issue: I've run both of these commands before retrying, but the error remains the same

I found some sources which indicate it may be a permission problem. I'll try to verify this

evereq commented 1 year ago

@karel1980 yes, possible, we added "volumes" in our other project https://github.com/ever-co/ever-gauzy/blob/develop/docker-compose.yml#L19, and I think it also prevents some kind of such issues on some OS... You can try to mount volumes (example link is for PostgreSQL, so you have to adjust path that relevant for MySQL)

karel1980 commented 1 year ago

I can confirm that it works if I simply add

.   volumes:
      - ./demo-mysql:/var/lib/mysql

One final thing I forgot to mention earlier, I'm running all of these with export DOCKER_DEFAULT_PLATFORM=linux/amd64.

I also tried using mysql:8 as image. This also allows mysql to start up (even without the volume addition), but ultimately this doesn't work because the client / server versions are incompatible.

karel1980 commented 1 year ago

I'm okay with this being closed, but maybe adding the volume would be simple enough an improvement to the 'get started quickly' workflow for new users.

evereq commented 1 year ago

OK, thank you @karel1980 we will just add that volumes in the current docker-compose files, it should be good for everyone! (we do it in all our other projects already).

Also, we will see if we can upgrade to MySQL v8, because I think TypeORM totally support it and should be almost no changes in the code, except maybe updates to some packages / tiny fixes for that, thank you for the hint!