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

Getting started instructions not working #381

Closed
karel1980 opened this issue Apr 13, 2023 · 6 comments
Closed

Getting started instructions not working #381

karel1980 opened this issue Apr 13, 2023 · 6 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested
Milestone

Comments

@karel1980
Copy link

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

@karel1980 karel1980 added bug Something isn't working help wanted Extra attention is needed labels Apr 13, 2023
@evereq
Copy link
Member

evereq commented Apr 13, 2023

@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?

@evereq evereq self-assigned this Apr 13, 2023
@evereq evereq added question Further information is requested and removed bug Something isn't working labels Apr 13, 2023
@evereq evereq added this to the Traduora 1.0 milestone Apr 13, 2023
@karel1980
Copy link
Author

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

  • docker volume rm $(docker volume ls -qf dangling=true)
  • docker image rm $(docker images -q -f dangling=true)

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

@evereq
Copy link
Member

evereq commented Apr 13, 2023

@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
Copy link
Author

karel1980 commented Apr 13, 2023

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
Copy link
Author

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
Copy link
Member

evereq commented Apr 13, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants