Trouble installing

102 views
Skip to first unread message

UKCP

unread,
Dec 20, 2020, 4:19:11 PM12/20/20
to Alaveteli Dev
I have a vps with ovh and installed debian stretch.


followed by 

sudo sh install-site.sh --default alaveteli alaveteli

This gave an error

Adding site to nginx... Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.

Graeme Porteous

unread,
Dec 21, 2020, 5:27:21 AM12/21/20
to alavet...@googlegroups.com
Are you able to run the commands given in the error message to provide us with more details of the issue?

Thanks

--
Graeme Porteous
gra...@mysociety.org


--
You received this message because you are subscribed to the Google Groups "Alaveteli Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alaveteli-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alaveteli-dev/9f42038f-f37e-4bbc-8e5e-439d971aa89bn%40googlegroups.com.

UKCP

unread,
Dec 22, 2020, 4:30:28 AM12/22/20
to Alaveteli Dev
Hi, thanks for the reply.  Since posting, I have reinstalled with the following

sudo sh install-site.sh --default alaveteli alaveteli vpsxxxxxx.ovh.net

All seems to work however, when I go to vpsxxxxxx.ovh.net I get 

502 Bad Gateway
nginx  

UKCP

unread,
Dec 30, 2020, 10:54:35 AM12/30/20
to Alaveteli Dev
Is there any help available in this group?

Gareth Rees

unread,
Jan 7, 2021, 9:51:32 AM1/7/21
to Alaveteli Dev
Hi Paul,

Apologies for the wait. We're a small charity and most staff were on annual leave over the Christmas break. That said, in general our support on this group is best-effort, and given the ongoing covid situation our resources are stretched pretty thin, so we can't make any guarantees on the assistance we can offer.

A 502 response implies that nginx is accepting the HTTP request, but there's something not quite right with the application process (i.e. the Rails application).

