Обсуждение: Londiste3 - Ubuntu 16.04 - Postgresql 9.3

Поиск
Список
Период
Сортировка

Londiste3 - Ubuntu 16.04 - Postgresql 9.3

От
Leonardo M. Ramé
Дата:
Hi again, I'm trying to create the root node using londiste3 from Ubuntu
16.04 connected to a PostgreSql 9.3 db, but I get this:

londiste3 /home/leonardo/replication/pacsio_master.ini create-root
master_node "dbname=test host=127.0.0.1"


2016-06-03 16:03:39,257 27600 INFO plpgsql is installed
2016-06-03 16:03:39,257 27600 INFO Installing pgq
2016-06-03 16:03:39,258 27600 INFO   Reading from
/usr/local/share/skytools3/pgq.sql
2016-06-03 16:03:40,013 27600 ERROR Job job_repli_test_master got error
on connection 'db': could not access file "$libdir/pgq_lowlevel": No
existe el archivo o el directorio.   Query: CREATE OR REPLACE FUNCTION
pgq.insert_event_raw(
     queue_n ...
Traceback (most recent call last):
   File "/usr/local/lib/python2.7/dist-packages/skytools/scripting.py",
line 579, in run_func_safely
     r = func()
   File
"/usr/local/lib/python2.7/dist-packages/skytools/adminscript.py", line
62, in work
     fn(*cmdargs)
   File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py",
line 147, in cmd_create_root
     return self.create_node('root', args)
   File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py",
line 198, in create_node
     self.install_code(db)
   File "/usr/local/lib/python2.7/dist-packages/londiste/setup.py", line
29, in install_code
     CascadeAdmin.install_code(self, db)
   File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py",
line 425, in install_code
     skytools.db_install(db.cursor(), objs, self.log)
   File "/usr/local/lib/python2.7/dist-packages/skytools/sqltools.py",
line 531, in db_install
     obj.create(curs, log)
   File "/usr/local/lib/python2.7/dist-packages/skytools/sqltools.py",
line 490, in create
     curs.execute(stmt)
   File "/usr/local/lib/python2.7/dist-packages/psycopg2/extras.py",
line 120, in execute
     return super(DictCursor, self).execute(query, vars)
OperationalError: could not access file "$libdir/pgq_lowlevel": No
existe el archivo o el directorio

P.S.: Here there's a suggestion of installing postgresql-9.4-pgq3, but
as I have 9.3 I cannot install the recommended package (it will install
9.4 and start a new cluster).




Regards,
--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877


Re: Londiste3 - Ubuntu 16.04 - Postgresql 9.3

От
Leonardo M. Ramé
Дата:

El 03/06/16 a las 16:08, Leonardo M. Ramé escribió:
> Hi again, I'm trying to create the root node using londiste3 from Ubuntu
> 16.04 connected to a PostgreSql 9.3 db, but I get this:
>
> londiste3 /home/leonardo/replication/pacsio_master.ini create-root
> master_node "dbname=test host=127.0.0.1"
>
>
> 2016-06-03 16:03:39,257 27600 INFO plpgsql is installed
> 2016-06-03 16:03:39,257 27600 INFO Installing pgq
> 2016-06-03 16:03:39,258 27600 INFO   Reading from
> /usr/local/share/skytools3/pgq.sql
> 2016-06-03 16:03:40,013 27600 ERROR Job job_repli_test_master got error
> on connection 'db': could not access file "$libdir/pgq_lowlevel": No
> existe el archivo o el directorio.   Query: CREATE OR REPLACE FUNCTION
> pgq.insert_event_raw(
>      queue_n ...
> Traceback (most recent call last):
>    File "/usr/local/lib/python2.7/dist-packages/skytools/scripting.py",
> line 579, in run_func_safely
>      r = func()
>    File
> "/usr/local/lib/python2.7/dist-packages/skytools/adminscript.py", line
> 62, in work
>      fn(*cmdargs)
>    File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py",
> line 147, in cmd_create_root
>      return self.create_node('root', args)
>    File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py",
> line 198, in create_node
>      self.install_code(db)
>    File "/usr/local/lib/python2.7/dist-packages/londiste/setup.py", line
> 29, in install_code
>      CascadeAdmin.install_code(self, db)
>    File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py",
> line 425, in install_code
>      skytools.db_install(db.cursor(), objs, self.log)
>    File "/usr/local/lib/python2.7/dist-packages/skytools/sqltools.py",
> line 531, in db_install
>      obj.create(curs, log)
>    File "/usr/local/lib/python2.7/dist-packages/skytools/sqltools.py",
> line 490, in create
>      curs.execute(stmt)
>    File "/usr/local/lib/python2.7/dist-packages/psycopg2/extras.py",
> line 120, in execute
>      return super(DictCursor, self).execute(query, vars)
> OperationalError: could not access file "$libdir/pgq_lowlevel": No
> existe el archivo o el directorio
>
> P.S.: Here there's a suggestion of installing postgresql-9.4-pgq3, but
> as I have 9.3 I cannot install the recommended package (it will install
> 9.4 and start a new cluster).
>

Sorry, I meant: Here
https://blog.lateral.io/2015/09/postgresql-replication-with-londiste-from-skytools-3/


--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877


Re: Londiste3 - Ubuntu 16.04 - Postgresql 9.3

От
Adrian Klaver
Дата:
On 06/03/2016 12:08 PM, Leonardo M. Ramé wrote:
> Hi again, I'm trying to create the root node using londiste3 from Ubuntu
> 16.04 connected to a PostgreSql 9.3 db, but I get this:
>
> londiste3 /home/leonardo/replication/pacsio_master.ini create-root
> master_node "dbname=test host=127.0.0.1"
>
>
> 2016-06-03 16:03:39,257 27600 INFO plpgsql is installed
> 2016-06-03 16:03:39,257 27600 INFO Installing pgq
> 2016-06-03 16:03:39,258 27600 INFO   Reading from
> /usr/local/share/skytools3/pgq.sql
> 2016-06-03 16:03:40,013 27600 ERROR Job job_repli_test_master got error
> on connection 'db': could not access file "$libdir/pgq_lowlevel": No
> existe el archivo o el directorio.   Query: CREATE OR REPLACE FUNCTION
> pgq.insert_event_raw(
>     queue_n ...
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.7/dist-packages/skytools/scripting.py",
> line 579, in run_func_safely
>     r = func()
>   File "/usr/local/lib/python2.7/dist-packages/skytools/adminscript.py",
> line 62, in work
>     fn(*cmdargs)
>   File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py",
> line 147, in cmd_create_root
>     return self.create_node('root', args)
>   File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py",
> line 198, in create_node
>     self.install_code(db)
>   File "/usr/local/lib/python2.7/dist-packages/londiste/setup.py", line
> 29, in install_code
>     CascadeAdmin.install_code(self, db)
>   File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py",
> line 425, in install_code
>     skytools.db_install(db.cursor(), objs, self.log)
>   File "/usr/local/lib/python2.7/dist-packages/skytools/sqltools.py",
> line 531, in db_install
>     obj.create(curs, log)
>   File "/usr/local/lib/python2.7/dist-packages/skytools/sqltools.py",
> line 490, in create
>     curs.execute(stmt)
>   File "/usr/local/lib/python2.7/dist-packages/psycopg2/extras.py", line
> 120, in execute
>     return super(DictCursor, self).execute(query, vars)
> OperationalError: could not access file "$libdir/pgq_lowlevel": No
> existe el archivo o el directorio
>
> P.S.: Here there's a suggestion of installing postgresql-9.4-pgq3, but
> as I have 9.3 I cannot install the recommended package (it will install
> 9.4 and start a new cluster).

That would seem to be if you wanted to install the Skytools binaries.
You are building from source.

What where the steps you took to configure and build the package?

Where there any error/warning messages when building?

My suspicion is the below from the INSTALL file:

"--prefix::
   Path prefix where to install skytools files (default: /usr/local)
"

Best guess is your build put the files somewhere other then $libdir.


>
>
>
>
> Regards,


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: Londiste3 - Ubuntu 16.04 - Postgresql 9.3

От
Leonardo M. Ramé
Дата:

El 03/06/16 a las 16:29, Adrian Klaver escribió:
> On 06/03/2016 12:08 PM, Leonardo M. Ramé wrote:
>> Hi again, I'm trying to create the root node using londiste3 from Ubuntu
>> 16.04 connected to a PostgreSql 9.3 db, but I get this:
>>
>> londiste3 /home/leonardo/replication/pacsio_master.ini create-root
>> master_node "dbname=test host=127.0.0.1"
>>
>>
>> 2016-06-03 16:03:39,257 27600 INFO plpgsql is installed
>> 2016-06-03 16:03:39,257 27600 INFO Installing pgq
>> 2016-06-03 16:03:39,258 27600 INFO   Reading from
>> /usr/local/share/skytools3/pgq.sql
>> 2016-06-03 16:03:40,013 27600 ERROR Job job_repli_test_master got error
>> on connection 'db': could not access file "$libdir/pgq_lowlevel": No
>> existe el archivo o el directorio.   Query: CREATE OR REPLACE FUNCTION
>> pgq.insert_event_raw(
>>     queue_n ...
>> Traceback (most recent call last):
>>   File "/usr/local/lib/python2.7/dist-packages/skytools/scripting.py",
>> line 579, in run_func_safely
>>     r = func()
>>   File "/usr/local/lib/python2.7/dist-packages/skytools/adminscript.py",
>> line 62, in work
>>     fn(*cmdargs)
>>   File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py",
>> line 147, in cmd_create_root
>>     return self.create_node('root', args)
>>   File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py",
>> line 198, in create_node
>>     self.install_code(db)
>>   File "/usr/local/lib/python2.7/dist-packages/londiste/setup.py", line
>> 29, in install_code
>>     CascadeAdmin.install_code(self, db)
>>   File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py",
>> line 425, in install_code
>>     skytools.db_install(db.cursor(), objs, self.log)
>>   File "/usr/local/lib/python2.7/dist-packages/skytools/sqltools.py",
>> line 531, in db_install
>>     obj.create(curs, log)
>>   File "/usr/local/lib/python2.7/dist-packages/skytools/sqltools.py",
>> line 490, in create
>>     curs.execute(stmt)
>>   File "/usr/local/lib/python2.7/dist-packages/psycopg2/extras.py", line
>> 120, in execute
>>     return super(DictCursor, self).execute(query, vars)
>> OperationalError: could not access file "$libdir/pgq_lowlevel": No
>> existe el archivo o el directorio
>>
>> P.S.: Here there's a suggestion of installing postgresql-9.4-pgq3, but
>> as I have 9.3 I cannot install the recommended package (it will install
>> 9.4 and start a new cluster).
>
> That would seem to be if you wanted to install the Skytools binaries.
> You are building from source.
>
> What where the steps you took to configure and build the package?
>
> Where there any error/warning messages when building?
>
> My suspicion is the below from the INSTALL file:
>
> "--prefix::
>   Path prefix where to install skytools files (default: /usr/local)
> "
>
> Best guess is your build put the files somewhere other then $libdir.
>

Finally it worked, added the 9.3 repository:

sudo tee /etc/apt/sources.list.d/pgdg.list <<EOF
deb http://apt.postgresql.org/pub/repos/apt/ utopic-pgdg main
EOF
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc |
sudo apt-key add -
sudo apt-get update

then installed the packages:

sudo apt-get install postgresql-server-dev-9.3
sudo apt-get install postgresql-9.3-pgq3

then again:

./configure --prefix=/usr/local
--with-pgconfig=/usr/lib/postgresql/9.3/bin/pg_config
make
sudo make install

then:

sudo su postgres

and:

londiste3 /home/leonardo/replication/pacsio_master.ini create-root
master_node "dbname=test host=127.0.0.1"

Done!

Regards,
--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877