How to duplicate the same setup on other machine for testing

654 views
Skip to first unread message

Amit Bondwal

unread,
Aug 3, 2014, 8:25:57 AM8/3/14
to erpnext-u...@googlegroups.com
Hi Everyone,

I have a production server of erpnext and now I want to copy this production setup to a testing server for testing changes before implementing in production,

First I installed the application using github documentation https://github.com/frappe/bench and try to create same site to avoid database connectivity error. I tried later, copy the frappe directory from production to testing server on same username on same path and import the database in mariadb. But I am getting below error.

OperationalError: (1045, "Access denied for user 'erpnext'@'localhost' (using password: YES)")

I tried to change erpnext database password as it was in production mysql.user table but no success. I also check conf.py file but in this no database and password detail is given.

Complete error file is attached.

I have some other question:-
1. We need to change from mandatory to unmandatory  option of purchase reciept no. in purchase return section. How can I do this.
2. How could I create a report for expiry item in next 30 days.

Thanks in advance.

Regards
Amit Bondwal


I am not able to attach file so complete error is given below:--


_mysql_exceptions.OperationalError
OperationalError: (1045, "Access denied for user 'erpnext'@'localhost' (using password: YES)")

Traceback (most recent call last)
File "/home/azureuser/erpnext/apps/frappe/frappe/middlewares.py", line 15, in __call__
return super(StaticDataMiddleware, self).__call__(environ, start_response)
File "/home/azureuser/erpnext/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 588, in __call__
return self.app(environ, start_response)
File "/home/azureuser/erpnext/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 588, in __call__
return self.app(environ, start_response)
File "/home/azureuser/erpnext/env/lib/python2.7/site-packages/werkzeug/local.py", line 224, in application
return ClosingIterator(app(environ, start_response), self.cleanup)
File "/home/azureuser/erpnext/env/lib/python2.7/site-packages/werkzeug/wrappers.py", line 286, in application
return f(*args[:-2] + (request,))(*args[-2:])
File "/home/azureuser/erpnext/apps/frappe/frappe/app.py", line 73, in application
response = frappe.website.render.render("message")
File "/home/azureuser/erpnext/apps/frappe/frappe/website/render.py", line 44, in render
data = render_page(path)
File "/home/azureuser/erpnext/apps/frappe/frappe/website/render.py", line 99, in render_page
return build(path)
File "/home/azureuser/erpnext/apps/frappe/frappe/website/render.py", line 108, in build
return build_method(path)
File "/home/azureuser/erpnext/apps/frappe/frappe/website/render.py", line 121, in build_page
context = get_context(path)
File "/home/azureuser/erpnext/apps/frappe/frappe/website/context.py", line 30, in get_context
context = get_sitemap_options(path)
File "/home/azureuser/erpnext/apps/frappe/frappe/website/sitemap.py", line 17, in get_sitemap_options
sitemap_options = build_sitemap_options(path)
File "/home/azureuser/erpnext/apps/frappe/frappe/website/sitemap.py", line 24, in build_sitemap_options
sitemap_options = frappe._dict(frappe.get_doc("Website Route", path).as_dict())
File "/home/azureuser/erpnext/apps/frappe/frappe/__init__.py", line 337, in get_doc
return frappe.model.document.get_doc(arg1, arg2)
File "/home/azureuser/erpnext/apps/frappe/frappe/model/document.py", line 24, in get_doc
controller = get_controller(doctype)
File "/home/azureuser/erpnext/apps/frappe/frappe/model/document.py", line 34, in get_controller
module = load_doctype_module(doctype)
File "/home/azureuser/erpnext/apps/frappe/frappe/modules/__init__.py", line 49, in load_doctype_module
module = get_doctype_module(doctype)
File "/home/azureuser/erpnext/apps/frappe/frappe/modules/__init__.py", line 45, in get_doctype_module
return frappe.db.get_value('DocType', doctype, 'module') or "core"
File "/home/azureuser/erpnext/apps/frappe/frappe/database.py", line 300, in get_value
ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug)
File "/home/azureuser/erpnext/apps/frappe/frappe/database.py", line 317, in get_values
return self.get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
File "/home/azureuser/erpnext/apps/frappe/frappe/database.py", line 390, in get_values_from_table
conditions, order_by), filters, as_dict=as_dict, debug=debug, update=update)
File "/home/azureuser/erpnext/apps/frappe/frappe/database.py", line 76, in sql
self.connect()
File "/home/azureuser/erpnext/apps/frappe/frappe/database.py", line 47, in connect
Display the sourcecode for this frameOpen an interactive python shell in this frameuse_unicode=True, charset='utf8')
File "/home/azureuser/erpnext/env/lib/python2.7/site-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/home/azureuser/erpnext/env/lib/python2.7/site-packages/MySQLdb/connections.py", line 193, in __init__
super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (1045, "Access denied for user 'erpnext'@'localhost' (using password: YES)")
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object

Rushabh Mehta

unread,
Aug 4, 2014, 1:15:35 AM8/4/14
to erpnext-u...@googlegroups.com
On 03-Aug-2014, at 5:55 pm, Amit Bondwal <bondwa...@gmail.com> wrote:

Hi Everyone,

I have a production server of erpnext and now I want to copy this production setup to a testing server for testing changes before implementing in production,

