Update from 3 to 4 error

241 views
Skip to first unread message

Faisal Reza

unread,
Jun 11, 2014, 8:08:38 AM6/11/14
to erpnext-dev...@googlegroups.com
Hi
trying to upgrade from v3 (VM) to v4 using update scripts
the scripts end with error and the username from v3 cannot login to the erpnext

this is what i do

./lib/wnf.py --pull origin master
./lib/wnf.py --latest
sudo pip install semantic-version
 
git clone https://github.com/frappe/frappe-bench
cd frappe-bench/

sudo apt-get install python-dev build-essential python-mysqldb git memcached ntp vim screen htop mariadb-server mariadb-common libmariadbclient-dev  libxslt1.1 libxslt1-dev redis-server libssl-dev libcrypto++-dev postfix

./scripts/install.sh migrate_3_to_4 /home/erpnext/erpnext/

when postfix dialog appear, i choose Local only with domain erp.mycompanyname.com

error log :
http://pastebin.com/6miJqwzD

appreciate for any helo, thanks in advance

Rushabh Mehta

unread,
Jun 11, 2014, 11:03:54 AM6/11/14
to erpnext-dev...@googlegroups.com
The trace shows the exception is about the backups directory, which is public - it should not be.



--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/b338e1b1-3be4-488a-8607-a320667793e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Faisal Reza

unread,
Jun 12, 2014, 1:20:58 AM6/12/14
to erpnext-dev...@googlegroups.com
hi

what should do to fix that? any explaination for the steps?

thanks

Pratik Vyas

unread,
Jun 13, 2014, 12:32:32 PM6/13/14
to erpnext-dev...@googlegroups.com
> --
> Note:
>
> If you are posting an issue,
> 1. We should be able to replicate it at our end. So please give us as much
> information as you can. Please see it from the point of view of the person
> receiving the communication.
> 2. Paste your code at http://pastebin.com or http://gist.github.com and send
> only the URL via email
> 3. For sending images, use http://imgur.com or other similar services. Do
> not send images as attachments. Links are good. Same goes for any file you
> are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google Groups
> "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to erpnext-developer...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/erpnext-developer-forum/b338e1b1-3be4-488a-8607-a320667793e7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Edit site_config.json and either remove backup_path or change public
to private in it's value.


--
Pratik
erpnext

Faisal Reza

unread,
Jun 25, 2014, 2:30:42 AM6/25/14
to erpnext-dev...@googlegroups.com
hi pratik

i already changed in
/home/erpnext/frappe-bench/sites/erpnext/site_config.json

either remove backup and change public to private
after that i run again ./scripts/install.sh migrate_3_to_3 /home/erpnext/erpnext

root@erp:/home/erpnext/frappe-bench# ./scripts/install.sh migrate_3_to_4 /home/erpnext/erpnext/
New python executable in env/bin/python2.7
Not overwriting existing python script env/bin/python (you must use env/bin/python2.7)
Installing setuptools, pip...done.
site erpnext already exists

what should i do?

On Wednesday, June 11, 2014 7:08:38 PM UTC+7, Faisal Reza wrote:

Pratik Vyas

unread,
Jun 27, 2014, 9:12:11 AM6/27/14
to erpnext-dev...@googlegroups.com
On Wed, Jun 25, 2014 at 12:00 PM, Faisal Reza <fais...@gmail.com> wrote:
> hi pratik
>
> i already changed in
> /home/erpnext/frappe-bench/sites/erpnext/site_config.json
>
> either remove backup and change public to private
> after that i run again ./scripts/install.sh migrate_3_to_3
> /home/erpnext/erpnext
>
> root@erp:/home/erpnext/frappe-bench# ./scripts/install.sh migrate_3_to_4
> /home/erpnext/erpnext/
> New python executable in env/bin/python2.7
> Not overwriting existing python script env/bin/python (you must use
> env/bin/python2.7)
> Installing setuptools, pip...done.
> site erpnext already exists
>
> what should i do?

