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

jhipster jdl blog-oauth2 doesn't work with JHipster 8.5.0 #26319

Closed
mraible opened this issue May 31, 2024 · 5 comments · Fixed by #26359
Closed

jhipster jdl blog-oauth2 doesn't work with JHipster 8.5.0 #26319

mraible opened this issue May 31, 2024 · 5 comments · Fixed by #26359
Milestone

Comments

@mraible
Copy link
Contributor

mraible commented May 31, 2024

Overview of the issue

The MySQL container doesn't start in Docker.

$ docker compose -f src/main/docker/mysql.yml up
WARN[0000] Found orphan containers ([blog-keycloak-1]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
[+] Running 1/0
 ✔ Container blog-mysql-1  Created                                                                                 0.0s
Attaching to mysql-1
mysql-1  | 2024-05-31 03:52:01+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started.
mysql-1  | 2024-05-31 03:52:01+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mysql-1  | 2024-05-31 03:52:01+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started.
mysql-1  | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
mysql-1  | 2024-05-31T03:52:01.259326Z 0 [System] [MY-015015] [Server] MySQL Server - start.
mysql-1  | 2024-05-31T03:52:01.379597Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
mysql-1  | 2024-05-31T03:52:01.379690Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.0) starting as process 1
mysql-1  | 2024-05-31T03:52:01.381140Z 0 [Warning] [MY-013907] [InnoDB] Deprecated configuration parameters innodb_log_file_size and/or innodb_log_files_in_group have been used to compute innodb_redo_log_capacity=10485760. Please use innodb_redo_log_capacity instead.
mysql-1  | 2024-05-31T03:52:01.381844Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
mysql-1  | 2024-05-31T03:52:03.857959Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysql-1  | 2024-05-31T03:52:03.920948Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
mysql-1  | 2024-05-31T03:52:03.921905Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
mysql-1  |
mysql-1  | InnoDB: Progress in percents: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 772024-05-31T03:52:03.986881Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
mysql-1  | 2024-05-31T03:52:03.986906Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
mysql-1  |  78 79 802024-05-31T03:52:03.989212Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
mysql-1  |  81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 1002024-05-31T03:52:04.008497Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.4.0'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
mysql-1  | 2024-05-31T03:52:04.302669Z 8 [Warning] [MY-011302] [Server] Plugin mysqlx reported: 'Failed at SSL configuration: "SSL context is not usable without certificate and private key"'
mysql-1  | 2024-05-31T03:52:04.302914Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
mysql-1 exited with code 139
Motivation for or Use Case

It worked with previous versions.

Reproduce the error
jhipster jdl blog-oauth2
docker compose -f src/main/docker/mysql.yml up
Related issues

#26026

Suggest a Fix

Changing src/main/docker/mysql.yml to use image: mysql:8.3.0 seems to fix it.

JHipster Version(s)

8.5.0

JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "oauth2",
    "baseName": "blog",
    "buildTool": "maven",
    "cacheProvider": "ehcache",
    "clientFramework": "angular",
    "devServerPort": 4200,
    "entities": [
      "Blog",
      "Post",
      "Tag"
    ],
    "jhipsterVersion": "8.5.0",
    "languages": [
      "en"
    ],
    "lastLiquibaseTimestamp": 1717126951000,
    "nativeLanguage": "en",
    "packageFolder": "com/jhipster/demo/blog",
    "packageName": "com.jhipster.demo.blog",
    "prodDatabaseType": "mysql",
    "skipUserManagement": true,
    "testFrameworks": [
      "cypress"
    ]
  }
}
Environment and Tools

openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing)

git version 2.39.3 (Apple Git-146)

node: v20.13.0
npm: 10.8.0

Docker version 26.1.1, build 4cf5afa

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
@ChangelogDate("20240531034031")
entity Blog {
  name String required minlength(3)
  handle String required minlength(2)
}
@ChangelogDate("20240531034131")
entity Post {
  title String required
  content TextBlob required
  date Instant required
}
@ChangelogDate("20240531034231")
entity Tag {
  name String required minlength(2)
}

relationship ManyToOne {
  Blog{user(login)} to User with builtInEntity
  Post{blog(name)} to Blog
}
relationship ManyToMany {
  Post{tag(name)} to Tag{entry}
}

search Blog, Post, Tag with no
paginate Post, Tag with infinite-scroll

@mraible
Copy link
Contributor Author

mraible commented Jun 4, 2024

@qmonmert Are you able to get MySQL working in a JHipster 8.5.0 app? I haven't been able to, but maybe it's my local environment (macOS M3).

@mshima
Copy link
Member

mshima commented Jun 4, 2024

Same here on MacOS.

@qmonmert
Copy link
Contributor

qmonmert commented Jun 4, 2024

@mraible same on MacOS M1

@qmonmert
Copy link
Contributor

qmonmert commented Jun 4, 2024

@mraible if you add --skip-mysqlx on command: command: mysqld --lower_case_table_names=1 --skip-mysqlx --character_set_server=utf8mb4 --explicit_defaults_for_timestamp it seems to start

@mraible
Copy link
Contributor Author

mraible commented Jun 4, 2024

@qmonmert Thanks! I was able to use this locally and things work. PR at #26359.

Screenshot 2024-06-04 at 4 28 07 PM

@mraible mraible added this to the 8.6.0 milestone Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants