Mailing List Archive

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
Re: Zope_Database_issue [ In reply to ]
Try using Products.SQLAlchemyDA instead.

-aj

2010/11/16 smita kamdar <smita.kamdar00@gmail.com>

>
> 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_Database_issue [ In reply to ]
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 <charlie@egenix.com>
Subject: Re: [Zope-DB] Fwd: Zope_Database_issue
To: zope-db@zope.org
Message-ID: <4CE3B8CB.7040204@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 +0000
From: Richard Harley <richard@scholarpack.com>
Subject: Re: [Zope-DB] Zope-DB Digest, Vol 74, Issue 1
To: zope-db@zope.org
Message-ID: <4CE3BC8C.2070708@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 Jung<lists@zopyx.com>
> Subject: Re: [Zope-DB] Zope_Database_issue
> To: smita kamdar<smita.kamdar00@gmail.com>
> Cc: zope-db@zope.org
> Message-ID:
> <AANLkTimdhKoE_ur9tvP0keFOHQbz+qZ_x+61kbzhdPbT@mail.gmail.com<AANLkTimdhKoE_ur9tvP0keFOHQbz%2BqZ_x%2B61kbzhdPbT@mail.gmail.com>
>
> Content-Type: text/plain; charset="windows-1252"

>
> Try using Products.SQLAlchemyDA instead.
>
> -aj
>
> 2010/11/16 smita kamdar<smita.kamdar00@gmail.com>
>
>
>> 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
>>
>>
>>
>
Re: Zope_Database_issue [ In reply to ]
-----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-----
Zope_Database_issue [ In reply to ]
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* <lists@zopyx.com>
Date: Thu, Nov 18, 2010 at 1:14 PM
Subject: Re: [Zope-DB] Zope_Database_issue
To: smita kamdar <smita.kamdar00@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-----
Re: Zope_Database_issue [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Why can't you read short answers carefully?
Using the LD_LIBRARY_PATH environment variable is likely
the solution for your problem.

- -aj

smita kamdar wrote:
>
>
> 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* <lists@zopyx.com <mailto:lists@zopyx.com>>
> Date: Thu, Nov 18, 2010 at 1:14 PM
> Subject: Re: [Zope-DB] Zope_Database_issue
> To: smita kamdar <smita.kamdar00@gmail.com
> <mailto:smita.kamdar00@gmail.com>>
> Cc: zope-db@zope.org <mailto:zope-db@zope.org>
>
>
> 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

_______________________________________________
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 | Produce & Publish
www.zopyx.com | www.produce-and-publish.com
- ------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJM5O7pAAoJEADcfz7u4AZjK8gLwIZv94X7RjlMa3J1mgC7RVk+
3KJh1jG9C0lMTnEITlY5lQXkYkD8UGoU9NffrOenjm3mtqyt8XOQxkhXoBBTLxBI
T7yQ31p0Pf+NySxKyDbz3v3KxAeUjSQLHhj7WUGBAR0pHNxgX/fOIsiV/hg+pkES
RGbQoyuHO4IaX99T8L9e/9X+hlCvCGjLQN/WTO+F+24tqorxybpOQ/EOPmB+EJU4
ZsP/CR0tUqAs8AQnE8WN6p7olHDauqp2SHW0148ozLts3LWi5/9iO4NusUagr/Jn
riXQej2Aytu/5C6PtezgPfFBxBp4qOeOic28x8AYF0FXNWGjSnMv5eXbaSWMc7tI
tS+wREk6EdQZZL9omxOdE/2U4t5tFqh4vkgk6ggLo2goOaMTz+/kQoHoyWEhFuN6
uJvAh+cK82NcBXmbGvS8nvbEoYVZe3PQUcvG/az+jUI16Y/vGBTXdiLwgFDcPY6N
irIcMoyEEDn+9bwRoKPwKxfcaBOJxRw=
=74eI
-----END PGP SIGNATURE-----
Re: Zope_Database_issue [ In reply to ]
Am 18.11.10 10:13, schrieb smita kamdar:
> 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?

Hi Smita,

the problem is not with Zope but with the underlying psycopg library that
you've installed. It cannot find the Postgres libraries and so cannot connect
to the server. Once you've fixed this you ZPsycopgDA should work fine. Andreas
has pointed out what you need to do.

BTW. I think that you may well be better off with psycopg2 as the library.

Charlie
--
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/
________________________________________________________________________
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
https://mail.zope.org/mailman/listinfo/zope-db
Re: Zope_Database_issue [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Charlie Clark wrote:

> BTW. I think that you may well be better off with psycopg2 as the library.

...which is a mandatory requirement for ZPsycopgDA - and as said:
SQLAlchemyDA is much easier to install and handle.

- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJM5PLqAAoJEADcfz7u4AZjphsLv2V3bVuhXeJMryTD8OJOZ3cK
Vu4ICp//azPVuDQU+ECWiLIHAKbc+Fx32d3SrtSUWb8/yQLwSyfj+2Smsk7wVUQO
v8/BRDpFizuDcPC2l6Ku34INcFcecEwclhshYMBrjusN4VPVzTa8MltTOVMLcv5x
Y/B7zyFQlmd66VfvPlNo5qwHW2iLglYOf8R31X+cpcsi9reyJvNHv8GrMHbzDxV+
pjsOrzGtNWDs2WNSn492JA8qGL8Yu6w4Tu7crlJoQBhlrIUFpZRAC/JVxXGp8VVL
RdMsGuCFHLrpmXv+okJSOKrR7ty4HCBybUVgUCA/1Mx9DfqHYTQYIvO2oO+k5tQS
HTqHyxWagcE3QGXPg8b6ic10Q87Hk7kXervZXmWelF22cy4gYIGxya9Yz8zAxklo
YuVfypOgwWRbXTfZ865eIJ0izEKkFjuYGSaP1PRBwrYMAO5dxWRAmd85Ly04Veoh
OfirT4UCsjewritf4RBTNgKO/EQV/LQ=
=L466
-----END PGP SIGNATURE-----
Zope_Database_issue [ In reply to ]
Hi,



I have installed Postgresql in the path '/home/postgres/7.4.13' & so i set
the variable

LD_Library_path = /home/postgres/7.4.13/lib. But this didnt work. I still
got the same error.





At the time of installing psycopg, in the first step of installation i.e.



./configure --prefix...



I gave one of the options as

--with-postgres-libraries=/home/postgres/7.4.13/src/interfaces/libpq



So i changed the value of variable as LD_Library_path =
/home/postgres/7.4.13//home/postgres/7.4.13/src/interfaces/libpq

But after that also i am still facing the same problem.



In both the paths given above, the library libpq.so.3 is present.



Any suggesstions as to what value should I set LD_Library_path variable to?



I am very sorry if I am demanding too much…but I am really stuck...



---------- Forwarded message ----------
From: *Andreas Jung* <lists@zopyx.com>
Date: Thu, Nov 18, 2010 at 2:46 PM
Subject: Re: [Zope-DB] Zope_Database_issue
To: smita kamdar <smita.kamdar00@gmail.com>
Cc: zope-db@zope.org

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Why can't you read short answers carefully?
Using the LD_LIBRARY_PATH environment variable is likely
the solution for your problem.

- -aj


smita kamdar wrote:
>
>
> 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* <lists@zopyx.com <mailto:lists@zopyx.com>>
> Date: Thu, Nov 18, 2010 at 1:14 PM
> Subject: Re: [Zope-DB] Zope_Database_issue
> To: smita kamdar <smita.kamdar00@gmail.com

> <mailto:smita.kamdar00@gmail.com>>
> Cc: zope-db@zope.org <mailto:zope-db@zope.org>
>
>
> 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

_______________________________________________
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 | Produce & Publish
www.zopyx.com | www.produce-and-publish.com
- ------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJM5O7pAAoJEADcfz7u4AZjK8gLwIZv94X7RjlMa3J1mgC7RVk+
3KJh1jG9C0lMTnEITlY5lQXkYkD8UGoU9NffrOenjm3mtqyt8XOQxkhXoBBTLxBI
T7yQ31p0Pf+NySxKyDbz3v3KxAeUjSQLHhj7WUGBAR0pHNxgX/fOIsiV/hg+pkES
RGbQoyuHO4IaX99T8L9e/9X+hlCvCGjLQN/WTO+F+24tqorxybpOQ/EOPmB+EJU4
ZsP/CR0tUqAs8AQnE8WN6p7olHDauqp2SHW0148ozLts3LWi5/9iO4NusUagr/Jn
riXQej2Aytu/5C6PtezgPfFBxBp4qOeOic28x8AYF0FXNWGjSnMv5eXbaSWMc7tI
tS+wREk6EdQZZL9omxOdE/2U4t5tFqh4vkgk6ggLo2goOaMTz+/kQoHoyWEhFuN6
uJvAh+cK82NcBXmbGvS8nvbEoYVZe3PQUcvG/az+jUI16Y/vGBTXdiLwgFDcPY6N
irIcMoyEEDn+9bwRoKPwKxfcaBOJxRw=
=74eI
-----END PGP SIGNATURE-----
Re: Zope_Database_issue [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

smita kamdar wrote:

> LD_Library_path = /home/postgres/7.4.13/lib. But this didnt work. I
> still got the same error.

check your *spelling* - environment variablea are *case-sensitive*.

- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJM5Ro1AAoJEADcfz7u4AZjaEMLwJb5i/9gGkpal7Hw6K5ee6z4
h+HEFAy+efmms2vsxCdibD9F+dehL2VpRMjqEbmyNmvIWZk0xY2qwsYgRP17cSAq
cyfGRW01JZJJj/DXNoM2IkoNpyruiAVRgaF6oP680I0SEPNQgzLYALOycGzVNzLN
10EoBoGy+lpo3wNrG0ffcdjHQ3iK8MGFzasPEphGvcUVKgIQIMZzs49qIVthXzfY
BQg1YOEnC1np+3dVRbXX0q5ngcqm/Cw+p9A55guKDfcw/WEeiA0I2846VwgkJbZ1
HidxeSMD30VuKhWosfqrYjALfBZq9vslX6yEb2iXa/YegDRJetEZpEFcsrPF0RfH
sHrcEjTnESr2jYF67D3isDanAyyEs4fH9HzFQnJ/XfPn/3oxeYWCpNvO/2/+fy2e
lEFyitgmTrsiL3ulGvfdwSt/EYtKO+b33yh0r2MXJQMi6l87sPLazEZgeN4Kd7/X
CWZ792cWSKgA9Hm0fupbkJBfpuSafP8=
=gfIf
-----END PGP SIGNATURE-----
Re: Zope_Database_issue [ In reply to ]
Hi Smita

... and pay attention to the spaces. Use this:

export LD_LIBRARY_PATH=/home/postgres/7.4.13/lib

Maybe you should put this line to your start/stop script (zopectl).

Kind regards,
Michele


On Nov 18, 2010, at 13:21 , Andreas Jung wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> smita kamdar wrote:
>
>> LD_Library_path = /home/postgres/7.4.13/lib. But this didnt work. I
>> still got the same error.
>
> check your *spelling* - environment variablea are *case-sensitive*.
>
> - -aj
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQGUBAEBAgAGBQJM5Ro1AAoJEADcfz7u4AZjaEMLwJb5i/9gGkpal7Hw6K5ee6z4
> h+HEFAy+efmms2vsxCdibD9F+dehL2VpRMjqEbmyNmvIWZk0xY2qwsYgRP17cSAq
> cyfGRW01JZJJj/DXNoM2IkoNpyruiAVRgaF6oP680I0SEPNQgzLYALOycGzVNzLN
> 10EoBoGy+lpo3wNrG0ffcdjHQ3iK8MGFzasPEphGvcUVKgIQIMZzs49qIVthXzfY
> BQg1YOEnC1np+3dVRbXX0q5ngcqm/Cw+p9A55guKDfcw/WEeiA0I2846VwgkJbZ1
> HidxeSMD30VuKhWosfqrYjALfBZq9vslX6yEb2iXa/YegDRJetEZpEFcsrPF0RfH
> sHrcEjTnESr2jYF67D3isDanAyyEs4fH9HzFQnJ/XfPn/3oxeYWCpNvO/2/+fy2e
> lEFyitgmTrsiL3ulGvfdwSt/EYtKO+b33yh0r2MXJQMi6l87sPLazEZgeN4Kd7/X
> CWZ792cWSKgA9Hm0fupbkJBfpuSafP8=
> =gfIf
> -----END PGP SIGNATURE-----
> <lists.vcf>_______________________________________________
> 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.marcionelli@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_Database_issue [ In reply to ]
Hi,



Thanks a lot for your suggesstions!!



I included the line:



LD_LIBRARY_PATH="/home/postgres/7.4.13/lib"

export LD_LIBRARY_PATH



with proper case & spacing. Still facing the same error.



Somewhere I had read that I need to include the same dir path i.e.
(/home/postgres/7.4.13/lib) in the /etc/ld.so.conf file & then run
/ldconfig. I did that also , but to no result.



But in /etc/ld.so.conf they had included 1 more dir path i.e.
(/usr/local/pgsql/lib). But that path doesn’t exist on my pc.



Do u think I can try something else to solve this?



Thanks a lot for your quick response.







---------- Forwarded message ----------
From: *Michele Marcionelli* <michele.marcionelli@math.ethz.ch>
Date: Thu, Nov 18, 2010 at 5:56 PM
Subject: Re: [Zope-DB] Zope_Database_issue
To: lists@zopyx.com
Cc: smita kamdar <smita.kamdar00@gmail.com>, Zope-DB <zope-db@zope.org>


Hi Smita

... and pay attention to the spaces. Use this:

export LD_LIBRARY_PATH=/home/postgres/7.4.13/lib

Maybe you should put this line to your start/stop script (zopectl).

Kind regards,
Michele



On Nov 18, 2010, at 13:21 , Andreas Jung wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> smita kamdar wrote:
>
>> LD_Library_path = /home/postgres/7.4.13/lib. But this didnt work. I
>> still got the same error.
>
> check your *spelling* - environment variablea are *case-sensitive*.
>
> - -aj
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQGUBAEBAgAGBQJM5Ro1AAoJEADcfz7u4AZjaEMLwJb5i/9gGkpal7Hw6K5ee6z4
> h+HEFAy+efmms2vsxCdibD9F+dehL2VpRMjqEbmyNmvIWZk0xY2qwsYgRP17cSAq
> cyfGRW01JZJJj/DXNoM2IkoNpyruiAVRgaF6oP680I0SEPNQgzLYALOycGzVNzLN
> 10EoBoGy+lpo3wNrG0ffcdjHQ3iK8MGFzasPEphGvcUVKgIQIMZzs49qIVthXzfY
> BQg1YOEnC1np+3dVRbXX0q5ngcqm/Cw+p9A55guKDfcw/WEeiA0I2846VwgkJbZ1
> HidxeSMD30VuKhWosfqrYjALfBZq9vslX6yEb2iXa/YegDRJetEZpEFcsrPF0RfH
> sHrcEjTnESr2jYF67D3isDanAyyEs4fH9HzFQnJ/XfPn/3oxeYWCpNvO/2/+fy2e
> lEFyitgmTrsiL3ulGvfdwSt/EYtKO+b33yh0r2MXJQMi6l87sPLazEZgeN4Kd7/X
> CWZ792cWSKgA9Hm0fupbkJBfpuSafP8=
> =gfIf
> -----END PGP SIGNATURE-----

> <lists.vcf>_______________________________________________

> 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.marcionelli@math.ethz.ch
http://www.math.ethz.ch/~michele

+41 44 632 6193 Telefon
+41 44 632 1354 Fax
Re: Zope_Database_issue [ In reply to ]
Can you send me the output of "ls -l /home/postgres/7.4.13/lib" and the whole error message that you get?

thanx,
Michele

On Nov 18, 2010, at 14:13 , smita kamdar wrote:

> Hi,
>
> Thanks a lot for your suggesstions!!
>
>
> I included the line:
>
>
> LD_LIBRARY_PATH="/home/postgres/7.4.13/lib"
>
> export LD_LIBRARY_PATH
>
>
> with proper case & spacing. Still facing the same error.
>
>
> Somewhere I had read that I need to include the same dir path i.e. (/home/postgres/7.4.13/lib) in the /etc/ld.so.conf file & then run /ldconfig. I did that also , but to no result.
>
>
> But in /etc/ld.so.conf they had included 1 more dir path i.e. (/usr/local/pgsql/lib). But that path doesn’t exist on my pc.
>
>
> Do u think I can try something else to solve this?
>
>
> Thanks a lot for your quick response.
>
>
>
>
> ---------- Forwarded message ----------
> From: Michele Marcionelli <michele.marcionelli@math.ethz.ch>
> Date: Thu, Nov 18, 2010 at 5:56 PM
> Subject: Re: [Zope-DB] Zope_Database_issue
> To: lists@zopyx.com
> Cc: smita kamdar <smita.kamdar00@gmail.com>, Zope-DB <zope-db@zope.org>
>
>
> Hi Smita
>
> ... and pay attention to the spaces. Use this:
>
> export LD_LIBRARY_PATH=/home/postgres/7.4.13/lib
>
> Maybe you should put this line to your start/stop script (zopectl).
>
> Kind regards,
> Michele
>
>
>
> On Nov 18, 2010, at 13:21 , Andreas Jung wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > smita kamdar wrote:
> >
> >> LD_Library_path = /home/postgres/7.4.13/lib. But this didnt work. I
> >> still got the same error.
> >
> > check your *spelling* - environment variablea are *case-sensitive*.
> >
> > - -aj
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.11 (Darwin)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> >
> > iQGUBAEBAgAGBQJM5Ro1AAoJEADcfz7u4AZjaEMLwJb5i/9gGkpal7Hw6K5ee6z4
> > h+HEFAy+efmms2vsxCdibD9F+dehL2VpRMjqEbmyNmvIWZk0xY2qwsYgRP17cSAq
> > cyfGRW01JZJJj/DXNoM2IkoNpyruiAVRgaF6oP680I0SEPNQgzLYALOycGzVNzLN
> > 10EoBoGy+lpo3wNrG0ffcdjHQ3iK8MGFzasPEphGvcUVKgIQIMZzs49qIVthXzfY
> > BQg1YOEnC1np+3dVRbXX0q5ngcqm/Cw+p9A55guKDfcw/WEeiA0I2846VwgkJbZ1
> > HidxeSMD30VuKhWosfqrYjALfBZq9vslX6yEb2iXa/YegDRJetEZpEFcsrPF0RfH
> > sHrcEjTnESr2jYF67D3isDanAyyEs4fH9HzFQnJ/XfPn/3oxeYWCpNvO/2/+fy2e
> > lEFyitgmTrsiL3ulGvfdwSt/EYtKO+b33yh0r2MXJQMi6l87sPLazEZgeN4Kd7/X
> > CWZ792cWSKgA9Hm0fupbkJBfpuSafP8=
> > =gfIf
> > -----END PGP SIGNATURE-----
>
> > <lists.vcf>_______________________________________________
>
> > 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.marcionelli@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

--
ETH Zürich
Michele Marcionelli
IT Support Gruppe D-MATH
HG G 32.1
Rämistrasse 101
CH–8092 Zürich

michele.marcionelli@math.ethz.ch
http://www.math.ethz.ch/~michele

+41 44 632 6193 Telefon
+41 44 632 1354 Fax
Zope_Database_issue [ In reply to ]
HI,



Please find attached 2 files:



1) Postgres_lib_list.txt : This file contains the output of ‘ls -l
/home/postgres/7.4.13/lib’

2) ZPsycopgDA_error_log: This file contains the error log when zope is
started in debug mode (/bin/zopectl fg)



Thanks a lot!



I really appreciate the interest people are showing to solve this issue.



Regards,

Smita kamdar.
Re: Zope_Database_issue [ In reply to ]
Hi Smita

sorry... can you send me also the "zopectl" file? And if it's possible the output of this command

ldd <path_to>/_psycopg.so"

On my system I get following:

root@russell ~# ldd /usr/lib64/python2.6/site-packages/psycopg2/_psycopg.so | grep libpq.so
libpq.so.5 => /usr/lib64/libpq.so.5 (0x00007fed0ed1c000)

What you could also try is to create a symlink to /usr/lib like this:

ln -s /home/postgres/7.4.13/lib/libpq.so.3 /usr/lib/libpq.so.3

For the moment I have no more ideas.

Cheers,
Michele


On Nov 18, 2010, at 15:07 , smita kamdar wrote:

> HI,
>
>
> Please find attached 2 files:
>
>
> 1) Postgres_lib_list.txt : This file contains the output of ‘ls -l /home/postgres/7.4.13/lib’
>
> 2) ZPsycopgDA_error_log: This file contains the error log when zope is started in debug mode (/bin/zopectl fg)
>
>
> Thanks a lot!
>
>
> I really appreciate the interest people are showing to solve this issue.
>
>
> Regards,
>
> Smita kamdar.

