[Zope-DB] Zope_Database_issue
Hi, I am a beginner in zope with no prior experience. I am supposed to setup a development environment with zope, postgres, python, openflow, egenix psycopg. I have installed all of them on Red Hat Linux. All of them are installed successfully. I have properly installed Psycopg in the zope path i.e. (lib/python/Products) that too with proper permissions. Now after installing psycopg, when I restart zope, I am not able to see the option ‘Add ZPsycopg Database Connection’ in the Zope Management Screen. And because of that I am not able to setup a database for the project. I request you to please help me for this. Any advice from you will really help me in a great way. Kindly suggest me something. Thanks a lot!! Thanks Regards, Smita Kamdar ___ Zope-DB mailing list Zope-DB@zope.org https://mail.zope.org/mailman/listinfo/zope-db
[Zope-DB] Zope_Database_issue
HI, I started zope from shell i.e. by using the following command – bin/zopectl fg it showed me the following error log: */opt/zope/bin/runzope -X debug-mode=on* *2010-11-18 17:39:01 INFO ZServer HTTP server started at Thu Nov 18 17:39:01 2010* *Hostname: 0.0.0.0* *Port: 8080* *2010-11-18 17:39:01 ERROR Application Could not import Products.ZPsycopgDA * *Traceback (most recent call last):* * File /opt/zope/lib/python/OFS/Application.py, line 709, in import_product* *product=__import__(pname, global_dict, global_dict, silly)* * File /opt/zope/lib/python/Products/ZPsycopgDA/__init__.py, line 92, in? * *import DA* * File /opt/zope/lib/python/Products/ZPsycopgDA/DA.py, line 94, in?* *from db import DB* * File /opt/zope/lib/python/Products/ZPsycopgDA/db.py, line 99, in?* *import psycopg* *ImportError: libpq.so.3: cannot open shared object file: No such file or directory* *Traceback (most recent call last):* * File /opt/zope/lib/python/Zope2/Startup/run.py, line 56, in ?* *run()* * File /opt/zope/lib/python/Zope2/Startup/run.py, line 21, in run* *starter.prepare()* * File /opt/zope/lib/python/Zope2/Startup/__init__.py, line 109, in prepare* *self.startZope()* * File /opt/zope/lib/python/Zope2/Startup/__init__.py, line 300, in startZope* *Zope2.startup()* * File /opt/zope/lib/python/Zope2/__init__.py, line 47, in startup* *_startup()* * File /opt/zope/lib/python/Zope2/App/startup.py, line 51, in startup* *OFS.Application.import_products()* * File /opt/zope/lib/python/OFS/Application.py, line 686, in import_products* *import_product(product_dir, product_name, raise_exc=debug_mode)* * File /opt/zope/lib/python/OFS/Application.py, line 709, in import_product* *product=__import__(pname, global_dict, global_dict, silly)* * File /opt/zope/lib/python/Products/ZPsycopgDA/__init__.py, line 92, in ?* *import DA* * File /opt/zope/lib/python/Products/ZPsycopgDA/DA.py, line 94, in ?* *from db import DB* * File /opt/zope/lib/python/Products/ZPsycopgDA/db.py, line 99, in ?* *import psycopg* *ImportError: libpq.so.3: cannot open shared object file: No such file or directory* * * I am not able to understand from the above log what is going wrong with ZPsycopgDA. Can some one please guide me as to what is going wrong with it?? What do I need to do to solve this? May be because of this error, I am not able to get the option ‘Add ZPsycopg Database Connection’ in Add drop-down box of ZMI. Any help from you will be appreciated! I urgently need help on this! Thanks a lot Regards, Smita Kamdar Message: 1 Date: Wed, 17 Nov 2010 12:13:15 +0100 From: Charlie Clark char...@egenix.com Subject: Re: [Zope-DB] Fwd: Zope_Database_issue To: zope-db@zope.org Message-ID: 4ce3b8cb.7040...@egenix.com Content-Type: text/plain; charset=UTF-8 Am 17.11.10 12:07, schrieb smita kamdar: Hi, Thanks a lot for your suggestion!! But I am specifically told to use ZPsycopgDA to connect zope postgres. I am trying a lot to add a new ZPsycopg database connection from Zope Management Interface screen, But that option does not exist in Add drop -box of Zope Management Interface screen. Should Zope software home zope Instance home be same?? If no then where should I install ZPsycopgDA?? Also do I need to install anything else other than ZPsycopgDA to connect zope postgres? I am using Zope 2.11.4, python 2.4.4, Postgres 7.4.13, egenix 2.0.6 Psycopg 1.1.6 I am really in a mess! Really need your help! Hi Smita, if you can start Zope from the shell: bin/zopetcl fg You should get a Python traceback that says what is stopping the ZPsycopgDA starting. Charlie Clark -- Charlie Clark eGenix.com Professional Python Services directly from the Source Python/Zope Consulting and Support ...http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/ -- Message: 2 Date: Wed, 17 Nov 2010 11:29:16 + From: Richard Harley rich...@scholarpack.com Subject: Re: [Zope-DB] Zope-DB Digest, Vol 74, Issue 1 To: zope-db@zope.org Message-ID: 4ce3bc8c.2070...@scholarpack.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed Look at the event log and find out why psycopg is failing on startup. If you are using psycopg1, I think you need to put the psycopg in site packages. Whatever version of psycopg you are using you need to have the python module installed in the relevant python installation ie the one that is running Zope. But looking at the event log should help. Richard Message: 2 Date: Tue, 16 Nov 2010 18:46:59 +0100 From: Andreas Jungli...@zopyx.com Subject: Re: [Zope-DB] Zope_Database_issue To: smita kamdarsmita.kamda...@gmail.com Cc: zope-db@zope.org
[Zope-DB] Zope_Database_issue
HI, But I can see the library ‘libpq.so.3’ in the Postgres lib directory also while installing Psycopg I gave the same path of Postgres library. Now what else I need to do? Thanks a lot!! -- Forwarded message -- From: *Andreas Jung* li...@zopyx.com Date: Thu, Nov 18, 2010 at 1:14 PM Subject: Re: [Zope-DB] Zope_Database_issue To: smita kamdar smita.kamda...@gmail.com Cc: zope-db@zope.org -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 smita kamdar wrote: *ImportError: libpq.so.3: cannot open shared object file: No such file or directory* This error message is self-speaking - either the Postgres library is not present or at a different place. Adjust your LD_LIBRARY_PATH as needed or fix the location of the Postgres libs. - -aj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQGUBAEBAgAGBQJM5NlvAAoJEADcfz7u4AZjMjALwIyT4MD7KiqUYnM5vhCO6IMU Q+h2qU5yjoY/6CjyEIKQ94ooSkjfBmNG0a3g1jlj62WyIUdBp9N0rw5fuL+W2bIK KPhuJ8//JrWBoOCHk4M2waKG6EjZIarbsWZksYpcDJXkU25AcHVKAYmUMN8m4dTW yFSOW8IhG5wM8O3In39/E1WiZm83eH/r0LsAWE43c54Ej+/Jc3TXMiUPHyvP0djB Xktl44U8FXTaSl3T9OtBCpMzffEag9Rq+x2lcYphKjRZIUuXr5c3Vo/L+t8Cvq2W p9k6Hpoj/wk+CfoWDBl5UKtBlI6hw3AuRCreufC5NcrOAYLSAi37DG/3thZnINag t7PyGkXbSsMsg1G7RifxR+hZwDO/0g7RX7bytjzqX1y76l9xzXwyqfZwLL0RPIPq /aZgRTLgdW2cBxSZlHNWHm1dw11bx01bPxM6rXUWp4s5IBH56E5WAjqD9Up/js7B x3yt+iudq/v6LZ2afsgh6ykive4FM3g= =QlHU -END PGP SIGNATURE- attachment: lists.vcf___ Zope-DB mailing list Zope-DB@zope.org https://mail.zope.org/mailman/listinfo/zope-db
[Zope-DB] Zope_Database_issue
HI, While installing Postgresql, I installed it as user postgres so the entire folder in which it is installed have owner as postgres. Other than Postgresql, all the other installations (i.e. Zope, Python, egenix psycopg) are done as user test. Zope is also working as user test. I tried to run the below as user test it gave the following output: [t...@test ~]$ ls -l /home/postgres/7.4.13/lib/libpq.so.3 ls: cannot access /home/postgres/7.4.13/lib/libpq.so.3: Permission denied Do you think I should change any permissions? I think you are right, in zopectl file, the variable PYTHONPATH is not correct. I have changed the value of that variable to’* */home/test/Python/2.4.4/lib’ Is this path correct? Thanks a lot!! Regards, Smita Kamdar --- *From:* Michele Marcionelli [mailto:michele.marcione...@math.ethz.ch] *Sent:* Thursday, November 18, 2010 11:55 PM *To:* smita kamdar *Cc:* zope-db@zope.org *Subject:* Re: [Zope-DB] Zope_Database_issue As I can see you execute the ldd command as user test; the postgres libraries belongs to the user postgres in the respective home... Zope will probably run as another user, for instance zope. Does all these users have enough rights? Try as user test following: ls -l /home/postgres/7.4.13/lib/libpq.so.3 Can you see the file? By the way: in the zopectl script you declared the variable PYTHONPATH=/opt/zope/lib/python and here you speak of /home/test/Python/2.4.4/lib/python2.4/site-packages... are you sure that this variable is correct? Cheers, Michele On Nov 18, 2010, at 18:27 , smita kamdar wrote: Hi, Please find below the output of the commands - [t...@test site-packages]$ ldd /home/test/Python/2.4.4/lib/python2.4/site-packages/psycopgmodule.so linux-gate.so.1 = (0x00e6f000) libpq.so.3 = not found libcrypt.so.1 = /lib/libcrypt.so.1 (0x0045d000) libpthread.so.0 = /lib/libpthread.so.0 (0x0011) libdl.so.2 = /lib/libdl.so.2 (0x00e05000) libutil.so.1 = /lib/libutil.so.1 (0x003fe000) libc.so.6 = /lib/libc.so.6 (0x0073d000) libfreebl3.so = /usr/lib/libfreebl3.so (0x0012a000) /lib/ld-linux.so.2 (0x004af000) [t...@test site-packages]$ ldd /home/test/Python/2.4.4/lib/python2.4/site-packages/psycopgmodule.so | grep libpq.so libpq.so.3 = not found also please find attached the zopectl file. I also created the symbolic link – ln -s /home/postgres/7.4.13/lib/libpq.so.3 /usr/lib/libpq.so.3 Please do tel me if I can try something else. Thanks a lot!! zopectl.txt___ Zope-DB mailing list Zope-DB@zope.org https://mail.zope.org/mailman/listinfo/zope-db -- ETH Zürich Michele Marcionelli IT Support Gruppe D-MATH HG G 32.1 Rämistrasse 101 CH–8092 Zürich michele.marcione...@math.ethz.ch http://www.math.ethz.ch/~michele +41 44 632 6193 Telefon +41 44 632 1354 Fax ___ Zope-DB mailing list Zope-DB@zope.org https://mail.zope.org/mailman/listinfo/zope-db
[Zope-DB] Fwd: Zope_Database_issue
HI, I uninstalled Psycopg from my LINUX m/c now zope is working fine. Again I started installing psycopg-1.1.6 in the first step itsef it gives the following error: [t...@test psycopg-1.1.6]$. /configure --prefix=/opt/zope/psycopg-1.1.6 --with-mxdatetime-includes=/home/test/egenix/2.0.6/mx/DateTime/mxDateTime --with-postgres-includes=/home/postgres/7.4.13/src/include --with-postgres-libraries=/home/postgres/7.4.13/lib --with-zope=/opt/zope loading cache ./config.cache checking for python... /usr/bin/python checking python version... 2.4 checking python installation prefix... /home/test/Python/2.4.4 checking python installation exec_prefix... /home/test/Python/2.4.4 checking definitions in Python library makefile... done checking location of python library... $(prefix)/lib/python2.4/site-packages checking location of python shared modules... $(exec_prefix)/lib/python2.4/site-packages checking for gcc... gcc -pthread checking whether the C compiler (gcc -pthread ) works... yes checking whether the C compiler (gcc -pthread ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc -pthread accepts -g... yes checking how to run the C preprocessor... gcc -pthread -E checking whether make sets ${MAKE}... yes checking for inline... inline *checking PostgreSQL version... configure: error: missing PostgreSQL headers * Is it because of this error that I am not able to solve the issue? Because last time when I Installed Psycopg I faced the same error. How shall I progress? Please Note: Paths of the Directories where my installables are – Zope --à /opt/zope Python à /home/test/Python/2.4.4 Egenix -à /home/test/egenix Postgresqlà /home/postgres/7.4.13 Psycopgà/opt/zope/psycopg-1.1.6 ___ Zope-DB mailing list Zope-DB@zope.org https://mail.zope.org/mailman/listinfo/zope-db
[Zope-DB] Zope_Database_issue
HI, I downloaded Psycopg2-2.2.2.tar.gz , extracted it started installing it as root user. I followed the below steps: [r...@test psycopg2-2.2.2]# *which pg_config* /home/postgres/7.4.13/bin/pg_config [r...@test psycopg2-2.2.2]# *python setup.py install* running install running build running build_py running build_ext building 'psycopg2._psycopg' extension .. ….. ……. byte-compiling /home/test/Python/2.4.4/lib/python2.4/site-packages/psycopg2/errorcodes.py to errorcodes.pyc byte-compiling /home/test/Python/2.4.4/lib/python2.4/site-packages/psycopg2/__init__.py to __init__.pyc byte-compiling /home/test/Python/2.4.4/lib/python2.4/site-packages/psycopg2/tz.py to tz.pyc byte-compiling /home/test/Python/2.4.4/lib/python2.4/site-packages/psycopg2/extras.py to extras.pyc byte-compiling /home/test/Python/2.4.4/lib/python2.4/site-packages/psycopg2/pool.py to pool.pyc byte-compiling /home/test/Python/2.4.4/lib/python2.4/site-packages/psycopg2/psycopg1.py to psycopg1.pyc byte-compiling /home/test/Python/2.4.4/lib/python2.4/site-packages/psycopg2/extensions.py to extensions.pyc. But in the next step I faced the below error – [r...@test psycopg2-2.2.2]# *python* Python 2.4.4 (#1, Nov 10 2010, 01:08:38) [GCC 4.4.2 20091027 (Red Hat 4.4.2-7)] on linux2 Type help, copyright, credits or license for more information. import psycopg2 Traceback (most recent call last): File stdin, line 1, in? File /home/test/Python/2.4.4/lib/python2.4/site-packages/psycopg2/__init__.py, line 69, in? from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID *ImportError: /home/test/Python/2.4.4/lib/python2.4/site-packages/psycopg2/_psycopg.so: undefined symbol: PQserverVersion* Can You please suggest as to how can I solve this issue? Thanks Regards, Smita Kamdar | NGN-SOLNS |TechMahindra Oberoi Estate Gardens, Chandivali, Andheri(E) Mumbai-72 Office: +91 22 66882000 | Extn: 6185 Email: smita.kam...@techmahindra.com -Original Message- From: Andreas Jung [mailto:li...@zopyx.com] Sent: Friday, November 19, 2010 7:18 PM To: smita kamdar Cc: zope-db@zope.org Subject: Re: [Zope-DB] Fwd: Zope_Database_issue -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, you are resistent reading advices. We adviced you to use psycopg2 instead of psycopg1 psycopg2 is a *mandatory* requirements for using ZPsycopgDA. So please follow our recommendations instead of trying the wrong things. - From my experience: psycopg2 usually installs without major issues. So use pyscopg2 *and* SQLAlchemyDA (as adviced already several times). - -aj smita kamdar wrote: HI, I uninstalled Psycopg from my LINUX m/c now zope is working fine. Again I started installing psycopg-1.1.6 in the first step itsef it gives the following error: [t...@test psycopg-1.1.6]$. /configure --prefix=/opt/zope/psycopg-1.1.6 --with-mxdatetime-includes=/home/test/egenix/2.0.6/mx/DateTime/mxDateTime --with-postgres-includes=/home/postgres/7.4.13/src/include --with-postgres-libraries=/home/postgres/7.4.13/lib --with-zope=/opt/zope loading cache ./config.cache checking for python... /usr/bin/python checking python version... 2.4 checking python installation prefix... /home/test/Python/2.4.4 checking python installation exec_prefix... /home/test/Python/2.4.4 checking definitions in Python library makefile... done checking location of python library... $(prefix)/lib/python2.4/site-packages checking location of python shared modules... $(exec_prefix)/lib/python2.4/site-packages checking for gcc... gcc -pthread checking whether the C compiler (gcc -pthread ) works... yes checking whether the C compiler (gcc -pthread ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc -pthread accepts -g... yes checking how to run the C preprocessor... gcc -pthread -E checking whether make sets ${MAKE}... yes checking for inline... inline *checking PostgreSQL version... configure: error: missing PostgreSQL headers* Is it because of this error that I am not able to solve the issue? Because last time when I Installed Psycopg I faced the same error. How shall I progress? Please Note: Paths of the Directories where my installables are – Zope --à /opt/zope Python à/home/test/Python/2.4.4 Egenix -à/home/test/egenix Postgresqlà/home/postgres/7.4.13 Psycopgà/opt/zope/psycopg-1.1.6 ___ Zope-DB mailing list Zope-DB@zope.org https://mail.zope.org/mailman/listinfo/zope-db - -- ZOPYX Limited | zopyx group Charlottenstr. 37/1 | The full-service network for Zope Plone D-72070 Tübingen
[Zope-DB] [Zope-db]Zope_Database_Issue
HI, On my LINUX Red Hat machine, I had installed postgresql, zope, psycopg, egenix many times then uninstalled it that too at different locations. Due to multiple installations uninstallations, the complete setup of the LINUX box has changed. Many things that were working earlier are not working now. What do you suggest? Should I format the LINUX box again start afresh with new installations? Or u suggest something else? Thanks Regards, Smita ___ Zope-DB mailing list Zope-DB@zope.org https://mail.zope.org/mailman/listinfo/zope-db
[Zope-DB] [Zope-db]Zope-Database-Issue
HI, I have cracked this issue now everything is working fine. While installing Postgresql I was missing the step ‘Install all headers’ also while installing psycopg I was missing the last step i.e. to import psycopg in python. Also I exported ‘LD_LIBRARY_PATH’ variable after giving it the appropriate value. Thanks a lot for your invaluable help. Really appreciate your efforts for the same. Thanks Regards, Smita Kamdar ___ Zope-DB mailing list Zope-DB@zope.org https://mail.zope.org/mailman/listinfo/zope-db
[Zope-DB] Zope-db[Zope_Openflow_installation]
HI, I am supposed to install Openflow-0.0.1 on LINUX box. I installed it following the below steps – ./configure Make Make install After this I restarted zope, but still it is not appearing in the Product’s folder of Zope Management Interface. Do I need to do anything else for this? Smita Kamdar ___ Zope-DB mailing list Zope-DB@zope.org https://mail.zope.org/mailman/listinfo/zope-db
[Zope-DB] apology
Hi Andreas, I apologize. Actually,by mistake I posted my earlier post to 'Zope-db@zope.org' group id. Later I realized that I have posted to the wrong group id so I mailed it again to the correct one i.e. 'z...@zope.org'. I did not intend to hurt anyone. Just wanted to aplogize. Thanks regards, Smita Kamdar ___ Zope-DB mailing list Zope-DB@zope.org https://mail.zope.org/mailman/listinfo/zope-db