Closed fais3000 closed 4 years ago
This could be related https://github.com/docker-library/mysql/issues/275
I think it is a different issue. In that issue, it sounds like there is an authentication problem which triggers an application-level error. In the stack trace you pasted above, it looks like connection related syscalls are returning ECONNREFUSED
indicating the MySQL port is not even accepting connections.
I can confirm the issue happens on my machine too. I think the issue is that the CyTube config.yaml
is trying to connect to localhost
, but the docker-compose script is creating an internal network that ends up binding MariaDB to a class B private IP address instead of loopback. However, changing the server in the config to 'mysql'
(which should be the hostname of the MariaDB docker container) gives other strange errors, so someone probably needs to investigate it further.
Note that this is a community-maintained image and I don't provide official support for it, but you can try summoning the previous people who worked on it to investigate further -- I'm not a docker expert.
@calzoneman You're right. Its not working even without the volume.
@Aersaud @davidsiaw @Gelmo Any tips guys on how I can solve this connection issue?
Hello @fais3000
In your config.yaml you have to change where MySQL is located since it will look for local host in the sync/cy-tube container. You need to change it to whatever you’re MySQL container is called in the compose file. So in this case (using the exact names as the default compose file)
You would need to change
mysql:
server: ‘localhost’
To
mysql:
server: ‘mysql’
Once you have done that your docker logs for sync/cy-tube should look something like this
sync_1 | [INFO] server: Starting CyTube v3.70.0
sync_1 | [WARN] webserver: The configured cookie secret was left as the default of "change-me".
sync_1 | [INFO] webserver: Enabled gzip compression
sync_1 | [INFO] torlist: File /home/syncuser/sync/tor-exit-list.json not found, downloading from https://check.torproject.org/exit-addresses
sync_1 | [INFO] database/tables: Creating table users
sync_1 | [INFO] database/tables: Creating table channels
sync_1 | [INFO] database/tables: Creating table channel_data
sync_1 | [INFO] database/tables: Creating table global_bans
sync_1 | [INFO] database/tables: Creating table password_reset
sync_1 | [INFO] database/tables: Creating table user_playlists
sync_1 | [INFO] database/tables: Creating table aliases
sync_1 | [INFO] torlist: Saved /home/syncuser/sync/tor-exit-list.json
sync_1 | [INFO] database/tables: Creating table meta
sync_1 | [INFO] database/tables: Creating table channel_libraries
sync_1 | [INFO] database/tables: Creating table channel_ranks
sync_1 | [INFO] database/tables: Creating table channel_bans
sync_1 | [INFO] database/tables: Creating table user_deletion_requests
sync_1 | [INFO] database/tables: Creating table media_metadata_cache
sync_1 | [WARN] database/update: db_version key missing from database. Setting db_version=12
@Aersaud Thanks, however after checking, both my config and docker-compose had same server.
Later found out that may be change was made after container was created. https://github.com/docker-library/mysql/issues/51#issuecomment-76989402 helped me by recreating the volume.
@calzoneman With current docker-compose file, mysql fails to connect.
When removing following it starts working.
Any ideas how it can be fixed with persistent volume.