From the sites directory, run
`../env/bin/frappe --latest erpnext`
>
> On Wednesday, June 11, 2014 7:08:38 PM UTC+7, Faisal Reza wrote:
>>
>> Hi
>> trying to upgrade from v3 (VM) to v4 using update scripts
>> the scripts end with error and the username from v3 cannot login to the
>> erpnext
>>
>> this is what i do
>>
>> ./lib/wnf.py --pull origin master
>> ./lib/wnf.py --latest
>> sudo pip install semantic-version
>>
>> git clone https://github.com/frappe/frappe-bench
>> cd frappe-bench/
>>
>> sudo apt-get install python-dev build-essential python-mysqldb git
>> memcached ntp vim screen htop mariadb-server mariadb-common
>> libmariadbclient-dev libxslt1.1 libxslt1-dev redis-server libssl-dev
>> libcrypto++-dev postfix
>>
>> ./scripts/install.sh migrate_3_to_4 /home/erpnext/erpnext/
>>
>> when postfix dialog appear, i choose Local only with domain
>> erp.mycompanyname.com
>>
>> error log :
>> http://pastebin.com/6miJqwzD
>>
>> appreciate for any helo, thanks in advance
>
> --
> Note:
>
> If you are posting an issue,
> 1. We should be able to replicate it at our end. So please give us as much
> information as you can. Please see it from the point of view of the person
> receiving the communication.
> 2. Paste your code at http://pastebin.com or http://gist.github.com and send
> only the URL via email
> 3. For sending images, use http://imgur.com or other similar services. Do
> not send images as attachments. Links are good. Same goes for any file you
> are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google Groups
> "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to erpnext-developer...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/erpnext-developer-forum/5dac3a33-2647-4a73-a187-5d1951fff58c%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Pratik
erpnext

Ferenc

unread,
Jul 4, 2014, 4:35:11 AM7/4/14
to erpnext-dev...@googlegroups.com
Hi,
I am trying  to upgrade from Erpnext3 to 4 also, using same scripts.
Here is the log:
http://pastebin.com/ZtKCEWtv

Appreciate for any help,
regards,
Ferenc

Pratik Vyas

unread,
Jul 6, 2014, 12:29:32 AM7/6/14
to erpnext-dev...@googlegroups.com

Hi Fernec, will push a fix today.

--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.

Faisal Reza

unread,
Jul 6, 2014, 10:39:29 AM7/6/14
to erpnext-dev...@googlegroups.com
Hi Pratik,

the error still continues, 
this is what i'm doing

1. Delete frappe-bench folder
#rm -rf /home/erpnext/frappe-bench

2. i try to repeat again from the start

3. enter the directory and run migration script
#cd frappe-bench
#./scripts/install.sh migrate_3_to_4 /home/erpnext/erpnext

and here comes the new error
Traceback (most recent call last):
  File "scripts/3to4.py", line 32, in <module>
    migrate(args.site)
  File "scripts/3to4.py", line 23, in migrate
    add_to_installed_apps('frappe', rebuild_sitemap=False)
TypeError: add_to_installed_apps() got an unexpected keyword argument 'rebuild_site
map'

complete log is in the http://pastebin.com/4etPCNRq

4. as you mentioned, i also try running ../env/bin/frappe --latest erpnext
# cd sites
# ../env/bin/frappe --latest erpnext

here comes the error :

  File "/home/erpnext/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 202, in msgprint
    _raise_exception()
  File "/home/erpnext/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 186, in _raise_exception
    raise raise_exception, msg
frappe.exceptions.ValidationError: Options must be a valid DocType for field User ID in row 10
erpnext@erp:~/frappe-bench/sites$ 


is there any steps i missed? what should i do to make this migration 3 to 4 sucessful?

really appreciate for your help

On Wednesday, June 11, 2014 7:08:38 PM UTC+7, Faisal Reza wrote:

Pratik Vyas

unread,
Jul 6, 2014, 11:15:33 AM7/6/14
to erpnext-dev...@googlegroups.com
https://github.com/frappe/frappe-bench/commit/7effa5bcb09bb4ef36324f041d3a90d77bceccaf
should fix Fernec's and Faisal's issue
> --
> Note:
>
> If you are posting an issue,
> 1. We should be able to replicate it at our end. So please give us as much
> information as you can. Please see it from the point of view of the person
> receiving the communication.
> 2. Paste your code at http://pastebin.com or http://gist.github.com and send
> only the URL via email
> 3. For sending images, use http://imgur.com or other similar services. Do
> not send images as attachments. Links are good. Same goes for any file you
> are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google Groups
> "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to erpnext-developer...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/erpnext-developer-forum/6e18d767-c50d-4252-aebd-7985d5eabe2d%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Pratik
erpnext

Ferenc

unread,
Jul 7, 2014, 4:44:15 PM7/7/14
to erpnext-dev...@googlegroups.com
Hi,
We are still trying to migrate Erpnext3 to 4...If there is some alternative way, pls let me know. Some additional written instructions would be highly appreciated concerning huge amount of data in the Erpnext3 database.
Regards,
Ferenc

Pratik Vyas

unread,
Jul 8, 2014, 2:05:30 AM7/8/14
to erpnext-dev...@googlegroups.com
On Tue, Jul 8, 2014 at 2:14 AM, Ferenc <feren...@gmail.com> wrote:
> Hi,
> We are still trying to migrate Erpnext3 to 4...If there is some alternative
> way, pls let me know. Some additional written instructions would be highly
> appreciated concerning huge amount of data in the Erpnext3 database.
> Regards,
> Ferenc
>