The best place to look for what the cause of this might be is in the Rails application logs. I think given the arguments you provided to install-site.sh these will be in /var/www/alaveteli/log/*.log.

Best,

Gareth

UKCP

unread,
Jan 7, 2021, 11:01:51 AM1/7/21
to Alaveteli Dev
Hi Gareth

Thanks for the reply and I appreciate the help.  I have checked the logs and they give the following?

  [1m [36mFlipper::Adapters::ActiveRecord::Gate Load (0.8ms) [0m  [1m [34mSELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [0m  [["feature_key", "annotations"]]
  ↳ config/initializers/alaveteli_features.rb:23
  [1m [36mFlipper::Adapters::ActiveRecord::Gate Load (0.5ms) [0m  [1m [34mSELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [0m  [["feature_key", "alaveteli_pro"]]
  ↳ config/initializers/alaveteli_features.rb:24
  [1m [36mFlipper::Adapters::ActiveRecord::Gate Load (0.3ms) [0m  [1m [34mSELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [0m  [["feature_key", "projects"]]
  ↳ config/initializers/alaveteli_features.rb:24
  [1m [36mFlipper::Adapters::ActiveRecord::Gate Load (0.4ms) [0m  [1m [34mSELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [0m  [["feature_key", "pro_pricing"]]
  ↳ config/initializers/alaveteli_features.rb:24
  [1m [36mFlipper::Adapters::ActiveRecord::Gate Load (4.4ms) [0m  [1m [34mSELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [0m  [["feature_key", "pro_self_serve"]]
  ↳ config/initializers/alaveteli_features.rb:24
  [1m [36mFlipper::Adapters::ActiveRecord::Gate Load (0.5ms) [0m  [1m [34mSELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [0m  [["feature_key", "annotations"]]
  ↳ config/initializers/alaveteli_features.rb:23
  [1m [36mFlipper::Adapters::ActiveRecord::Gate Load (3.1ms) [0m  [1m [34mSELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [0m  [["feature_key", "alaveteli_pro"]]
  ↳ config/initializers/alaveteli_features.rb:24
  [1m [36mFlipper::Adapters::ActiveRecord::Gate Load (5.0ms) [0m  [1m [34mSELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [0m  [["feature_key", "projects"]]
  ↳ config/initializers/alaveteli_features.rb:24
  [1m [36mFlipper::Adapters::ActiveRecord::Gate Load (0.5ms) [0m  [1m [34mSELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [0m  [["feature_key", "pro_pricing"]]
  ↳ config/initializers/alaveteli_features.rb:24
  [1m [36mFlipper::Adapters::ActiveRecord::Gate Load (0.3ms) [0m  [1m [34mSELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [0m  [["feature_key", "pro_self_serve"]]
  ↳ config/initializers/alaveteli_features.rb:24
  [1m [36mInfoRequestBatch Load (0.6ms) [0m  [1m [34mSELECT  "info_request_batches".* FROM "info_request_batches" WHERE "info_request_batches"."sent_at" IS NULL ORDER BY "info_request_batches"."id" ASC LIMIT $1 [0m  [["LIMIT", 1000]]
  ↳ app/models/info_request_batch.rb:43
  [1m [35m (1.1ms) [0m  [1m [34mSELECT DISTINCT "acts_as_xapian_jobs"."model" FROM "acts_as_xapian_jobs" [0m
  ↳ lib/acts_as_xapian/acts_as_xapian.rb:700


Gareth Rees

unread,
Jan 11, 2021, 5:08:50 AM1/11/21
to alavet...@googlegroups.com
Hi Paul,

It looks like you may have used less to view these logs judging by the inclusion of escape characters.

Less is a pager, which means it will only show a screen’s worth of file content at a time. I suspect the contents of that log file are larger than a single terminal screen.

Perhaps try outputting the last 50 lines of the file with `tail -n 50 /path/to/file.log`

Could you also confirm what the filename is that provided these log lines?

Best,

-- 
Gareth Rees

--
You received this message because you are subscribed to a topic in the Google Groups "Alaveteli Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/alaveteli-dev/qjssIF3NXz4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to alaveteli-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alaveteli-dev/df34c0b6-bd3b-4284-a454-7dd989a9a94cn%40googlegroups.com.

Alex Popescu

unread,
Jul 20, 2021, 1:33:19 PM7/20/21
to Alaveteli Dev
I'm also getting the following, in /var/log/nginx/alavateli_error.log:

2021/07/20 16:32:36 [error] 7042#7042: *2 connect() failed (111: Connection refused) while connecting to upstream, client: xx.yyy.zzz.qqq, server: vps-xxxxx.vps.ovh.net, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "vps-xxxxx.vps.ovh.net"
2021/07/20 16:32:36 [error] 7042#7042: *2 connect() failed (111: Connection refused) while connecting to upstream, client: xx.yyy.zzz.qqq, server: vps-xxxxx.vps.ovh.net, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:3000/favicon.ico", host: "vps-xxxxx.vps.ovh.net", referrer: "http://vps-xxxxx.vps.ovh.net/"
2021/07/20 16:38:14 [error] 7042#7042: *5 connect() failed (111: Connection refused) while connecting to upstream, client: xx.yyy.zzz.qqq, server: vps-xxxxx.vps.ovh.net, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "vps-xxxxx.vps.ovh.net"
.....

Alex Popescu

unread,
Jul 20, 2021, 1:33:19 PM7/20/21
to Alaveteli Dev
Hello, I'm experiencing a possibly similar problem with Paul,
trying to deploy Alavateli on ovh via the installation script, getting the nginx/502 Bad Gateway  message.
Running Ubuntu 16.04 – the closest version to Tusty 14.04 OVH offers.

here are my development & production logs

## development.log

 InfoRequestEvent Load (0.3ms) SELECT "info_request_events".* FROM "info_request_events" WHERE "info_request_events"."info_request_id" = $1 ORDER BY created_at DESC [["info_request_id", 111]]
↳ app/models/info_request_event.rb:169
HasTagString::HasTagStringTag Load (0.2ms) SELECT "has_tag_string_tags".* FROM "has_tag_string_tags" WHERE "has_tag_string_tags"."model_id" = $1 AND "has_tag_string_tags"."model" = $2 [["model_id", 111], ["model", "InfoRequest"]]
↳ lib/has_tag_string/has_tag_string.rb:96
HasTagString::HasTagStringTag Load (0.1ms) SELECT "has_tag_string_tags".* FROM "has_tag_string_tags" WHERE "has_tag_string_tags"."model_id" = $1 AND "has_tag_string_tags"."model" = $2 [["model_id", 7], ["model", "PublicBody"]]
↳ lib/has_tag_string/has_tag_string.rb:96
InfoRequest Load (0.2ms) SELECT "info_requests".* FROM "info_requests" WHERE "info_requests"."id" = $1 LIMIT $2 [["id", 111], ["LIMIT", 1]]
↳ app/models/outgoing_message.rb:191
PublicBody Load (0.2ms) SELECT "public_bodies"."id", "public_bodies"."version", "public_bodies"."last_edit_editor", "public_bodies"."last_edit_comment", "public_bodies"."created_at", "public_bodies"."updated_at", "public_bodies"."home_page", "public_bodies"."api_key", "public_bodies"."info_requests_count", "public_bodies"."disclosure_log", "public_bodies"."info_requests_successful_count", "public_bodies"."info_requests_not_held_count", "public_bodies"."info_requests_overdue_count", "public_bodies"."info_requests_visible_classified_count", "public_bodies"."info_requests_visible_count" FROM "public_bodies" WHERE "public_bodies"."id" = $1 LIMIT $2 [["id", 7], ["LIMIT", 1]]
↳ app/models/info_request.rb:1488
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 6], ["LIMIT", 1]]
↳ app/models/info_request.rb:1491
CensorRule Load (0.3ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."info_request_id" = $1 ORDER BY created_at desc [["info_request_id", 111]]
↳ app/models/info_request.rb:1492
CensorRule Load (0.3ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."info_request_id" IS NULL AND "censor_rules"."user_id" IS NULL AND "censor_rules"."public_body_id" IS NULL
↳ app/models/info_request.rb:1492
CensorRule Load (0.3ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."public_body_id" = $1 ORDER BY created_at desc [["public_body_id", 7]]
↳ app/models/info_request.rb:1492
CensorRule Load (0.3ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."user_id" = $1 ORDER BY created_at desc [["user_id", 6]]
↳ app/models/info_request.rb:1492
Flipper::Adapters::ActiveRecord::Gate Load (0.4ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "annotations"]]
↳ config/initializers/alaveteli_features.rb:22
Flipper::Adapters::ActiveRecord::Gate Load (0.3ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "alaveteli_pro"]]
↳ config/initializers/alaveteli_features.rb:23
Flipper::Adapters::ActiveRecord::Gate Load (0.2ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "projects"]]
↳ config/initializers/alaveteli_features.rb:23
Flipper::Adapters::ActiveRecord::Gate Load (0.2ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "pro_pricing"]]
↳ config/initializers/alaveteli_features.rb:23
Flipper::Adapters::ActiveRecord::Gate Load (0.2ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "pro_self_serve"]]
↳ config/initializers/alaveteli_features.rb:23
Flipper::Adapters::ActiveRecord::Gate Load (0.3ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "annotations"]]
↳ config/initializers/alaveteli_features.rb:22
Flipper::Adapters::ActiveRecord::Gate Load (0.2ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "alaveteli_pro"]]
↳ config/initializers/alaveteli_features.rb:23
Flipper::Adapters::ActiveRecord::Gate Load (0.2ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "projects"]]
↳ config/initializers/alaveteli_features.rb:23
Flipper::Adapters::ActiveRecord::Gate Load (0.2ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "pro_pricing"]]
↳ config/initializers/alaveteli_features.rb:23
Flipper::Adapters::ActiveRecord::Gate Load (0.2ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "pro_self_serve"]]
↳ config/initializers/alaveteli_features.rb:23
Flipper::Adapters::ActiveRecord::Gate Load (0.3ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "annotations"]]
↳ config/initializers/alaveteli_features.rb:22
Flipper::Adapters::ActiveRecord::Gate Load (0.2ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "alaveteli_pro"]]
↳ config/initializers/alaveteli_features.rb:23
Flipper::Adapters::ActiveRecord::Gate Load (0.2ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "projects"]]
↳ config/initializers/alaveteli_features.rb:23
Flipper::Adapters::ActiveRecord::Gate Load (0.2ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "pro_pricing"]]
↳ config/initializers/alaveteli_features.rb:23
Flipper::Adapters::ActiveRecord::Gate Load (0.2ms) SELECT "flipper_gates".* FROM "flipper_gates" WHERE "flipper_gates"."feature_key" = $1 [["feature_key", "pro_self_serve"]]
↳ config/initializers/alaveteli_features.rb:23

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

## production.log

I, [2021-07-20T16:51:07.117095 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered /home/alaveteli/bundle/ruby/2.5.0/gems/exception_notification-4.4.3/lib/exception_notifier/views/exception_notifier/exception_notification.text.erb (117.9ms)
I, [2021-07-20T16:51:07.149475 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Sent mail to x...@vps-xxxx.vps.ovh.net (30.9ms)
I, [2021-07-20T16:51:07.151418 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendering general/exception_caught.html.erb within layouts/default
I, [2021-07-20T16:51:07.151826 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered general/exception_caught.html.erb within layouts/default (0.3ms)
I, [2021-07-20T16:51:07.152612 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered layouts/_favicon.html.erb (0.2ms)
I, [2021-07-20T16:51:07.154304 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered general/_responsive_stylesheets.html.erb (1.0ms)
I, [2021-07-20T16:51:07.158225 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered general/_stylesheet_includes.html.erb (5.2ms)
I, [2021-07-20T16:51:07.158877 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered general/_opengraph_tags.html.erb (0.2ms)
I, [2021-07-20T16:51:07.159810 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered lib/themes/alavetelitheme/lib/views/general/_before_head_end.html.erb (0.3ms)
I, [2021-07-20T16:51:07.163084 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Completed 500 Internal Server Error in 173ms (ActiveRecord: 3.1ms)
I, [2021-07-20T16:51:07.172027 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendering /home/alaveteli/bundle/ruby/2.5.0/gems/exception_notification-4.4.3/lib/exception_notifier/views/exception_notifier/exception_notification.text.erb
I, [2021-07-20T16:51:07.173017 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered /home/alaveteli/bundle/ruby/2.5.0/gems/exception_notification-4.4.3/lib/exception_notifier/views/exception_notifier/_request.text.erb (0.3ms)
I, [2021-07-20T16:51:07.173805 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered /home/alaveteli/bundle/ruby/2.5.0/gems/exception_notification-4.4.3/lib/exception_notifier/views/exception_notifier/_title.text.erb (0.1ms)
I, [2021-07-20T16:51:07.178575 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered /home/alaveteli/bundle/ruby/2.5.0/gems/exception_notification-4.4.3/lib/exception_notifier/views/exception_notifier/_session.text.erb (0.2ms)
I, [2021-07-20T16:51:07.178835 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered /home/alaveteli/bundle/ruby/2.5.0/gems/exception_notification-4.4.3/lib/exception_notifier/views/exception_notifier/_title.text.erb (0.1ms)
I, [2021-07-20T16:51:07.225617 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered /home/alaveteli/bundle/ruby/2.5.0/gems/exception_notification-4.4.3/lib/exception_notifier/views/exception_notifier/_environment.text.erb (46.3ms)
I, [2021-07-20T16:51:07.226097 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered /home/alaveteli/bundle/ruby/2.5.0/gems/exception_notification-4.4.3/lib/exception_notifier/views/exception_notifier/_title.text.erb (0.1ms)
I, [2021-07-20T16:51:07.238993 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered /home/alaveteli/bundle/ruby/2.5.0/gems/exception_notification-4.4.3/lib/exception_notifier/views/exception_notifier/_backtrace.text.erb (0.1ms)
I, [2021-07-20T16:51:07.239267 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered /home/alaveteli/bundle/ruby/2.5.0/gems/exception_notification-4.4.3/lib/exception_notifier/views/exception_notifier/_title.text.erb (0.1ms)
I, [2021-07-20T16:51:07.239568 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Rendered /home/alaveteli/bundle/ruby/2.5.0/gems/exception_notification-4.4.3/lib/exception_notifier/views/exception_notifier/exception_notification.text.erb (67.5ms)
I, [2021-07-20T16:51:07.348345 #29206] INFO -- : [d47dd876-b182-4e5c-a98e-fee543506b10] Sent mail to x...@vps-xxxx.vps.ovh.net (107.1ms)
F, [2021-07-20T16:51:07.354016 #29206] FATAL -- : [d47dd876-b182-4e5c-a98e-fee543506b10]
F, [2021-07-20T16:51:07.354101 #29206] FATAL -- : [d47dd876-b182-4e5c-a98e-fee543506b10] ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "announcements" does not exist
LINE 8: WHERE a.attrelid = '"announcements"'::regclas...
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = '"announcements"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
):
F, [2021-07-20T16:51:07.354280 #29206] FATAL -- : [d47dd876-b182-4e5c-a98e-fee543506b10] 53:
[d47dd876-b182-4e5c-a98e-fee543506b10] 54: <a href="#content" class="show-with-keyboard-focus-only skip-to-link" tabindex="0">Skip to content</a>
[d47dd876-b182-4e5c-a98e-fee543506b10] 55: <!-- begin popups -->
[d47dd876-b182-4e5c-a98e-fee543506b10] 56: <%= render 'general/site_wide_announcement' if site_wide_announcement.present? %>
[d47dd876-b182-4e5c-a98e-fee543506b10] 57: <div id="country-message">
[d47dd876-b182-4e5c-a98e-fee543506b10] 58: </div>
[d47dd876-b182-4e5c-a98e-fee543506b10] 59: <!-- end popups -->
F, [2021-07-20T16:51:07.354317 #29206] FATAL -- : [d47dd876-b182-4e5c-a98e-fee543506b10]
F, [2021-07-20T16:51:07.354345 #29206] FATAL -- : [d47dd876-b182-4e5c-a98e-fee543506b10] app/models/announcement.rb:28:in `block in <class:Announcement>'
[d47dd876-b182-4e5c-a98e-fee543506b10] app/helpers/application_helper.rb:206:in `site_wide_announcement'
[d47dd876-b182-4e5c-a98e-fee543506b10] app/views/layouts/default.html.erb:56:in `_app_views_layouts_default_html_erb__3291137934037890010_56980480'
[d47dd876-b182-4e5c-a98e-fee543506b10] app/controllers/application_controller.rb:189:in `block (2 levels) in render_exception'
[d47dd876-b182-4e5c-a98e-fee543506b10] app/controllers/application_controller.rb:188:in `render_exception'
[d47dd876-b182-4e5c-a98e-fee543506b10] lib/strip_empty_sessions.rb:14:in `call'

Gareth Rees

unread,
Jul 21, 2021, 4:33:22 AM7/21/21
to Alaveteli Dev
> Running Ubuntu 16.04 – the closest version to Tusty 14.04 OVH offers

We'd recommend 18.04 as that's the currently supported Ubuntu [1]. I expect our installation documentation is a little out of date there.

Looking at this line…

    F, [2021-07-20T16:51:07.354101 #29206] FATAL -- : [d47dd876-b182-4e5c-a98e-fee543506b10] ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "announcements" does not exist LINE 8: WHERE a.attrelid = '"announcements"'::regclas...

…it looks like the production database doesn't exist.

It might be a long-standing issue [2], though that did – I think – get fixed in the most recent release (0.39.0.0).

Assuming you're intending to run the application in production mode, to fix the issue you need to run `RAILS_ENV=production bin/rake db:create db:migrate db:seed` and make sure /etc/init.d/alaveteli has RAILS_ENV=production

Hope that helps,

Gareth


Alex Popescu

unread,
Jul 21, 2021, 5:39:55 PM7/21/21
to Alaveteli Dev
tried again on 18.04 
I'm not trying production, I'm just trying to set it up as a prototype/playground first, but failed w Vagrant so I tried the script.
I checked, RAILS_ENV=production was present in /etc/init.d/alaveteli 
then I tried RAILS_ENV=production bin/rake db:create db:migrate db:seed
I get: LoadError: incompatible library version - /home/alaveteli/bundle/ruby/2.5.0/gems/pg-1.2.3/lib/pg_ext.so 

another question, when running the install script on a fresh VPS, should I use the URI of the vps, or an alavateli. subdomain?

Gareth Rees

unread,
Jul 26, 2021, 6:04:33 AM7/26/21
to Alaveteli Dev
> I get: LoadError: incompatible library version - /home/alaveteli/bundle/ruby/2.5.0/gems/pg-1.2.3/lib/pg_ext.so 

Interestingly I got this error after upgrading some packages locally. I had a look around [1] and I think it's something along the lines of the gem needing to be recompiled against the updated library.

You should be able to fix it by running `bundle pristine` in the application directory as the alaveteli user.

> when running the install script on a fresh VPS, should I use the URI of the vps, or an alavateli. subdomain?

It'll be the domain you want your alaveteli to appear at. So, say you have a personal domain of `alex.com`, you might use `alaveteli.alex.com`.

Hope that helps.

Gareth

Alex Popescu

unread,
Jul 26, 2021, 9:00:28 AM7/26/21
to Alaveteli Dev
Thank you. 

1. regarding the subdomain – should I understand that the install script automagically takes care of setting up the subdomain (ns & pointing to the right root directory)?
I'm asking this, as if I try to open the subdomain I get: `alaveteli.vps-xxx.vps.ovh.net’s DNS address could not be found. Diagnosing the problem`

2. I tried `bundle pristine` – 1st I got `bundle: command not found` – so then I tried installing `bundler` for the alaveteli user, then I got `alaveteli is not in the sudoers file.  This incident will be reported.`

I have a few of suggestions for the documentation / onboarding:
I suspect it would help heaps if there would be a 'Prerequisite Knowledge for Installation' note, so potential users could estimate in advance what's expected of them[1]
also, maybe some explicit examples of VPS configuration (service provider + available images)

[1] While I perfectly understand this is a voluntary project, I found the onboarding a bit cumbersome – in my case I'd say I'm an averagely competent dev but noob to Alaveteli's stack (ruby / nginx / vagrant) and so far I'm rather lost, while trying the available support channels, including the seemingly dormant IRC channel – I'd dare suggest a web platform with archive (discord/zulip/slack etc) could make things a bit easier. 
I'm trying to set-up a national FOIA portal and it would be a pity to have to resort to a custom solution – or trying to tame a generic issues board/platform to our needs, as per the only available hammer I got left in our given available timeframe :/ 

> The process of getting your own Alaveteli website up and running could take anywhere from one day to three months, depending on the scale of your ambition for customising the software, your access to technical skills, and your available time.
In this context this is slightly off-putting :| 

thank you,
alex
----

UKCP

unread,
Jul 26, 2021, 9:30:16 AM7/26/21
to Alaveteli Dev
I totally agree, I am also reasonably experienced in web hosting/development and am too struggling with this script and surprised by the lack of documentation on errors or assistance in this group.  It would be great to get it running

Gareth Rees

unread,
Jul 30, 2021, 5:26:38 AM7/30/21
to Alaveteli Dev
> 1. regarding the subdomain – should I understand that the install script automagically takes care of setting up the subdomain (ns & pointing to the right root directory)?

It doesn't do any DNS configuration. It just sets up the web server to accept requests from the given domain.


> 2. I tried `bundle pristine` – 1st I got `bundle: command not found` – so then I tried installing `bundler` for the alaveteli user, then I got `alaveteli is not in the sudoers file.  This incident will be reported.`

You should be able to run `bundle` as the application user, within the application's root directory.

> I suspect it would help heaps if there would be a 'Prerequisite Knowledge for Installation' note

Yeah, I'm sure we can improve on this.

> maybe some explicit examples of VPS configuration (service provider + available images)

You should be able to install Alaveteli on more-or-less any "normal" linux machine (bare metal or virtual) on any provider. We don't maintain images for any in specific though, and don't have plans to do this.

> While I perfectly understand this is a voluntary project, I found the onboarding a bit cumbersome

I appreciate that, it isn't just plug and play. We're always trying to make this easier, but there's only so much a tiny team can do I'm afraid!

>  while trying the available support channels, including the seemingly dormant IRC channel

Ah, that has not been maintained for some years now. I've just spotted we have an old "IRC" link in the alaveteli.org footer. Was this what you used, or did you see this somewhere else?

> I'd dare suggest a web platform with archive (discord/zulip/slack etc) could make things a bit easier. 

We've tried a variety of options over the years, including Slack. At the moment this mailing list is the support channel. 

> I'm trying to set-up a national FOIA portal and it would be a pity to have to resort to a custom solution – or trying to tame a generic issues board/platform to our needs, as per the only available hammer I got left in our given available timeframe :/ 

Could you tell us more about this? Where are you installing? What's your timeframe? We often seek co-funding to provide more direct support to new installations if they align with our wider goals.

>  >The process of getting your own Alaveteli website up and running could take anywhere from one day to three months, depending on the scale of your ambition for customising the software, your access to technical skills, and your available time.
> In this context this is slightly off-putting :| 

Again, I'm sure we can phrase this better. I believe the intent was to make it clear that creating a new Alaveteli isn't just a case of "sudo apt install alaveteli" and job done. There's a lot of work outside of the technical aspect, including translating, collecting authority email addresses and, unfortunately, in many legislatures battling with authorities to accept emailed FOI requests.

Best,

Gareth

Alex Popescu

unread,
Aug 3, 2021, 3:36:41 PM8/3/21
to Alaveteli Dev
>  I've just spotted we have an old "IRC" link in the alaveteli.org footer. Was this what you used, or did you see this somewhere else?

Right in the footer.


> Could you tell us more about this? Where are you installing? What's your timeframe? We often seek co-funding to provide more direct support to new installations if they align with our wider goals.

We're planning on upgrading a platform for Freedom of Information requests in Romania – Ia Statul la întrebări [1] and moving it to its own domain. 
Timeline is a bit tight already, it should be launched early September.
I was contracted to develop a new version, then in the research phase we were happy to find Alaveteli, which promises to meet most of our requirements.
Then I found myself stumbling already in the set-up phase.
I'm somewhat desperate to find someone who can help with the initial set-up and some guidance. There is also a budget for this.

Thank you,
Alex

____________
[1] https://romaniacurata.ro/ia-statul-la-intrebari/ - running since 2014 but is already rusty and the original team is not available anymore.
There was also an Alaveteli running platform (nuvasuparati.info) but it's abandoned – I've got in touch with the organisation that ran it.



Laurent Savaëte

unread,
Aug 3, 2021, 5:01:50 PM8/3/21
to alavet...@googlegroups.com

Hi Alex,

Laurent from madada.fr here. It might create more questions than answers, but just in case, we do all our deployment via an ansible script, which is all available on https://gitlab.com/madada-team/dada-core/ In **theory**, we can set the variables in it, point it at a server, and 30 minutes later, the site is ready. In practice, you'll hit a bunch of headaches, particularly around DNS+email server in my experience.

Even if you don't use it (you probably shouldn't, as it's full of specific settings and tweaks for our site), it can act as a bit of documentation for how we got things working, feel free to look around and get inspiration if any of it can help (we still have to document it). But to echo what Gareth said below, this is the result of a few weeks of work.

Good luck with the setup :)

Laurent

--
You received this message because you are subscribed to the Google Groups "Alaveteli Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alaveteli-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alaveteli-dev/e134ce40-5257-4bff-af80-cd1d0bfbf8b9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages