Skip to content

Cannot create groups #11

@kidwellj

Description

@kidwellj

When I try to create a new group, Carto returns the following error:

PG::Error: ERROR: spiexceptions.InternalError: plpy.Error: Fatal Group API error: [Errno -2] Name or service not known

Following the docs (and a tip in the carto google group discussion), there is an instruction towards "Group support for organizations" under the News for 3.11.1 which suggests that the following steps should be taken:

Group support for organizations. Usage instructions:

  1. Update CartoDB PostgreSQL extension to the latest version (instructions).
  2. Configure metadata api credentials and timeout. You can copy org_metadata_api config from config/app_config.yml.sample into your config/app_config.yml.
  3. Trigger existing orgs configuration: RAILS_ENV=development bundle exec rake cartodb:db:configure_extension_org_metadata_api_endpoint.
  4. Trigger existing org owner role assignment: RAILS_ENV=development bundle exec rake cartodb:db:assign_org_owner_role.
  5. Increase your database pool size to 50 (10 x # threads, see next line) at config/database.yml. Sample development configuration: config/database.yml.sample
  6. From now on you must run the server in multithread mode: bundle exec thin start --threaded -p 3000 --threadpool-size 5.

These are clearly directed at a development configuration (which this is not, quite), so it's a matter of parsing out what steps haven't been integrated above!

I've tried a modified form of steps 2-4 above:

nano app_config.yml
RAILS_ENV=production bundle exec rake cartodb:db:configure_extension_org_metadata_api_endpoint
RAILS_ENV=production bundle exec rake cartodb:db:assign_org_owner_role

The last of these returns an error:

Updating 2 organizations
71060f22-f4dd-4005-8b0b-c62b2b8ba8eb Owner: 02d450cc-da2f-477b-8bf9-ffcc8dc0764e kidwellj		Name: birmingham-uni
92ad31e3-4f9a-498b-96f0-cd68f6f85dbf Owner: 6beff2e5-ca45-48c3-8e7e-9499a99eea96 mapcomm-admin		Name: mapping-community
[carto@CAL-P-MAP-01 cartodb]$ RAILS_ENV=production bundle exec rake cartodb:db:assign_org_owner_role
Updating 2 organizations
71060f22-f4dd-4005-8b0b-c62b2b8ba8eb Owner: 02d450cc-da2f-477b-8bf9-ffcc8dc0764e kidwellj		Name: birmingham-uni
ERROR for birmingham-uni: undefined method `setup_owner_permissions' for #<CartoDB::UserModule::DBService:0x007f085e726538>
92ad31e3-4f9a-498b-96f0-cd68f6f85dbf Owner: 6beff2e5-ca45-48c3-8e7e-9499a99eea96 mapcomm-admin		Name: mapping-community
ERROR for mapping-community: undefined method `setup_owner_permissions' for #<CartoDB::UserModule::DBService:0x007f085e702688>

...and then when I retry group creation I get a new error in the browser:

spiexceptions.ExternalRoutineException: plpy.Error: Fatal Group API error:

The production log file gives me:

Started POST "/user/mapcomm-admin/api/v1/organization/92ad31e3-4f9a-498b-96f0-cd68f6f85dbf/groups" for 147.188.129.99 at 2017-05-10 21:14:40 +0100
Processing by Carto::Api::GroupsController#create as JSON
  Parameters: {"display_name"=>"Church of England", "user_domain"=>"mapcomm-admin", "organization_id"=>"92ad31e3-4f9a-498b-96f0-cd68f6f85dbf"}
Completed 422 Unprocessable Entity in 13.9ms (Views: 0.1ms | Models: 0.0ms)

Now I'm stuck.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions