I am trying to launch erpnext with docker on production, I have kept database in separate server.
Provided the database server ip in .env file MARIADB_HOST=184.108.40.206
when erpnext server runs, it appends port twice.
Attempt 1 to connect to 220.127.116.11:3306:3306
Mariadb is on docker host machine?
You’ll need to add % as host for root user and existing db users that access db from containers
I have a different server running maria db in docker. Port is attached to local port.
docker run -d -p 3306:3306 mariadb:version.
I am able to connect to mysql server from another server
mysql -h 18.104.22.168
issue is erpnext trying to connect to
Something to do with networking, firewall?
I have a VPS with mariadb hosted, I use it from my containers. I’m able to connect and use it.
I had to allow cluster ips to connect to mariadb host and it worked.
So the problem is that the port is getting added twice, if not I am able to connect to the database from outside.
MARIADB_HOST needs to be ip only.
Check the common_site_config.json.
db_host and db_port are separate keys
When I first started the container, I had provided 22.214.171.124:3306 as the MARIA_DB host. This was stored in the volume, I removed the volume and restarted it started establishing the connection.
my user is root
erpnext-python_1 | Attempt 1 to connect to 126.96.36.199:3306
erpnext-python_1 | Attempt 1 to connect to redis-queue:6379
erpnext-python_1 | Attempt 1 to connect to redis-cache:6379
erpnext-python_1 | Attempt 1 to connect to redis-socketio:6379
erpnext-python_1 | Connections OK
when I make request to erpnext-python_1, it throws error.
pymysql.err.OperationalError: (1045, “Access denied for user ‘_559c5fa6381378f2’@‘188.8.131.52’ (using password: YES)”)
thanks @revant_one that helped.
Interestingly, data tables are not getting created.
pymysql.err.ProgrammingError: (‘DocType’, ‘Portal Menu Item’)
Can I manually run these migrations?
yes you can try that. enter into erpnext-python container and exec
bench --site <site> migrate
getting this error. database is empty
pymysql.err.ProgrammingError: (1146, “Table ‘_559c5fa6381378f2.tabDefaultValue’ doesn’t exist”)
try to create site again. if you have created the site using “new” erpnext-python container command then it should work, if you create site with
bench new-site use
I think there was an issue with 13.2. Once I upgraded to 13.5 it went smoothly.
In 13.5, I am not able to support modules and this message shows up.