eclipse-arrowhead / core-java-spring

Eclipse Public License 2.0
26 stars 51 forks source link

Docker: access denied by SQL server #348

Closed FerryT closed 1 year ago

FerryT commented 2 years ago

I'm trying to run the docker compose example (/docker folder). The container are started without errors, but the services seems to fail to connect to the SQL container. I receive the following error messages:

mysql | 2021-10-28 12:19:14 3 [Warning] Access denied for user 'service_registry'@'172.21.0.3' (using password: YES) mysql | 2021-10-28 12:19:15 5 [Warning] Access denied for user 'authorization'@'172.21.0.4' (using password: YES) mysql | 2021-10-28 12:19:15 4 [Warning] Access denied for user 'orchestrator'@'172.21.0.5' (using password: YES)

I was using docker-compose-4-3-0-arm64v8.yml

BlackRose01 commented 2 years ago

Maybe there are some errors during creation of the users and/or tables in mysql or the passwords are not matching from application.properties and SQL-file. Maybe you can add a new service for phpmyadmin in the docker-compose file to have a look into the database.

tsvetlin commented 2 years ago

Hello Ferry!

Can you confirm that you can connect to MySQL manually? Based on your compose file, I'm guessing you are using a M1 Mac. You can install Sequel Ace from the App Store: https://apps.apple.com/hu/app/sequel-ace/id1518036000?mt=12

esen96 commented 2 years ago

Bump. I'm having the exact same issue, and yes, I can connect to MySQL manually

BlackRose01 commented 2 years ago

Hello oyuz,

can you share your docker-compose file, your connection information from the application.properties and the error log?

esen96 commented 2 years ago

I'm running a fresh install so it's all of the standard files in the main branch, unmodified. Running the latest version docker-compose amd file.

Logs:

`2022-03-28T11:13:15.105463Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2022-03-28T11:13:15.107062Z 0 [Note] mysqld (mysqld 5.7.37) starting as process 1 ...

2022-03-28T11:13:15.110345Z 0 [Note] InnoDB: PUNCH HOLE support available

2022-03-28T11:13:15.110379Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2022-03-28T11:13:15.110383Z 0 [Note] InnoDB: Uses event mutexes

2022-03-28T11:13:15.110385Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier

2022-03-28T11:13:15.110387Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11

2022-03-28T11:13:15.110388Z 0 [Note] InnoDB: Using Linux native AIO

2022-03-28T11:13:15.111601Z 0 [Note] InnoDB: Number of pools: 1

2022-03-28T11:13:15.114579Z 0 [Note] InnoDB: Using CPU crc32 instructions

2022-03-28T11:13:15.125051Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M

2022-03-28T11:13:15.134405Z 0 [Note] InnoDB: Completed initialization of buffer pool

2022-03-28T11:13:15.137082Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().

2022-03-28T11:13:15.157001Z 0 [Note] InnoDB: Highest supported file format is Barracuda.

2022-03-28T11:13:15.158958Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 12660067

2022-03-28T11:13:15.158991Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 12660076

2022-03-28T11:13:15.158996Z 0 [Note] InnoDB: Database was not shutdown normally!

2022-03-28T11:13:15.158997Z 0 [Note] InnoDB: Starting crash recovery.

2022-03-28T11:13:15.301099Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"

2022-03-28T11:13:15.301132Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables

2022-03-28T11:13:15.301210Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...

2022-03-28T11:13:15.318467Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.

2022-03-28T11:13:15.318953Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.

2022-03-28T11:13:15.318978Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.

2022-03-28T11:13:15.319817Z 0 [Note] InnoDB: 5.7.37 started; log sequence number 12660076

2022-03-28T11:13:15.320516Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool

2022-03-28T11:13:15.320724Z 0 [Note] Plugin 'FEDERATED' is disabled.

2022-03-28T11:13:15.339326Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.

2022-03-28T11:13:15.339358Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.

2022-03-28T11:13:15.339363Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.

2022-03-28T11:13:15.339365Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.

2022-03-28T11:13:15.342303Z 0 [Note] InnoDB: Buffer pool(s) load completed at 220328 11:13:15

2022-03-28T11:13:15.342315Z 0 [Warning] CA certificate ca.pem is self signed.

2022-03-28T11:13:15.342866Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.

2022-03-28T11:13:15.344433Z 0 [Note] Server hostname (bind-address): '*'; port: 3306

2022-03-28T11:13:15.344558Z 0 [Note] IPv6 is available.

2022-03-28T11:13:15.344587Z 0 [Note] - '::' resolves to '::';

2022-03-28T11:13:15.344602Z 0 [Note] Server socket created on IP: '::'.

2022-03-28T11:13:15.350976Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.

2022-03-28T11:13:15.408859Z 0 [Note] Event Scheduler: Loaded 0 events

2022-03-28T11:13:15.409164Z 0 [Note] mysqld: ready for connections.

Version: '5.7.37' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL)

2022-03-28T11:13:21.676279Z 3 [Note] Access denied for user 'orchestrator'@'172.22.0.3' (using password: YES)

2022-03-28T11:13:21.681977Z 2 [Note] Access denied for user 'authorization'@'172.22.0.4' (using password: YES)

2022-03-28T11:13:21.772333Z 4 [Note] Access denied for user 'service_registry'@'172.22.0.5' (using password: YES)`

esen96 commented 2 years ago

My issue has been resolved. The db setup with initSQL bash script did not execute properly during my last setup due to missing dependencies on my end, but it works now. Apologies for the inconvenience.

borditamas commented 1 year ago

Hello,

we have just released the v4.6.1, where a more flexible docker approach has been taken and bug fixes were managed. Take a look and please open a new issue if you still runs into some error.