--
ETH Zürich
Michele Marcionelli
IT Support Gruppe D-MATH
HG G 32.1
Rämistrasse 101
CH–8092 Zürich

michele.marcionelli@math.ethz.ch
http://www.math.ethz.ch/~michele

+41 44 632 6193 Telefon
+41 44 632 1354 Fax
Zope_Database_issue [ In reply to ]
Hi,

Please find below the output of the commands -



[test@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 (0x00110000)

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)



[test@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!!
Re: Zope_Database_issue [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

smita kamdar wrote:

>
> Please do tel me if I can try something else.

Are the read permission set correctly?

- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJM5WOsAAoJEADcfz7u4AZj1ysLvi2L38XTwbLJaSXAv+jdWrrI
suqYvtHLyrka0va6+JQrpBm66IQC8WFj0+nIRzGNfyXAhFxFD9DZ7rRRXvSRYO7a
xq2S8nrl4Lzy/42tKpqkn0zlSRl8Ku4Uu5r3FS42Peu0yKishPi+6T7IbuWsBp8l
SR7Lh2wL3r06vQeIMDenuFWhZ8YFfdORvoInMgpWqATA3NsEiisCmaT3PzrzlBnH
P2YvYb0N+8cRrmzGluFGzUysC8Aw0vgmc0Tt2LSep5hy+Bzz9Qj4eups35U5FmZg
Qi+ml/OZVXI7pHGhhISN2M2cy0lt0B6srvsSLo+rWEQy1xqEsswMXsfwiJBvHxbC
3xpFvMri/Gnk//SHDY0+IHOCltKOZpNsR6E8J8N8kDvuhpSUmG3DfV+xl3yu8Qfe
1vB+tA1HFRtI+CAF9T3T+yqWoDvkLfOPup096PDDiI5vC78imOK7nbdDw3vM/ZlR
yG8/41ykIarxQ7SJKET2WL1xtO0jCeU=
=Oc6K
-----END PGP SIGNATURE-----
Re: Zope_Database_issue [ In reply to ]
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 -
>
>
> [test@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 (0x00110000)
>
> 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)
>
>
> [test@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.marcionelli@math.ethz.ch
http://www.math.ethz.ch/~michele

+41 44 632 6193 Telefon
+41 44 632 1354 Fax
Zope_Database_issue [ In reply to ]
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:



[test@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.marcionelli@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 -



[test@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 (0x00110000)

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)



[test@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.marcionelli@math.ethz.ch
http://www.math.ethz.ch/~michele

+41 44 632 6193 Telefon
+41 44 632 1354 Fax
Re: Zope_Database_issue [ In reply to ]
Hi Smita

you should probably install the postgres libraries as user "test"... just to simplify your life ;-) Otherwise you can try changing the permissions so that user "test" can access the "libpg.so.3". Try following (as user "root"):

chmod 755 /home/postgres
chmod 755 /home/postgres/7.4.13
chmod 755 /home/postgres/7.4.13/lib
chmod 644 /home/postgres/7.4.13/lib/libpq.so.3

Then following should work:

su - test
ls -l /home/postgres/7.4.13/lib/libpq.so.3
export LD_LIBRARY_PATH=/home/postgres/7.4.13/lib
ldd /home/test/Python/2.4.4/lib/python2.4/site-packages/psycopgmodule.so | grep libpq.so

If this works, try starting zope again.

About the "PYTHONPATH" variable I'm not sure. Andreas?

Cheers,
Michele


On Nov 19, 2010, at 10:34 , smita kamdar wrote:

> 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:
>
>
> [test@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.marcionelli@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 -
>
>
> [test@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 (0x00110000)
>
> 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)
>
>
> [test@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.marcionelli@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

--
ETH Zürich
Michele Marcionelli
IT Support Gruppe D-MATH
HG G 32.1
Rämistrasse 101
CH–8092 Zürich

michele.marcionelli@math.ethz.ch
http://www.math.ethz.ch/~michele

+41 44 632 6193 Telefon
+41 44 632 1354 Fax
Zope_Database_issue [ In reply to ]
Hi,



To make the permissions, owner & group of all the installables same, I
changed the permissions to 777 & owner & group to root for all the
installables.



Now I am able to get the output of the following commands -

[root@test bin]# ls -l /home/postgres/7.4.13/lib/libpq.so.3

lrwxrwxrwx. 1 root root 12 2010-11-09 23:59
/home/postgres/7.4.13/lib/libpq.so.3 -> libpq.so.3.1



[root@test bin]# export LD_LIBRARY_PATH=/home/postgres/7.4.13/lib

[root@test bin]# echo $LD_LIBRARY_PATH

/home/postgres/7.4.13/lib



[root@test bin]# ldd
/home/test/Python/2.4.4/lib/python2.4/site-packages/psycopgmodule.so | grep
libpq.so

libpq.so.3 => /home/postgres/7.4.13/lib/libpq.so.3 (0x005b1000)



But when I start the zope as root user, I face the following error -



[root@test bin]# ./zopectl fg

/opt/zope/bin/runzope -X debug-mode=on

2010-11-19 21:10:21 INFO ZServer HTTP server started at Fri Nov 19 21:10:21
2010

Hostname: 0.0.0.0

Port: 8080

2010-11-19 21:10:21 CRITICAL Zope A user was not specified to setuid to; fix
this to start as root (change the effective-user directive in zope.conf)

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 105, in
prepare

self.dropPrivileges()

File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 256, in
dropPrivileges

return dropPrivileges(self.cfg)

File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 425, in
dropPrivileges

raise ZConfig.ConfigurationError(msg)

ZConfig.ConfigurationError: A user was not specified to setuid to; fix this
to start as root (change the effective-user directive in zope.conf)





The effective user part in /etc/zope.conf file looks as shown below -

-------------------------------------------------------------------------------------------------------------------------------------------------------------------

# Directive: effective-user

#

# Description:

# If you intend to run Zope as the "root" user, you must supply this

# directive with an effective username or userid number to which Zope

# will 'suid' after the server ports are bound. This directive only

# has effect under UNIX and if Zope is started as the root user.

#

# Default: unset

#

# Example:

#

# effective-user chrism

-----------------------------------------------------------------------------------------------------------------------------------------------------------------



As, they have said to change the effective-user directive in zope.conf, I
changed the effective user part in the file as shown below –



-------------------------------------------------------------------------------------------------------------------------------------------------------------------



# Directive: effective-user

#

# Description:

# If you intend to run Zope as the "root" user, you must supply this

# directive with an effective username or userid number to which Zope

# will 'suid' after the server ports are bound. This directive only

# has effect under UNIX and if Zope is started as the root user.

#

# Default: unset

#

# Example:

#

effective-user root





After changing the above file, When I started zope as root, it is showing
the below error –



[root@test bin]# ./zopectl fg

/opt/zope/bin/runzope -X debug-mode=on

2010-11-19 21:19:47 INFO ZServer HTTP server started at Fri Nov 19 21:19:47
2010

Hostname: 0.0.0.0

Port: 8080

2010-11-19 21:19:47 ERROR Zope Cannot start Zope with the effective user as
the root user

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 105, in
prepare

self.dropPrivileges()

File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 256, in
dropPrivileges

return dropPrivileges(self.cfg)

File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 449, in
dropPrivileges

raise ZConfig.ConfigurationError(msg)

ZConfig.ConfigurationError: Cannot start Zope with the effective user as the
root user





Have I made any mistake in changing the effective user part in zope.conf ?



Do you think I have done right? Or is this some other error?



Also find attached the two files in which it is showing errors.
Re: Zope_Database_issue [ In reply to ]
Am 19.11.10 12:32, schrieb smita kamdar:
> Do you think I have done right? Or is this some other error?
>

Dear Smita,

there was no need to set root as owner of the Postgres libraries. You just
need to have permissions that are readable by the Zope user which is what
Michele described. Once this is the case then Zope should start or at least
give a different error.

Please note that the errors you are experiencing are not related to Zope,
Python or Postgres but unix and you should see if you can get some help from a
sys admin in your company.

Charlie
--
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/
________________________________________________________________________
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
https://mail.zope.org/mailman/listinfo/zope-db
Re: Zope_Database_issue [ In reply to ]
Hi Smita

running Zope (or a generally a server) as "root" is newer a good idea (for several reasons; one of them: security). Zope probably avoid this problem by producing the error message that you posted (I just tested it, and I also got the same message).

Create a news user, let say: "zope" with group "zope", change the ownerships as follow:

chown -R zope:zope /opt/zope

and change the effective-user to zope and try again!!

Cheers,
Michele


On Nov 19, 2010, at 12:32 , smita kamdar wrote:

>
> Hi,
>
>
> To make the permissions, owner & group of all the installables same, I changed the permissions to 777 & owner & group to root for all the installables.
>
>
> Now I am able to get the output of the following commands -
>
> [root@test bin]# ls -l /home/postgres/7.4.13/lib/libpq.so.3
>
> lrwxrwxrwx. 1 root root 12 2010-11-09 23:59 /home/postgres/7.4.13/lib/libpq.so.3 -> libpq.so.3.1
>
>
> [root@test bin]# export LD_LIBRARY_PATH=/home/postgres/7.4.13/lib
>
> [root@test bin]# echo $LD_LIBRARY_PATH
>
> /home/postgres/7.4.13/lib
>
>
> [root@test bin]# ldd /home/test/Python/2.4.4/lib/python2.4/site-packages/psycopgmodule.so | grep libpq.so
>
> libpq.so.3 => /home/postgres/7.4.13/lib/libpq.so.3 (0x005b1000)
>
>
> But when I start the zope as root user, I face the following error -
>
>
> [root@test bin]# ./zopectl fg
>
> /opt/zope/bin/runzope -X debug-mode=on
>
> 2010-11-19 21:10:21 INFO ZServer HTTP server started at Fri Nov 19 21:10:21 2010
>
> Hostname: 0.0.0.0
>
> Port: 8080
>
> 2010-11-19 21:10:21 CRITICAL Zope A user was not specified to setuid to; fix this to start as root (change the effective-user directive in zope.conf)
>
> 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 105, in prepare
>
> self.dropPrivileges()
>
> File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 256, in dropPrivileges
>
> return dropPrivileges(self.cfg)
>
> File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 425, in dropPrivileges
>
> raise ZConfig.ConfigurationError(msg)
>
> ZConfig.ConfigurationError: A user was not specified to setuid to; fix this to start as root (change the effective-user directive in zope.conf)
>
>
>
> The effective user part in /etc/zope.conf file looks as shown below -
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> # Directive: effective-user
>
> #
>
> # Description:
>
> # If you intend to run Zope as the "root" user, you must supply this
>
> # directive with an effective username or userid number to which Zope
>
> # will 'suid' after the server ports are bound. This directive only
>
> # has effect under UNIX and if Zope is started as the root user.
>
> #
>
> # Default: unset
>
> #
>
> # Example:
>
> #
>
> # effective-user chrism
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>
> As, they have said to change the effective-user directive in zope.conf, I changed the effective user part in the file as shown below –
>
>
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>
> # Directive: effective-user
>
> #
>
> # Description:
>
> # If you intend to run Zope as the "root" user, you must supply this
>
> # directive with an effective username or userid number to which Zope
>
> # will 'suid' after the server ports are bound. This directive only
>
> # has effect under UNIX and if Zope is started as the root user.
>
> #
>
> # Default: unset
>
> #
>
> # Example:
>
> #
>
> effective-user root
>
>
>
> After changing the above file, When I started zope as root, it is showing the below error –
>
>
> [root@test bin]# ./zopectl fg
>
> /opt/zope/bin/runzope -X debug-mode=on
>
> 2010-11-19 21:19:47 INFO ZServer HTTP server started at Fri Nov 19 21:19:47 2010
>
> Hostname: 0.0.0.0
>
> Port: 8080
>
> 2010-11-19 21:19:47 ERROR Zope Cannot start Zope with the effective user as the root user
>
> 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 105, in prepare
>
> self.dropPrivileges()
>
> File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 256, in dropPrivileges
>
> return dropPrivileges(self.cfg)
>
> File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 449, in dropPrivileges
>
> raise ZConfig.ConfigurationError(msg)
>
> ZConfig.ConfigurationError: Cannot start Zope with the effective user as the root user
>
>
>
> Have I made any mistake in changing the effective user part in zope.conf ?
>
>
> Do you think I have done right? Or is this some other error?
>
>
> Also find attached the two files in which it is showing errors.
>
>
> <run.zip><__init__.zip>_______________________________________________
> 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.marcionelli@math.ethz.ch
http://www.math.ethz.ch/~michele

+41 44 632 6193 Telefon
+41 44 632 1354 Fax
Zope_Database_issue [ In reply to ]
HI,



I downloaded Psycopg2-2.2.2.tar.gz , extracted it & started installing it
as root user.



I followed the below steps:



[root@test psycopg2-2.2.2]# *which pg_config*

/home/postgres/7.4.13/bin/pg_config



[root@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 –



[root@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.kamdar@techmahindra.com





-----Original Message-----
From: Andreas Jung [mailto:lists@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:

>

>

>

> [test@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 | Produce & Publish

www.zopyx.com | www.produce-and-publish.com

- ------------------------------------------------------------------------

E-Publishing, Python, Zope & Plone development, Consulting





-----BEGIN PGP SIGNATURE-----

Version: GnuPG v1.4.11 (Darwin)

Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/



iQGUBAEBAgAGBQJM5n/5AAoJEADcfz7u4AZj86gLv2Grtv98HUMbESEX7D3dSO2Z

iJzOLDU0gs48MFkJdniFuzQ51JimGm0oWcYPN3syfRSwKAJX36gHAObj+RAI4pJP

XUQUFYEH17VkyE447xs7uaqodmvKSM8MMlpJ14rEc2TK7xtOPE+cF4g0ej07d7CR

6dABNDtz047mQ+OnDgPtFbMgVC39Mkj60mH1e0fwjZB+3as6vUZEmDPvAZ7r++0f

9D8BkSZwpwxkDSPRf+Qi/ddB5aR/tfu4FCU4v1TDb5Xre3b+vHm/7LdgtsHf1e86

SLUlJ8xvVVt84H6yApCYEsRr37hz2B6W6gp0USvDeOLCu6ujq8c+4f2rG8JNkByS

cqK1l8Puw5QGnw2GUJ7j29PDfPueeyYq3PsozPBtLI92VoD3Si0n3ofIqRBWJnD3

p58slqr7DoCkWwvJ7OFnSJCaHf3Kxf9USptyYb2aQu8ziuqClFYJZsba/BAuXLbW

1d2OlIwVjEDdYyLzt6ECUE6TxUy5xck=

=XZB7

-----END PGP SIGNATURE-----
Re: Zope_Database_issue [ In reply to ]
Am 22.11.10 11:06, schrieb smita kamdar:
> Can You please suggest as to how can I solve this issue?

Smita,

according to the psycopg2 archives, it looks like this problem may be down to
an API change in Postgres since 7.4. Given the combination of software
versions you have I guess that you're running on RHEL in which case I would
hope you there will be some kind of Red Hat curated packages. Other than that
I think you're stuck but you might try asking on initd.org

Charlie
--
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/
________________________________________________________________________
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
https://mail.zope.org/mailman/listinfo/zope-db

1 2  View All