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

[Bug]: Changing default configuration does not work #4058

Closed
1 task done
hkad98 opened this issue Nov 16, 2022 · 3 comments
Closed
1 task done

[Bug]: Changing default configuration does not work #4058

hkad98 opened this issue Nov 16, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request follow-up User feedback required

Comments

@hkad98
Copy link

hkad98 commented Nov 16, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I have a docker-compose file where I defined the mindsdb service as follows:

 mindsdb:
    image: mindsdb/mindsdb:22.11.3.2
    ports:
      - "47334:47334"
      - "47335:47335"
      - "47336:47336"
    environment:
      MDB_CONFIG_CONTENT: '{"api": {"mysql": {"host": "0.0.0.0", "password": "mindsdb", "port": "47335", "user": "mindsdb", "database": "mindsdb", "ssl": true}}}'
    volumes:
      - mindsdb-data:/data

I need to override the default password for MySQL, which I do by setting the environment variable MDB_CONFIG_CONTENT with the override password for MySQL.

When I start the docker-compose, all services are up and running. MySQL starts, and I can connect there with an override password. The issue is when I see the start-up of HTTP in logs.

2022-11-16 11:39:57,307 - WARNING - check auth, user=mindsdb: password mismatch
2022-11-16 11:39:57,309 - WARNING - Access denied for user mindsdb
2022-11-16 11:40:24,452 - WARNING - check auth, user=mindsdb: password mismatch
2022-11-16 11:40:24,454 - WARNING - Access denied for user mindsdb
2022-11-16 11:40:29,643 - WARNING - check auth, user=mindsdb: password mismatch
2022-11-16 11:40:29,645 - WARNING - Access denied for user mindsdb

Therefore http://localhost:47334/ does load and ends with the error message ERR_EMPTY_RESPONSE.

Expected Behavior

I expect that overriding MySQL password will not break http.

Steps To Reproduce

Run docker or docker-compose with an override password for MySQL and try to open http://localhost:47334.

MDB_CONFIG_CONTENT: '{"api": {"mysql": {"host": "0.0.0.0", "password": "mindsdb", "port": "47335", "user": "mindsdb", "database": "mindsdb", "ssl": true}}}'

Anything else?

No response

@ZoranPandovski ZoranPandovski added the bug Something isn't working label Nov 16, 2022
@Ricram2 Ricram2 added the follow-up User feedback required label Nov 21, 2022
@ZoranPandovski
Copy link
Member

Hi @hkad98, sorry for the late response. If you start the container with the following:

MDB_CONFIG_CONTENT: '{"api": {"mysql": {"host": "0.0.0.0", "password": "mindsdb", "port": "47335", "user": "mindsdb", "database": "mindsdb", "ssl": true}}}'

This will only start the MySQL API. The HTTP API will not start since it does not exist in the config. If you want to run the HTTP API too, you will need to include it in the config.

@hkad98
Copy link
Author

hkad98 commented Dec 22, 2022

Hi @ZoranPandovski,

Thanks for your reply. Could you please extend documentation with this information? This behavior is not fully explained in the documentation. From the documentation, I understand that MDB_CONFIG_CONTENT will override values for passed keys, which I think is straightforward. Still, the actual behavior is different and unclear – for the change of MySQL password, I need to copy-paste the whole config and change the only value for the password.

@ZoranPandovski
Copy link
Member

Yes, that makes sense. I will add info in docs for now and include this as an enhancement so we can handle that better.

@ZoranPandovski ZoranPandovski added enhancement New feature or request and removed bug Something isn't working labels Dec 23, 2022
@ZoranPandovski ZoranPandovski mentioned this issue Dec 23, 2022
4 tasks
@tomhuds tomhuds closed this as completed Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request follow-up User feedback required
Projects
None yet
Development

No branches or pull requests

4 participants