@PeterB : try this:
docker exec -it `docker ps -qf 'name=r-erpnextstack2-fr*'` bash
bench start &
exit
In other words, also a bug report from us both, is whenever I reboot my server, I have to manually log into to the frappe docker and execute bench start &
@vishal @PeterB i have been using erpnext in VM locally to learn but now i want to move it to production. I am not an expert in docker but i have grasped main concepts. I have been trying to follow up setup instructions on the Readme.txt but am stuck with this errors. I donât know where am going wrong with the mariadb container.
OperationalError: (1045, u"Access denied for user â1bd3e0294da19198â@âfrappe.frappedocker_defaultâ (using password: YES)â)
this is what i have, where am i going wrong?
OperationalError: (1045, u"Access denied for user â1bd3e0294da19198â@âfrappe.frappedocker_defaultâ (using password: YES)â)
this is what i have, where am i going wrong?
Thanks,
Hi, @Manson_Kibe
You should try accessing db container
docker exec -it mariadb -u root -p123
show databases;
Result should show list of db include 1bd3e0294da19198, if not I believe you might accidentally delete your container and all database is gone, in that case just set-up a new site.
Actually I believe Official Docker for frappe is not production ready setup, because there are no volume, so every time you start new container old data will be all gone.
For now I think the best way to run production setup is not using docker just use simple debian or ubuntu server follow admin guide here, but if you insist on using docker you should try mine ERPNext Debian Docker.
@pipech thank you for your response, I realised that when run the install docker using non root user it creates the mariadb container and all containers but doesnât install the db user and database. I tried this severally and came to this conclusion. Installing it as root user works well. I hope this will help someone else.
And also thank you for the additional info about docker. I will have to make a decision since whether to use your docker image or use simple debian.
Thanks.
Hi @vishal
The above seems to still be the case. Could you please confirm if any extra steps are necessary in order to use this in production?
Thanks
Kind regards,
Hi All,
Following the hitchhikerâs guide to buiding the frappe docker image, I am at the point where I run the below command for creating a new bench:
cd .. && bench init frappe-bench --skip-bench-mkdir --skip-redis-config-generation && cd frappe-bench
but it returns the following error:
Error: no such option: --skip-bench-mkdir
Any help here will be greatly appreciated
Thanks
Try this
cd .. && bench init frappe-bench --ignore-exist --skip-redis-config-generation && cd frappe-bench
Hi @pipech
Thanks a lot for your suggestion. I have however not been able to try it yet because running docker exec -it frappe bash
(which I need to do first before running your suggested command) is returning the error below:
Error response from daemon: Container f9da1ab032f30b3f32b3bb795341b4f7641973c6dxxxxxxxx is not running
I tried docker run f9da1ab032f30b3f32b3bb795341b4f7641973c6dxxxxxxxx
but it returns the error:
docker: Error: No such image: f9da1ab032f30b3f32b3bb795341b4f7641973c6dxxxxxxxx
Any ideas how to get around this please?
Hi,
try docker start f9da1ab032f3
then docker exec -it f9da1ab032f3 bash
Hi @pipech
It works! Thanks! I noticed the redis containers are also exited. Do I need to start them also before proceeding?
Please advise
âŚsame thing for mariadb. I need to know if its required to start them first so I donât encounter errors along the line
Thanks a lot
Yep, you need to start all container first.
Hi @pipech
Thanks a lot. I successfully started all services and completed the creation of bench but when I ran bench new-site site1.local
the following error came up:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
main()
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 34, in new_site
verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 65, in _new_site
admin_password=admin_password, verbose=verbose, source_sql=source_sql,force=force, reinstall=reinstall)
File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 38, in install_db
create_database_and_user(force, verbose)
File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 62, in create_database_and_user
if force or (db_name not in dbman.get_database_list()):
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 554, in get_database_list
return [d[0] for d in self.db.sql("SHOW DATABASES")]
File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 166, in sql
self.connect()
File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 116, in connect
charset='utf8mb4', use_unicode = True, conv = conversions, local_infile = self.local_infile)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/__init__.py", line 94, in Connect
return Connection(*args, **kwargs)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 327, in __init__
self.connect()
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 629, in connect
raise exc
pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on u'mariadb' ([Errno -2] Name or service not known)")
Any ideas how to get around this?
Thanks
I just checked the mariadb container and noticed it exited almost immediately after I started it! Could this be the source of the issue? If so, how do I resolve this?
Thanks
It is, you should use docker logs mariadb
to see what wrong with that container.
Have you check out my erpnext docker repo GitHub - pipech/erpnext-docker-debian: Self-contained ERPNext Docker Image base on Debian
I made a detailed instruction on erpnext docker there.
Hi @pipech
ERROR: mysqld failed while attempting to check config
command was: "mysqld --verbose --help --log-bin-index=/tmp/tmp.SBDsIsR0Zi"
2018-07-18 23:53:44 0 [Note] Plugin 'FEEDBACK' is disabled.
2018-07-18 23:53:44 0 [Warning] Could not open mysql.plugin table. Some options may be missing from the help text
2018-07-18 23:53:44 0 [ERROR] mysqld: unknown variable 'innodb-file-format=barracuda'
2018-07-18 23:53:44 0 [ERROR] Aborting
ERROR: mysqld failed while attempting to check config
command was: "mysqld --verbose --help --log-bin-index=/tmp/tmp.E0AYMrtOgx"
2018-07-19 7:09:46 0 [Note] Plugin 'FEEDBACK' is disabled.
2018-07-19 7:09:46 0 [Warning] Could not open mysql.plugin table. Some options may be missing from the help text
2018-07-19 7:09:46 0 [ERROR] mysqld: unknown variable 'innodb-file-format=barracuda'
2018-07-19 7:09:46 0 [ERROR] Aborting
ERROR: mysqld failed while attempting to check config
command was: "mysqld --verbose --help --log-bin-index=/tmp/tmp.iaLpn4K4V6"
2018-07-19 8:00:54 0 [Note] Plugin 'FEEDBACK' is disabled.
2018-07-19 8:00:54 0 [Warning] Could not open mysql.plugin table. Some options may be missing from the help text
2018-07-19 8:00:54 0 [ERROR] mysqld: unknown variable 'innodb-file-format=barracuda'
2018-07-19 8:00:54 0 [ERROR] Aborting
Kind regards,
Hi @pipech
Iâve browsed through your documentation but didnât find any section relating to the above issue. I would really appreciate any pointers or suggestions you can give to resolve this
Thanks
I guess docker compose pull mariadb version 10.3 which is not compatible with config using on frappe_docker repo. Solution is specify mariadb version 10.2 on docker-compose.yml and start new maria db container.
https://github.com/frappe/frappe_docker/issues/40#issuecomment-403965796
Hi @pipech
Thanks a lot for your guidance. I got around it by following the advice of @dominik in this post Important MariaDB Version 10.3 Action Required before Update
Now Iâve been able to get the site up using bench start
The big question now is âHow do I get this to work in productionâ? I noticed you have detailed steps on your site but itâs for Debian. My server is Centos and Iâve installed using the steps in the Hitchhikerâs guide which unfortunately doesnât list out steps for production!
Where do I go from here? Is there any way to get the steps in your documentation to work in my scenario?
Thanks a great deal for all your kind assistance