Database settings are invalid?

Hello dear community,

I have created a Gitea server via a Docker container on a test instance (VirtualBox) - everything works wonderfully here.
Now I want to do the same on my web server but I get the following error message in the setup:

Database settings are invalid: dial tcp connect: connection timed out

I would like to use the host’s database - on Virtualbox it worked with this IP. Port 3306 + 3300 is free in the FW, the access data to the database is also correct and I have now even allowed the user access from any host - but the error message simply does not change :rage:

/etc/gitea# cat docker-compose.yml
    version: '3'
        external: false
        driver: local
        image: gitea/gitea:1.13.6
        container_name: gitea
          - DB_TYPE=mysql
          - DB_HOST=
          - DB_NAME=DBNAME
          - DB_USER=DBUSER
          - DB_PASSWD=DBPW
        restart: always
          - gitea
          - /var/www/clients/clientx/weby/private/giteadata/data:/data
          - /var/www/clients/clientx/weby/private/giteadata/config:/config
          - /etc/timezone:/etc/timezone:ro
          - /etc/localtime:/etc/localtime:ro
          - /var/run/mysqld:/var/run/mysqld
          - "3300:3000"
          - "222:22"

Since port 3000 is already occupied for Rocketchat, I switched to 3300 - everything works wonderfully on Virtualbox ^^

The Apache conf as follows:

## gitea
<Proxy *>
         Order allow,deny
        Allow from all
AllowEncodedSlashes NoDecode
# Note: no trailing slash after either /git or port
ProxyPass /git nocanon
    ProxyPassReverse /git     

Whats going on here ? Many thanks in advance

1 Like

You are using a significantly out of date version of Gitea ( 1.13.6), please instead update to latest stable (at time of writing it is 1.15.10 soon to be 1.16.0)

1 Like

Hi, thanks but on another mashine this old version does a very well job.

Now I changed the yml to the new version, pulled again, tried teh setup - same error (of course)

isn’t there a log to examine ? i started getting sick and tired of repeating and repeating the same steps which just cannot work…

why was that working exactliy tzhis way on test-server on virtual box and wjhy does not work in a webserver ???

Can I somehow remove the gitea completely with all files, configs and everything (without affecting other docker images running) and just reinstall new ?

I got it now - somehow the containers IP address was different to the one on my other mashine. I changed the IPs and all working now.

Identified IP of container by executing:

docker inspect <Container> | grep -i ipaddress	

It gave me Then I changed the DB-IP in the yml to - all good now

How can I mark this thread as solved ?