[ckan-pt] Instalação do Basiccharts

Andres MRM andres inventati.org
Terça-Feira, 13 de Maio de 2014 - 01:02:48 UTC


Mais um problema talvez relacionado...
Instalei o DataPusher segundo as instruções aqui:
http://docs.ckan.org/projects/datapusher/en/latest/

Mais estou tendo esse erro quando tento dar um push nos dados pelo
painel no site:
OperationalError: (OperationalError) no such table: apscheduler_jobs u'DELETE FROM apscheduler_jobs WHERE apscheduler_jobs.id = ?' (7,)

Conectando à database datastore_default vai psql, dei um \dt e ele me
disse que não há tabelas, não parece bom...


On 12-05-14 21:34, Andres MRM wrote:
>As duas últimas linhas resolveram, obrigado.
>Estranho, será que é algum problema na configuração do paster?
>
>On 12-05-14 16:54, Marconi Clementino wrote:
>>A view:
>>
>>GRANT ALL ON TABLE _table_metadata TO us_ckan; *-- Usuário CKAN*
>>GRANT SELECT ON TABLE _table_metadata TO us_ckan_data_select; *--- Usuário
>>ReadOnly*
>>
>>
>>Rode estes comandos diretamente que passa.
>>
>>
>>2014-05-12 16:53 GMT-03:00 Marconi Clementino <marconix16  gmail.com>:
>>
>>>Como fica nosso banco datastore :
>>>
>>>DATASTORE:
>>>
>>>GRANT CONNECT, TEMPORARY ON DATABASE dbpockan_data_storage_utf8 TO public;
>>>GRANT ALL ON DATABASE dbpockan_data_storage_utf8 TO us_ckan;  --- *Usuario
>>>CKAN*
>>>GRANT CONNECT ON DATABASE dbpockan_data_storage_utf8 TO
>>>us_ckan_data_select; ---- *Usuario ReadOnly*
>>>GRANT ALL ON SCHEMA public TO us_ckan;
>>>GRANT USAGE ON SCHEMA public TO us_ckan_data_select;
>>>ALTER DEFAULT PRIVILEGES IN SCHEMA public
>>>    GRANT SELECT ON TABLES
>>>    TO us_ckan_data_select; *--- Usuario ReadOnly*
>>>
>>>
>>>
>>>
>>>
>>>
>>>2014-05-12 16:46 GMT-03:00 Andres MRM <andres  inventati.org>:
>>>
>>>9.3
>>>>
>>>>
>>>>On 12-05-14 16:44, Marconi Clementino wrote:
>>>>
>>>>>Qual a versão do postgresql?
>>>>>
>>>>>
>>>>>2014-05-12 16:41 GMT-03:00 Andres MRM <andres  inventati.org>:
>>>>>
>>>>> Obrigado, Marconi. Tentei com o set_permissions, mas agora está me dando
>>>>>>outro erro:
>>>>>>
>>>>>>ProgrammingError: (ProgrammingError) ERRO:  permissão negada para
>>>>>>relação
>>>>>>_table_metadata
>>>>>>
>>>>>>Será que configurei o script errado? Deixei assim:
>>>>>>-- name of the main CKAN database
>>>>>>\set maindb "ckan_default"
>>>>>>-- the name of the datastore database
>>>>>>\set datastoredb "datastore_default"
>>>>>>-- username of the ckan postgres user
>>>>>>\set ckanuser "ckan_default"
>>>>>>-- username of the datastore user that can write
>>>>>>\set wuser "ckan_default"
>>>>>>-- username of the datastore user who has only read permissions
>>>>>>\set rouser "datastore_default"
>>>>>>
>>>>>>
>>>>>>On 12-05-14 15:53, Marconi Clementino wrote:
>>>>>>
>>>>>> Andres, se o erro persistir, você pode editar o arquivo
>>>>>>>set_permissions.sql
>>>>>>>e rodar diretamente no banco.
>>>>>>>
>>>>>>>
>>>>>>>2014-05-12 15:38 GMT-03:00 Andres MRM <andres  inventati.org>:
>>>>>>>
>>>>>>> Você tem razão, este comando:
>>>>>>>
>>>>>>>>paster datastore set-permissions postgres -c
>>>>>>>>/etc/ckan/default/development.
>>>>>>>>ini
>>>>>>>>Está me dando este erro:
>>>>>>>>An error occured: psql: FATAL:  database "datastore_default" does not
>>>>>>>>exist
>>>>>>>>
>>>>>>>>Mas rodando:
>>>>>>>>sudo -u postgres psql -l -p 5433
>>>>>>>>A base está la:
>>>>>>>>ckan_default      | ckan_default | UTF8        | pt_BR.utf8 |
>>>>>>>>pt_BR.utf8
>>>>>>>>|
>>>>>>>>datastore_default | ckan_default | UTF8        | pt_BR.utf8 |
>>>>>>>>pt_BR.utf8
>>>>>>>>|
>>>>>>>>Será que o paster está tentando alterar as permissões no Postgres em
>>>>>>>>5432 e
>>>>>>>>não em 5433 como está configurado no development.ini?
>>>>>>>>Ele soube criá-las corretamente na instalação do CKAN...
>>>>>>>>
>>>>>>>>A configuração está assim:
>>>>>>>>sqlalchemy.url = postgresql://ckan_default:SENHA@localhost:5433/ckan_
>>>>>>>>default
>>>>>>>>ckan.datastore.write_url = postgresql://ckan_default:SENHA@localhost
>>>>>>>>:5433/
>>>>>>>>datastore_default
>>>>>>>>ckan.datastore.read_url = postgresql://datastore_
>>>>>>>>default:SENHAA  localhost
>>>>>>>>:5433/datastore_default
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>On 12-05-14 13:00, Vitor Baptista wrote:
>>>>>>>>
>>>>>>>> Oi Andres,
>>>>>>>>
>>>>>>>>>
>>>>>>>>>Isso me parece um problema na sua instalação do DataStore. Mais
>>>>>>>>>especificamente, na parte de configurar as permissões em
>>>>>>>>>http://docs.ckan.org/en/latest/maintaining/datastore.html . Veja lá
>>>>>>>>>a
>>>>>>>>>documentação e cheque se está tudo certo.
>>>>>>>>>
>>>>>>>>>Abraços,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>2014-05-09 22:05 GMT-03:00 Andres MRM <andres  inventati.org>:
>>>>>>>>>
>>>>>>>>> Opa! Agora consegui adicionar os plugins e iniciar o site. Mas
>>>>>>>>>quando
>>>>>>>>>
>>>>>>>>> vou tentar adicionar alguma base para testar, estou tendo esse erro:
>>>>>>>>>>
>>>>>>>>>>2014-05-09 22:02:35,550 ERROR [ckan.model.modification]
>>>>>>>>>>(ProgrammingError)
>>>>>>>>>>ERRO:  permissão negada para relação _table_metadata
>>>>>>>>>>'SELECT 1 FROM "_table_metadata" WHERE name = %s AND alias_of IS
>>>>>>>>>>NULL'
>>>>>>>>>>(u'971d3b53-b5c5-4da5-94db-7e3ada438cd5',)
>>>>>>>>>>
>>>>>>>>>>Traceback (most recent call last):
>>>>>>>>>> File "/home/andres/ckan/lib/default/src/ckan/ckan/model/
>>>>>>>>>>modification.py",
>>>>>>>>>>line 79, in notify
>>>>>>>>>>   observer.notify(entity, operation)
>>>>>>>>>> File "/home/andres/ckan/lib/default/src/ckan/ckan/lib/
>>>>>>>>>>search/__init__.py",
>>>>>>>>>>line 128, in notify
>>>>>>>>>>   {'id': entity.id}),
>>>>>>>>>> File "/home/andres/ckan/lib/default/src/ckan/ckan/logic/__
>>>>>>>>>>init__.py",
>>>>>>>>>>line 414, in wrapped
>>>>>>>>>>   result = _action(context, data_dict, **kw)
>>>>>>>>>> File "/home/andres/ckan/lib/default/src/ckan/ckan/logic/
>>>>>>>>>>action/get.py",
>>>>>>>>>>line 901, in package_show
>>>>>>>>>>   resource_dict = item.before_show(resource_dict)
>>>>>>>>>> File "/home/andres/ckan/lib/default/src/ckan/ckanext/
>>>>>>>>>>datastore/plugin.py",
>>>>>>>>>>line 244, in before_show
>>>>>>>>>>   resource_dict['id']
>>>>>>>>>> File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/
>>>>>>>>>>sqlalchemy/engine/base.py",
>>>>>>>>>>line 1449, in execute
>>>>>>>>>>   params)
>>>>>>>>>> File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/
>>>>>>>>>>sqlalchemy/engine/base.py",
>>>>>>>>>>line 1628, in _execute_text
>>>>>>>>>>   statement, parameters
>>>>>>>>>> File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/
>>>>>>>>>>sqlalchemy/engine/base.py",
>>>>>>>>>>line 1698, in _execute_context
>>>>>>>>>>   context)
>>>>>>>>>> File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/
>>>>>>>>>>sqlalchemy/engine/base.py",
>>>>>>>>>>line 1691, in _execute_context
>>>>>>>>>>   context)
>>>>>>>>>> File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/
>>>>>>>>>>sqlalchemy/engine/default.py",
>>>>>>>>>>line 331, in do_execute
>>>>>>>>>>   cursor.execute(statement, parameters)
>>>>>>>>>>ProgrammingError: (ProgrammingError) ERRO:  permissão negada para
>>>>>>>>>>relação
>>>>>>>>>>_table_metadata
>>>>>>>>>>'SELECT 1 FROM "_table_metadata" WHERE name = %s AND alias_of IS
>>>>>>>>>>NULL'
>>>>>>>>>>(u'971d3b53-b5c5-4da5-94db-7e3ada438cd5',)
>>>>>>>>>>Error - <class 'sqlalchemy.exc.ProgrammingError'>:
>>>>>>>>>>(ProgrammingError)
>>>>>>>>>>ERRO:  permissão negada para relação _table_metadata
>>>>>>>>>>'SELECT 1 FROM "_table_metadata" WHERE name = %s AND alias_of IS
>>>>>>>>>>NULL'
>>>>>>>>>>(u'971d3b53-b5c5-4da5-94db-7e3ada438cd5',)
>>>>>>>>>>2014-05-09 22:02:35,889 INFO  [ckan.lib.base]
>>>>>>>>>> /dataset/new_resource/ctdtdc render time 0.152 seconds
>>>>>>>>>>2014-05-09 22:02:36,255 INFO  [ckan.lib.base]  /api/i18n/en render
>>>>>>>>>>time
>>>>>>>>>>0.003 seconds
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>Tentei recriar o BD, mas ele persiste...
>>>>>>>>>>
>>>>>>>>>>_______________________________________________
>>>>>>>>>>ckan-pt mailing list
>>>>>>>>>>ckan-pt  lists.okfn.org
>>>>>>>>>>https://lists.okfn.org/mailman/listinfo/ckan-pt
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>--
>>>>>>>>>
>>>>>>>>>Vítor Baptista
>>>>>>>>>
>>>>>>>>>Developer  |  http://vitorbaptista.com |
>>>>>>>>>LinkedIn<http://www.linkedin.com/in/vitorbaptista>|
>>>>>>>>>@vitorbaptista <http://twitter.com/vitorbaptista>
>>>>>>>>>
>>>>>>>>>The Open Knowledge Foundation <http://okfn.org>
>>>>>>>>>
>>>>>>>>>*Empowering through Open Knowledge*
>>>>>>>>>
>>>>>>>>>http://okfn.org/  |  @okfn <http://twitter.com/okfn>  |  OKF on
>>>>>>>>>Facebook<https://www.facebook.com/OKFNetwork> |
>>>>>>>>>Blog <http://blog.okfn.org/>  |  Newsletter<http://okfn.org/
>>>>>>>>>about/newsletter/>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>  _______________________________________________
>>>>>>>>
>>>>>>>> ckan-pt mailing list
>>>>>>>>>ckan-pt  lists.okfn.org
>>>>>>>>>https://lists.okfn.org/mailman/listinfo/ckan-pt
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>ckan-pt mailing list
>>>>>>>>ckan-pt  lists.okfn.org
>>>>>>>>https://lists.okfn.org/mailman/listinfo/ckan-pt
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>--
>>>>>>>Atenciosamente,
>>>>>>>
>>>>>>>Marconi Clementino de Oliveira
>>>>>>>Analista de Sistemas - DSI - EMPREL
>>>>>>>Celular: +55 81 8719-1703
>>>>>>>
>>>>>>>
>>>>>> _______________________________________________
>>>>>>
>>>>>>>ckan-pt mailing list
>>>>>>>ckan-pt  lists.okfn.org
>>>>>>>https://lists.okfn.org/mailman/listinfo/ckan-pt
>>>>>>>
>>>>>>>
>>>>>>_______________________________________________
>>>>>>ckan-pt mailing list
>>>>>>ckan-pt  lists.okfn.org
>>>>>>https://lists.okfn.org/mailman/listinfo/ckan-pt
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>--
>>>>>Atenciosamente,
>>>>>
>>>>>Marconi Clementino de Oliveira
>>>>>Analista de Sistemas - DSI - EMPREL
>>>>>Celular: +55 81 8719-1703
>>>>>
>>>>
>>>> _______________________________________________
>>>>>ckan-pt mailing list
>>>>>ckan-pt  lists.okfn.org
>>>>>https://lists.okfn.org/mailman/listinfo/ckan-pt
>>>>>
>>>>
>>>>_______________________________________________
>>>>ckan-pt mailing list
>>>>ckan-pt  lists.okfn.org
>>>>https://lists.okfn.org/mailman/listinfo/ckan-pt
>>>>
>>>
>>>
>>>
>>>--
>>>Atenciosamente,
>>>
>>>Marconi Clementino de Oliveira
>>>Analista de Sistemas - DSI - EMPREL
>>>Celular: +55 81 8719-1703
>>>
>>
>>
>>
>>-- 
>>Atenciosamente,
>>
>>Marconi Clementino de Oliveira
>>Analista de Sistemas - DSI - EMPREL
>>Celular: +55 81 8719-1703
>
>>_______________________________________________
>>ckan-pt mailing list
>>ckan-pt  lists.okfn.org
>>https://lists.okfn.org/mailman/listinfo/ckan-pt
>
>_______________________________________________
>ckan-pt mailing list
>ckan-pt  lists.okfn.org
>https://lists.okfn.org/mailman/listinfo/ckan-pt



Mais informações acerca da lista ckan-pt