Hi Fernec,

The steps you followed are correct. The error was due to an API change
in frappe and we've fixed it in the migration script. Can you try
migrating again after updating (./scripts/update.sh) ?
> --
> Note:
>
> If you are posting an issue,
> 1. We should be able to replicate it at our end. So please give us as much
> information as you can. Please see it from the point of view of the person
> receiving the communication.
> 2. Paste your code at http://pastebin.com or http://gist.github.com and send
> only the URL via email
> 3. For sending images, use http://imgur.com or other similar services. Do
> not send images as attachments. Links are good. Same goes for any file you
> are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google Groups
> "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to erpnext-developer...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/erpnext-developer-forum/2c5dbbcf-8e9d-4007-ab26-1fa7663f9f2a%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.


Thanks,
--
Pratik
erpnext

Faisal Reza

unread,
Jul 8, 2014, 8:01:04 AM7/8/14
to erpnext-dev...@googlegroups.com
still see the error 

    validate_fields_for_doctype(self.doc_type)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 186, in validate_fields_for_doctype
    validate_fields(frappe.get_meta(doctype).get("fields"))
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 246, in validate_fields
    check_link_table_options(d)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 212, in check_link_table_options
    frappe.throw(_("Options must be a valid DocType for field {0} in row {1}").format(d.label, d.idx))
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 206, in throw
    msgprint(msg, raise_exception=exc)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 203, in msgprint
    _raise_exception()
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 187, in _raise_exception
    raise raise_exception, msg
frappe.exceptions.ValidationError: Options must be a valid DocType for field User ID in row 10
erpnext@erp:~/frappe-bench$

any other suggestions?

On Wednesday, June 11, 2014 7:08:38 PM UTC+7, Faisal Reza wrote:

Rushabh Mehta

unread,
Jul 9, 2014, 1:31:27 AM7/9/14
to erpnext-dev...@googlegroups.com
Did you change any fields doctype Employee?

(seems an issue with the User ID field)


@rushabh_mehta

--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.

Ferenc

unread,
Jul 15, 2014, 5:58:44 AM7/15/14
to erpnext-dev...@googlegroups.com
Hi,

is there any follow-up concerning upgrading and data transfer from erpnext3 to 4.

Thank you,
Ferenc
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.

Rushabh Mehta

unread,
Jul 15, 2014, 9:54:03 PM7/15/14
to erpnext-dev...@googlegroups.com
3-to-4 script should work - we have migrated more than 300 accounts using the script.


To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/4918cb97-b59f-4cdc-b34d-c9e17f61c29b%40googlegroups.com.

Kenneth K

unread,
Jul 19, 2014, 6:40:22 AM7/19/14
to erpnext-dev...@googlegroups.com
Hi Pratik,

I've got the error during upgrading.
[root@ip-172-31-0-5 frappe-bench]# ./scripts/install.sh migrate_3_to_4 /home/erpnext/erpnext

New python executable in env/bin/python2.7
Also creating executable in env/bin/python
Installing setuptools, pip...done.
remote: Reusing existing pack: 56374, done.
remote: Counting objects: 93, done.
remote: Compressing objects: 100% (93/93), done.
remote: Total 56467 (delta 40), reused 0 (delta 0)
Receiving objects: 100% (56467/56467), 22.38 MiB | 4.03 MiB/s, done.
Resolving deltas: 100% (39646/39646), done.
remote: Reusing existing pack: 114207, done.
remote: Counting objects: 92, done.
remote: Compressing objects: 100% (91/91), done.
remote: Total 114299 (delta 54), reused 2 (delta 1)
Receiving objects: 100% (114299/114299), 35.93 MiB | 5.58 MiB/s, done.
Resolving deltas: 100% (81397/81397), done.
remote: Reusing existing pack: 904, done.
remote: Total 904 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (904/904), 260.24 KiB | 129 KiB/s, done.
Resolving deltas: 100% (622/622), done.
Wrote sites/assets/js/frappe-web.min.js - 63k
Wrote sites/assets/js/shopping-cart-web.min.js - 1k
Wrote sites/assets/js/erpnext.min.js - 12k
Wrote sites/assets/css/frappe.css - 211k
Wrote sites/assets/css/frappe-web.css - 162k
Wrote sites/assets/css/shopping-cart-web.css - 0k
Wrote sites/assets/js/editor.min.js - 26k
Wrote sites/assets/css/erpnext.css - 0k
Wrote sites/assets/js/frappe.min.js - 608k
Wrote sites/assets/js/erpnext-web.min.js - 0k
Wrote sites/assets/js/slickgrid.min.js - 102k
Wrote sites/assets/js/canvasResize.min.js - 22k
Executing execute:frappe.db.sql("""update `tabPatch Log` set patch=replace(patch, '.4_0.', '.v4_0.')""") #2014-05-12 in erpnext (hpharmerp)
Success
Executing execute:frappe.reload_doc('core', 'doctype', 'doctype', force=True) #2014-01-24 in erpnext (hpharmerp)
Success
Executing execute:frappe.reload_doc('core', 'doctype', 'docfield', force=True) #2014-03-01 in erpnext (hpharmerp)
Success
Executing execute:frappe.reload_doc('core', 'doctype', 'docperm') #2014-06-04 in erpnext (hpharmerp)
Success
Executing execute:frappe.reload_doc('core', 'doctype', 'page') #2013-13-26 in erpnext (hpharmerp)
Success
Executing execute:frappe.reload_doc('core', 'doctype', 'report') #2014-06-03 in erpnext (hpharmerp)
Success
Executing execute:frappe.reload_doc('core', 'doctype', 'version') #2014-02-21 in erpnext (hpharmerp)

Traceback (most recent call last):
  File "scripts/3to4.py", line 32, in <module>
    migrate(args.site)
  File "scripts/3to4.py", line 26, in migrate
    latest()
  File "/var/www/frappe-bench/apps/frappe/frappe/cli.py", line 67, in new_fn
    return fn(*args, **new_kwargs)
  File "/var/www/frappe-bench/apps/frappe/frappe/cli.py", line 417, in latest
    frappe.modules.patch_handler.run_all()
  File "/var/www/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
    if not run_single(patchmodule = patch):
  File "/var/www/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 50, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/var/www/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 64, in execute_patch
    exec patchmodule.split("execute:")[1] in globals()
  File "<string>", line 1, in <module>
  File "/var/www/frappe-bench/apps/frappe/frappe/__init__.py", line 364, in reload_doc
    return frappe.modules.reload_doc(module, dt, dn, force=force)
  File "/var/www/frappe-bench/apps/frappe/frappe/modules/__init__.py", line 35, in reload_doc
    return import_files(module, dt, dn, force=force)
  File "/var/www/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 17, in import_files
    return import_file(module, dt, dn, force=force)
  File "/var/www/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 22, in import_file
    ret = import_file_by_path(path, force)
  File "/var/www/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 50, in import_file_by_path
    import_doc(doc, force=force)
  File "/var/www/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 111, in import_doc
    doc.insert()
  File "/var/www/frappe-bench/apps/frappe/frappe/model/document.py", line 147, in insert
    self.run_post_save_methods()
  File "/var/www/frappe-bench/apps/frappe/frappe/model/document.py", line 419, in run_post_save_methods
    self.run_method("on_update")
  File "/var/www/frappe-bench/apps/frappe/frappe/model/document.py", line 392, in run_method
    return Document.hook(fn)(self, *args, **kwargs)
  File "/var/www/frappe-bench/apps/frappe/frappe/model/document.py", line 468, in composer
    return composed(self, method, *args, **kwargs)
  File "/var/www/frappe-bench/apps/frappe/frappe/model/document.py", line 451, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/var/www/frappe-bench/apps/frappe/frappe/model/document.py", line 386, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/var/www/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 86, in on_update
    updatedb(self.name)
  File "/var/www/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 390, in updatedb
    tab.sync()
  File "/var/www/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 170, in sync
    self.create()
  File "/var/www/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 90, in create
    CHARACTER SET=utf8""" % (self.name, add_text))
  File "/var/www/frappe-bench/apps/frappe/frappe/database.py", line 118, in sql
    self._cursor.execute(query)
  File "/var/www/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/var/www/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6),\n\t\t\tmodified datetime(6),\n\t\t\tmodified_by varchar(255),\n\t\t\towner varchar(255)' at line 3")

May I ask how to make it possible to upgrade? Thanks so much.

Thanks,
Kenneth 

Pratik Vyas

unread,
Jul 19, 2014, 6:53:26 AM7/19/14
to erpnext-dev...@googlegroups.com
> --
> Note:
>
> If you are posting an issue,
> 1. We should be able to replicate it at our end. So please give us as much
> information as you can. Please see it from the point of view of the person
> receiving the communication.
> 2. Paste your code at http://pastebin.com or http://gist.github.com and send
> only the URL via email
> 3. For sending images, use http://imgur.com or other similar services. Do
> not send images as attachments. Links are good. Same goes for any file you
> are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google Groups
> "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to erpnext-developer...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/erpnext-developer-forum/79e4e3e9-a1a6-46a4-a5b2-a8ffbfad0b75%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Hi Kenneth,

Have you upgraded to MariaDB 5.5?


Thanks,
--
Pratik
erpnext
Message has been deleted

Kenneth K

unread,
Jul 19, 2014, 12:53:21 PM7/19/14
to erpnext-dev...@googlegroups.com
Oops.. not yet upgraded..
Still finding ways to upgrade.

Thanks,
Kenneth


Pratik Vyas於 2014年7月19日星期六UTC+8下午6時53分26秒寫道:

Kenneth K

unread,
Jul 19, 2014, 1:54:03 PM7/19/14
to erpnext-dev...@googlegroups.com
Hi,

I just continued the installation as MariaDB was installed.
However, new errors come up.

 ../env/bin/frappe --latest erpnext

Traceback (most recent call last):

  File "../env/bin/frappe", line 9, in <module>

    load_entry_point('frappe==4.1.0', 'console_scripts', 'frappe')()

  File "/var/www/frappe-bench/apps/frappe/frappe/cli.py", line 49, in main

    frappe.init(site, sites_path=sites_path)

  File "/var/www/frappe-bench/apps/frappe/frappe/__init__.py", line 100, in init

    local.conf = _dict(get_site_config())

  File "/var/www/frappe-bench/apps/frappe/frappe/__init__.py", line 140, in get_site_config

    config.update(get_file_json(site_config))

  File "/var/www/frappe-bench/apps/frappe/frappe/__init__.py", line 497, in get_file_json

    return json.load(f)

  File "/usr/local/lib/python2.7/json/__init__.py", line 278, in load

    **kw)

  File "/usr/local/lib/python2.7/json/__init__.py", line 326, in loads

    return _default_decoder.decode(s)

  File "/usr/local/lib/python2.7/json/decoder.py", line 366, in decode

    obj, end = self.raw_decode(s, idx=_w(s, 0).end())

  File "/usr/local/lib/python2.7/json/decoder.py", line 382, in raw_decode

    obj, end = self.scan_once(s, idx)

ValueError: Expecting property name: line 21 column 1 (char 608)


Is there anything set incorrect?

Thanks,
Kenneth



Kenneth K於 2014年7月20日星期日UTC+8上午12時53分21秒寫道:

Pratik Vyas

unread,
Jul 19, 2014, 2:00:37 PM7/19/14
to erpnext-dev...@googlegroups.com
On Sat, Jul 19, 2014 at 11:24 PM, 'Kenneth K' via ERPNext Developer
Forum <erpnext-dev...@googlegroups.com> wrote:
> Hi,
>
> I just continued the installation as MariaDB was installed.
> However, new errors come up.


From the exception, it seems that the sites/site_name/site_config.json
is malformed.
--
Pratik
erpnext

Kenneth K

unread,
Jul 19, 2014, 2:06:36 PM7/19/14
to erpnext-dev...@googlegroups.com
Hi Pratik,

It continues!!
Thanks for prompt help!

Is the upgrade successful after seeing this?
Success
Updating frappe                     : [========================================]
Updating Pages                      : [========================================]
Updating Generators                 : [========================================]


Thanks,
Kenneth

Pratik Vyas於 2014年7月20日星期日UTC+8上午2時00分37秒寫道:

Pratik Vyas

unread,
Jul 19, 2014, 2:11:54 PM7/19/14
to erpnext-dev...@googlegroups.com
On Sat, Jul 19, 2014 at 11:36 PM, 'Kenneth K' via ERPNext Developer
Forum <erpnext-dev...@googlegroups.com> wrote:
> Hi Pratik,
>
> It continues!!
> Thanks for prompt help!
>

Most welcome :)

> Is the upgrade successful after seeing this?
>>
>> Success
>> Updating frappe :
>> [========================================]
>> Updating Pages :
>> [========================================]
>> Updating Generators :
>> [========================================]
>

Seems like success.

Thanks,
--
Pratik
erpnext

Kenneth K

unread,
Jul 19, 2014, 2:14:25 PM7/19/14
to erpnext-dev...@googlegroups.com
But I found no new configs in the config folder.
  • cp config/nginx.conf /etc/nginx/conf.d/frappe.conf

Would like to know how to start the new service..
I saw something in install.sh

    frappe --build --sites_path $SITES_PATH

    python scripts/3to4.py $site

    frappe --use $SINGLE_SITE_NAME --sites_path $SITES_PATH

        python scripts/generate_config.py

    echo please run "`which frappe` --serve $site --sites_path `pwd`/$SITES_PATH" to start erpnext

Is it related to the auto-generation of config files?

Thanks,
Kenneth



Pratik Vyas於 2014年7月20日星期日UTC+8上午2時11分54秒寫道:

Pratik Vyas

unread,
Jul 19, 2014, 3:01:29 PM7/19/14
to erpnext-dev...@googlegroups.com
On Sat, Jul 19, 2014 at 11:44 PM, 'Kenneth K' via ERPNext Developer
Forum <erpnext-dev...@googlegroups.com> wrote:
> But I found no new configs in the config folder.
>
> cp config/nginx.conf /etc/nginx/conf.d/frappe.conf
>
>
> Would like to know how to start the new service..
> I saw something in install.sh
>>
>> frappe --build --sites_path $SITES_PATH
>>
>> python scripts/3to4.py $site
>>
>> frappe --use $SINGLE_SITE_NAME --sites_path $SITES_PATH
>>
>> python scripts/generate_config.py
>>
>> echo please run "`which frappe` --serve $site --sites_path
>> `pwd`/$SITES_PATH" to start erpnext
>
> Is it related to the auto-generation of config files?
>

Yes, exactly.

Run,`./env/bin/python scripts/generate_config.py` to generate config.
Copy the files and restart nginx and supervisor.

If nginx complains of multiple default server blocks for port 80, then
remove the conflicting config (could be /etc/nginx/conf.d/default.conf
or /etc/nginx/sites-enabled/default)

Thanks,
--
Pratik
erpnext

Kenneth K

unread,
Jul 19, 2014, 4:00:10 PM7/19/14
to erpnext-dev...@googlegroups.com
Hi Pratik,

Sorry to bother again.
The error shows up when running the generate_config.py script, as follows:

Traceback (most recent call last):

  File "scripts/generate_config.py", line 28, in <module>

    generate_config('supervisor', 'templates/supervisor.conf')

  File "scripts/generate_config.py", line 15, in generate_config

    with open("sites/currentsite.txt") as f:

IOError: [Errno 2] No such file or directory: 'sites/currentsite.txt'

I am quite sure that there's something missed during the installation.
Please advise what I should do for building currentsite.txt.

Thanks,
Kenneth

Pratik Vyas於 2014年7月20日星期日UTC+8上午3時01分29秒寫道:

Pratik Vyas

unread,
Jul 19, 2014, 5:12:51 PM7/19/14
to erpnext-dev...@googlegroups.com
On Sun, Jul 20, 2014 at 1:30 AM, 'Kenneth K' via ERPNext Developer
Forum <erpnext-dev...@googlegroups.com> wrote:
> Hi Pratik,
>
> Sorry to bother again.
> The error shows up when running the generate_config.py script, as follows:
>>
>> Traceback (most recent call last):
>>
>> File "scripts/generate_config.py", line 28, in <module>
>>
>> generate_config('supervisor', 'templates/supervisor.conf')
>>
>> File "scripts/generate_config.py", line 15, in generate_config
>>
>> with open("sites/currentsite.txt") as f:
>>
>> IOError: [Errno 2] No such file or directory: 'sites/currentsite.txt'
>
> I am quite sure that there's something missed during the installation.
> Please advise what I should do for building currentsite.txt.
>

Hi Kenneth,

From the sites directory, run `../env/bin/frappe --use yoursitename`
and try generate_config again.

Thanks,
--
Pratik
erpnext

Kenneth K

unread,
Jul 20, 2014, 11:20:37 AM7/20/14
to erpnext-dev...@googlegroups.com
Hi Pratik,

The installation was complete, however I cannot start with using supervisor + nginx.

I can temporaily run erpnext by using this :

/var/www/frappe-bench/env/bin/frappe --serve erpnext --sites_path /var/www/frappe-bench/sites

which is provided at the end of the upgrade.

Is there anything I missed?

Thanks,
Kenneth


Pratik Vyas於 2014年7月20日星期日UTC+8上午5時12分51秒寫道:

Kenneth K

unread,
Jul 20, 2014, 12:52:55 PM7/20/14
to erpnext-dev...@googlegroups.com
I got "Internal Server Error" with no logs in nginx records.
Also I didn't get any logs for hints in frappe logs.

I've got 3 processes running the same command after starting supervisord.
root     22166 22163  0 00:40 ?        00:00:00 /var/www/frappe-bench/env/bin/python2.7 /var/www/frappe-bench/env/bin/gunicorn -b 127.0.0.1:8000 -w 2 -t 120 frappe.app:application
root     22180 22166  0 00:40 ?        00:00:00 /var/www/frappe-bench/env/bin/python2.7 /var/www/frappe-bench/env/bin/gunicorn -b 127.0.0.1:8000 -w 2 -t 120 frappe.app:application
root     22184 22166  0 00:40 ?        00:00:00 /var/www/frappe-bench/env/bin/python2.7 /var/www/frappe-bench/env/bin/gunicorn -b 127.0.0.1:8000 -w 2 -t 120 frappe.app:application

Also, I just added the supervisor/frappe.conf into supervisord.conf but not in /etc/supervisor/conf.d/frappe.conf.
Is it okay?

Regards,
Kenneth


Kenneth K於 2014年7月20日星期日UTC+8下午11時20分37秒寫道:
Message has been deleted

Kenneth K

unread,
Jul 20, 2014, 3:25:01 PM7/20/14
to erpnext-dev...@googlegroups.com
Also attach some supervisord logs to you:


2014-07-21 01:48:41,453 CRIT Supervisor running as root (no user in config file)
2014-07-21 01:48:41,470 INFO /var/tmp/supervisor.sock:Medusa (V1.1.1.1) started at Mon Jul 21 01:48:41 2014
        Hostname: <unix domain socket>
        Port:/var/tmp/supervisor.sock
2014-07-21 01:48:41,538 CRIT Running without any HTTP authentication checking
2014-07-21 01:48:41,552 INFO daemonizing the process
2014-07-21 01:48:41,553 INFO supervisord started with pid 22699
2014-07-21 01:48:41,569 INFO spawned: 'frappe-workerbeat' with pid 22701
2014-07-21 01:48:41,585 INFO spawned: 'frappe-web' with pid 22702
2014-07-21 01:48:41,600 INFO spawned: 'frappe-worker' with pid 22703
2014-07-21 01:48:42,605 INFO success: frappe-workerbeat entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2014-07-21 01:48:42,605 INFO success: frappe-web entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2014-07-21 01:48:42,605 INFO success: frappe-worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2014-07-21 01:48:43,062 INFO exited: frappe-workerbeat (exit status 255; not expected)
2014-07-21 01:48:43,062 INFO exited: frappe-worker (exit status 255; not expected)
2014-07-21 01:48:43,062 INFO received SIGCLD indicating a child quit
2014-07-21 01:48:44,067 INFO spawned: 'frappe-workerbeat' with pid 22722
2014-07-21 01:48:44,081 INFO spawned: 'frappe-worker' with pid 22723
2014-07-21 01:48:44,963 INFO exited: frappe-workerbeat (exit status 255; not expected)
2014-07-21 01:48:44,963 INFO received SIGCLD indicating a child quit
2014-07-21 01:48:44,967 INFO exited: frappe-worker (exit status 255; not expected)
2014-07-21 01:48:44,967 INFO received SIGCLD indicating a child quit
2014-07-21 01:48:46,072 INFO localhost:0 - - [20/Jul/2014:17:48:46 +0800] "POST /RPC2 HTTP/1.0" 200 254
2014-07-21 01:48:46,086 INFO localhost:0 - - [20/Jul/2014:17:48:46 +0800] "POST /RPC2 HTTP/1.0" 200 3149
2014-07-21 01:48:47,091 INFO spawned: 'frappe-workerbeat' with pid 22737
2014-07-21 01:48:47,098 INFO spawned: 'frappe-worker' with pid 22738
2014-07-21 01:48:47,966 INFO exited: frappe-workerbeat (exit status 255; not expected)
2014-07-21 01:48:47,967 INFO exited: frappe-worker (exit status 255; not expected)
2014-07-21 01:48:47,967 INFO received SIGCLD indicating a child quit
2014-07-21 01:48:50,974 INFO spawned: 'frappe-workerbeat' with pid 22751
2014-07-21 01:48:50,987 INFO spawned: 'frappe-worker' with pid 22752
2014-07-21 01:48:51,812 INFO exited: frappe-workerbeat (exit status 255; not expected)
2014-07-21 01:48:51,812 INFO received SIGCLD indicating a child quit
2014-07-21 01:48:51,830 INFO gave up: frappe-workerbeat entered FATAL state, too many start retries too quickly
2014-07-21 01:48:51,859 INFO exited: frappe-worker (exit status 255; not expected)
2014-07-21 01:48:51,859 INFO received SIGCLD indicating a child quit
2014-07-21 01:48:52,860 INFO gave up: frappe-worker entered FATAL state, too many start retries too quickly


When I ran ./env/bin/honcho start (development mode), the errors showed as follows:

[root@ip-172-31-8-88 frappe-bench]# ./env/bin/honcho start

01:41:26 web.1        | started with pid 22645

01:41:26 worker.1     | started with pid 22646

01:41:26 workerbeat.1 | started with pid 22647

01:41:27 web.1        |  * Running on http://0.0.0.0:8000/

01:41:27 web.1        |  * Restarting with reloader

01:41:28 worker.1     | /var/www/frappe-bench/env/lib/python2.7/site-packages/celery/platforms.py:765: RuntimeWarning: You are running the worker with superuser privileges, which is

01:41:28 worker.1     | absolutely not recommended!


01:41:28 worker.1     | Please specify a different user using the -u option.


01:41:28 worker.1     | User information: uid=0 euid=0 gid=0 egid=0


01:41:28 worker.1     |   uid=uid, euid=euid, gid=gid, egid=egid,

01:41:28 workerbeat.1 | [2014-07-21 01:41:28,228: INFO/MainProcess] beat: Starting...

01:41:28 workerbeat.1 | [2014-07-21 01:41:28,398: INFO/MainProcess] Scheduler: Sending due task scheduler (frappe.tasks.enqueue_scheduler_events)

01:41:29 worker.1     | [2014-07-21 01:41:29,590: WARNING/MainProcess] celery@ip-172-31-8-88 ready.

01:41:30 worker.1     | [2014-07-21 01:41:30,119: ERROR/MainProcess] Task frappe.tasks.enqueue_events_for_site[90a1b4b2-6e06-48b1-a1fc-d1048a415164] raised unexpected: IOError(2, 'No such file or directory')

01:41:30 worker.1     | Traceback (most recent call last):

01:41:30 worker.1     |   File "/var/www/frappe-bench/env/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task

01:41:30 worker.1     |     R = retval = fun(*args, **kwargs)

01:41:30 worker.1     |   File "/var/www/frappe-bench/env/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__

01:41:30 worker.1     |     return self.run(*args, **kwargs)

01:41:30 worker.1     |   File "/var/www/frappe-bench/apps/frappe/frappe/tasks.py", line 105, in enqueue_events_for_site

01:41:30 worker.1     |     enqueue_events(site)

01:41:30 worker.1     |   File "/var/www/frappe-bench/apps/frappe/frappe/utils/scheduler.py", line 25, in enqueue_events

01:41:30 worker.1     |     lock = create_lock('scheduler')

01:41:30 worker.1     |   File "/var/www/frappe-bench/apps/frappe/frappe/utils/file_lock.py", line 17, in create_lock

01:41:30 worker.1     |     return touch_file(lock_path)

01:41:30 worker.1     |   File "/var/www/frappe-bench/apps/frappe/frappe/utils/__init__.py", line 916, in touch_file

01:41:30 worker.1     |     with open(path, 'a'):

01:41:30 worker.1     | IOError: [Errno 2] No such file or directory: u'./erpnext/locks/scheduler.lock'

 



Kenneth K於 2014年7月21日星期一UTC+8上午12時52分55秒寫道:

Pratik Vyas

unread,
Jul 21, 2014, 2:25:03 AM7/21/14
to erpnext-dev...@googlegroups.com
On Mon, Jul 21, 2014 at 12:55 AM, 'Kenneth K' via ERPNext Developer
> --
> Note:
>
> If you are posting an issue,
> 1. We should be able to replicate it at our end. So please give us as much
> information as you can. Please see it from the point of view of the person
> receiving the communication.
> 2. Paste your code at http://pastebin.com or http://gist.github.com and send
> only the URL via email
> 3. For sending images, use http://imgur.com or other similar services. Do
> not send images as attachments. Links are good. Same goes for any file you
> are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google Groups
> "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to erpnext-developer...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/erpnext-developer-forum/9a70aa0f-6136-41ef-92c2-58d0e2f06110%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Seems that the lock directory doesn't exist in sites/erpnext. That's
strange because it should have been created during the 3to4 migration.

Thanks,
--
Pratik
erpnext

Kenneth K

unread,
Jul 21, 2014, 3:06:45 AM7/21/14
to erpnext-dev...@googlegroups.com
Should I restart the upgrade process again with removing the site folder?

Thanks,
Kenneth

Pratik Vyas於 2014年7月21日星期一UTC+8下午2時25分03秒寫道:

Pratik Vyas

unread,
Jul 21, 2014, 7:01:54 AM7/21/14
to erpnext-dev...@googlegroups.com
On Mon, Jul 21, 2014 at 12:36 PM, 'Kenneth K' via ERPNext Developer
Forum <erpnext-dev...@googlegroups.com> wrote:
> Should I restart the upgrade process again with removing the site folder?
>

Yes, that should be safe. You should take a backup anyway.

> Thanks,
> Kenneth
>

Thanks,
--
Pratik
erpnext
Reply all
Reply to author
Forward
0 new messages