deploy in a server with apache and mod_wsgi for python 3

259 views
Skip to first unread message

Héctor Urbina

unread,
Aug 6, 2014, 4:30:21 PM8/6/14
to mayan...@googlegroups.com
Hello,

I posted my problem as an issue on github page, sorry if that was innapropriate. I have a server running a django project for my office. I'm using apache and I have compiled mod_wsgi for python3, since my django project is being developed in python3.

I would really love to be able to add mayan-edms as our document management system, but I can't serve it with apache, so, would you have any advise for that?

I have tried mayan-edms.py runfcgi, and it works, but after some time of use (some minues) it crashes with erros such as:

/usr/lib/python2.7/site-packages/django/forms/fields.py:807: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if value == k or text_value == force_text(k):

ERROR:ocr.parsers:/usr/bin/pdftotext: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/lib/libpoppler.so.46)

##### 140396441132000 c_void_p(140396441132000)
##### 140396441132000 c_void_p(140396441132000)
/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py:1120: DeprecationWarning: Creating streaming responses with `HttpResponse` is deprecated. Use `StreamingHttpResponse` instead if you need the streaming behavior.
  for data in result:

WARNING:py.warnings:/usr/lib/python2.7/site-packages/flup/server/fcgi_base.py:1120: DeprecationWarning: Creating streaming responses with `HttpResponse` is deprecated. Use `StreamingHttpResponse` instead if you need the streaming behavior.
  for data in result:

Violación de segmento (`core' generado)


Any ideas for solving this error o trying another approach?

thanks in advance,
Héctor.

Héctor Urbina

unread,
Aug 6, 2014, 5:01:29 PM8/6/14
to mayan...@googlegroups.com
I just updated gcc-libs and fixed the "GLIBCXX_3.4.20 not found" error. However, now I'm having this other error:

sfopen: gs_parse_file_name failed.
sfopen: gs_parse_file_name failed.
  ./base/gsicc_manage.c:1050: gsicc_open_search(): Could not find default_gray.icc
| ./base/gsicc_manage.c:1848: gsicc_init_iccmanager(): cannot find default icc profile
sfopen: gs_parse_file_name failed.
sfopen: gs_parse_file_name failed.
  ./base/gsicc_manage.c:1050: gsicc_open_search(): Could not find default_gray.icc
| ./base/gsicc_manage.c:1651: gsicc_set_device_profile(): cannot find device profile

Violación de segmento (`core' generado)

however, that file is present on my system:

# locate default_gray.icc
/usr/share/ghostscript/9.14/iccprofiles/default_gray.icc

I'm wondering if this is fcgi related or an error that would also raise by using another method.



--

---
You received this message because you are subscribed to a topic in the Google Groups "Mayan EDMS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mayan-edms/NUk_BJI4n8U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mayan-edms+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Héctor Urbina S.
Ingeniero en Bioinformática
Fono: 82049138

Roberto Rosario

unread,
Aug 7, 2014, 5:23:14 PM8/7/14
to mayan...@googlegroups.com
Mayan EDMS has started moving to Python3 compatibility but is not there yet (plus 3rd party modules might not support Python3 themselves too and might need to be replaced). You can try using NGINX with gunicorn or uwsgi? That is another popular combination to deploy Django projects.  Because gunicorn and uwsgi run from the context of the Mayan EDMS install, they are isolated (codewise) from the web server.

To unsubscribe from this group and all its topics, send an email to mayan-edms+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Roberto Rosario

unread,
Aug 26, 2014, 12:55:40 AM8/26/14
to mayan...@googlegroups.com
Any luck, progress?

Héctor Urbina

unread,
Aug 26, 2014, 10:03:53 AM8/26/14
to mayan...@googlegroups.com
Hello Roberto,

I also wanted the users to have the same credentials to use both on my django project and the EDMS. However, I was unable to find a way to do that. I tried using the same database for both projects, so that auth tables would be the same, but I didn't like the final result (lots of tables that I'm not sure what project are from, living in the same space).

I was looking around on using Multiple databases for django. (https://docs.djangoproject.com/en/dev/topics/db/multi-db/). I tried to define a couple of db routers for mayan-edms, so that authentication happened on database1 (my project's database) and the rest of tables were written on database2. I didn't have luck with that, plus the very same documentation says that "cross-database retionships introduce referential integrity problems that Django can’t currently handle".

So, I ended up choosing to abandon this project and now I'm setting a webdav shared directory for document sharing :(.

Best Regards,
Hector.


To unsubscribe from this group and all its topics, send an email to mayan-edms+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Roberto Rosario

unread,
Aug 27, 2014, 1:47:43 AM8/27/14
to mayan...@googlegroups.com
Wow, that was quite complicated too bad, good luck with the new project direction!


On Tuesday, August 26, 2014 10:03:53 AM UTC-4, Héctor Urbina wrote:
Hello Roberto,

I also wanted the users to have the same credentials to use both on my django project and the EDMS. However, I was unable to find a way to do that. I tried using the same database for both projects, so that auth tables would be the same, but I didn't like the final result (lots of tables that I'm not sure what project are from, living in the same space).

I was looking around on using Multiple databases for django. (https://docs.djangoproject.com/en/dev/topics/db/multi-db/). I tried to define a couple of db routers for mayan-edms, so that authentication happened on database1 (my project's database) and the rest of tables were written on database2. I didn't have luck with that, plus the very same documentation says that "cross-database retionships introduce referential integrity problems that Django can’t currently handle".

So, I ended up choosing to abandon this project and now I'm setting a webdav shared directory for document sharing :(.

Best Regards,
Hector.
Reply all
Reply to author
Forward
0 new messages