First I installed the application using github documentation https://github.com/frappe/bench and try to create same site to avoid database connectivity error. I tried later, copy the frappe directory from production to testing server on same username on same path and import the database in mariadb. But I am getting below error.

OperationalError: (1045, "Access denied for user 'erpnext'@'localhost' (using password: YES)")

Did you export and import the db too? I don't think mysql server passwords are copy-able - you might have too look up mysql help for this.


I tried to change erpnext database password as it was in production mysql.user table but no success. I also check conf.py file but in this no database and password detail is given.

Complete error file is attached.

I have some other question:-
1. We need to change from mandatory to unmandatory  option of purchase reciept no. in purchase return section. How can I do this.

Setup > Customize > Customize Form

--
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-fo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-user-forum/f8e4698c-c4f6-4ef1-b857-433cbf5ff41a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Amit Bondwal

unread,
Aug 6, 2014, 1:51:42 AM8/6/14
to erpnext-u...@googlegroups.com
Hi Rushabh,

Thanks for your reply,
Yes, I am import and export the DB too. I found the thread on development forum https://groups.google.com/forum/#!topic/erpnext-developer-forum/JBjfobm_tFo, in my case, when I take the backup from erpnext, it send a link to my email but when I tried to download that file, it says url not found. How can I resolve this issue.

I did not get how can I change by help provided by you, the value from mandatory to unmandatory of purchase receipt, in purchase return, Could you share me any tutorial link or any thread.




Amit Bondwal

unread,
Aug 6, 2014, 3:24:53 AM8/6/14
to erpnext-u...@googlegroups.com
Hi Rushabh,

Thanks you very much all erpnext team, I had restored the application on other server using this link https://github.com/frappe/erpnext/wiki/Restoring-From-ERPNext-Backup.

Now my only query left is to set the value from mandatory to unmandatory of purchase receipt, in purchase return.

Regards
Amit Bondwal

Nabin Hait (ERPNext)

unread,
Aug 6, 2014, 7:08:27 AM8/6/14
to erpnext-u...@googlegroups.com
Purchase Return functionality is very much dependent on Purchase Receipt. Items are selected only from Purchase Receipts. Hence it can’t be made non-mandatory. Anyway, you can do it by changing relevant scripts.

On Aug 6, 2014, at 12:54 PM, Amit Bondwal <bondwa...@gmail.com> wrote:

Hi Rushabh,

Thanks you very much all erpnext team, I had restored the application on other server using this linkhttps://github.com/frappe/erpnext/wiki/Restoring-From-ERPNext-Backup.

Now my only query left is to set the value from mandatory to unmandatory of purchase receipt, in purchase return.

Regards
Amit Bondwal

On Wed, Aug 6, 2014 at 11:21 AM, Amit Bondwal <bondwa...@gmail.com> wrote:
Hi Rushabh, 

Thanks for your reply,
Yes, I am import and export the DB too. I found the thread on development forumhttps://groups.google.com/forum/#!topic/erpnext-developer-forum/JBjfobm_tFo, in my case, when I take the backup from erpnext, it send a link to my email but when I tried to download that file, it says url not found. How can I resolve this issue.

Amit Bondwal

unread,
Aug 7, 2014, 1:10:58 AM8/7/14
to erpnext-u...@googlegroups.com
Hi Nabin,

Could you help me, in which script what I have to change for this.

Regards
Amit Bondwal


Nabin Hait (ERPNext)

unread,
Aug 11, 2014, 7:44:17 AM8/11/14
to erpnext-u...@googlegroups.com

Amit Bondwal

unread,
Aug 11, 2014, 9:30:21 AM8/11/14
to erpnext-u...@googlegroups.com
Hi Nabin,

Thank you very much for your time and help for providing these details.
But I don't know, How can I achieve my goal in this section or subroutine, I tried to comment different line and removed options but nothing works.

It would be great help if you could help me what should I change in this.

Regards
Amit Bondwal


Nabin Hait

unread,
Aug 11, 2014, 10:01:33 AM8/11/14
to ERPNext User's Forum

The changes is not that easy, you have to read all the related code and find out the required chages.

But why are selecting purchase return as purpose? As you are returning item not against any document,  you can simply select purpose as "MATERIAL ISSUE" and achieve your requirement. 

Amit Bondwal

unread,
Aug 11, 2014, 12:47:14 PM8/11/14
to erpnext-u...@googlegroups.com
Ok, the requirement for this is that, the staff enter the stocks in erpnext without any purchase reciept number, and now some of items are expired and some are going to expired in next month. so to keep that in record.

Please suggest me the best approach, how I can deal with this.

Nabin thank you very much to you and all erpnext team for their valuable support and very nice product.

Regards
Amit Bondwal


Rushabh Mehta

unread,
Aug 11, 2014, 12:54:14 PM8/11/14
to erpnext-u...@googlegroups.com
On 11-Aug-2014, at 10:16 pm, Amit Bondwal <bondwa...@gmail.com> wrote:

Ok, the requirement for this is that, the staff enter the stocks in erpnext without any purchase reciept number, and now some of items are expired and some are going to expired in next month. so to keep that in record.

Please suggest me the best approach, how I can deal with this.

Amit - please engage a freelancer to get what you want. We cannot write scripts for you in the forum. If you are stuck we can help you out.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages