I tried to install Diaspora on a fresh Debian 9 server, but I got this error when I try to start it
=====================================================
diaspora@diaspora-deb:~/diaspora$ ./script/server
Starting Diaspora in production mode with 1 Sidekiq worker(s).
system:
uname: "Linux diaspora-deb 4.4.44-1-pve #1 SMP PVE 4.4.44-84 (Thu, 9 Mar 2017 12:06:34 +0100) x86_64 GNU/Linux"
name: "Debian"
version: "9"
architecture: "x86_64"
bash: "/bin/bash => GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)"
zsh: " => not installed"
remote path: “debian/9/x86_64”
rvm:
version: "rvm 1.29.2 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io/]"
updated: "15 hours 16 minutes 15 seconds ago"
path: "/home/diaspora/.rvm"
autolibs: “[enable] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X).”
Have you tried bin/bundle config --local build.sigar '--with-cppflags="-fgnu89-inline"', gem uninstall sigar and then bin/bundle install again?
I have installed a pod with debian 9, but I don’t use eye (./script/server) which is the thing that uses sigar. I start the services directly with systemd, which does the same things as eye does (start and monitor the processes and restart them when they crash). So there is no need to have an extra process running for that that only needs resources.
diaspora@diaspora-deb:~/diaspora$ bin/bundle config --local build.sigar '–with-cppflags="-fgnu89-inline"'
You are replacing the current local value of build.sigar, which is currently “–with-cppflags=\\\”-fgnu89-inline\\\""
diaspora@diaspora-deb:~/diaspora$ gem uninstall sigar
Successfully uninstalled sigar-0.7.3
diaspora@diaspora-deb:~/diaspora$ bin/bundle install
Fetching gem metadata from
Fetching gem metadata from
Fetching version metadata from
Fetching version metadata from
Fetching dependency metadata from /…
Fetching dependency metadata from /.
Fetching gem metadata from /…
Fetching version metadata from/…
Fetching dependency metadata from/…
Using rake 12.0.0
Using i18n 0.8.1
Using minitest 5.10.1
Using thread_safe 0.3.6
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using rack 1.6.5
[…]
Using compass-rails 2.0.5
Using devise_lastseenable 0.0.6
Bundle complete! 136 Gemfile dependencies, 220 gems now installed.
Gems in the groups test and development were not installed.
Bundled gems are installed into ./vendor/bundle.
diaspora@diaspora-deb:~/diaspora$ ./script/server
Starting Diaspora in production mode with 1 Sidekiq worker(s).
Please replace /path/to/diaspora with the path where you installed diaspora. You can also add the service needed for the database at Wants= and After= when it is on the same server, but my database is on another server, so I don’t have that.
You can then start/stop both together with diaspora.target or independently.
But by default it creates a file socket at /home/diaspora/diaspora/tmp/diaspora.sock, you can change it to port 3000 in the diaspora.yml.
The database service should go in diaspora.target:
[Unit]
Description=Diaspora social network
Wants=redis-server.service postgresql.service
After=redis-server.service postgresql.service
[Install]
WantedBy=multi-user.target
By the way: /lib/systemd/system/ is for unit-files installed from the system, you can create user-created units in /etc/systemd/system/. That is not a problem, just an info, both locations work.
Ok thank you Benjamin, I’m close to have my pod up ! But still got an error "diaspora-web.service: Failed to reset devices.list: Operation not permitted " :
root@diaspora-deb:~# systemctl status diaspora-web.service
* diaspora-web.service - Diaspora social network (unicorn)
Loaded: loaded (/etc/systemd/system/diaspora-web.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2017-07-04 08:24:39 UTC; 6h ago
Main PID: 24957 (ruby)
Tasks: 6 (limit: 4915)
CGroup: /system.slice/diaspora-web.service
|-24957 unicorn master -c config/unicorn.rb -E production
|-25269 unicorn worker[0] -c config/unicorn.rb -E production
`-25272 unicorn worker[1] -c config/unicorn.rb -E production
Jul 04 08:24:39 diaspora-deb systemd[1]: diaspora-web.service: Failed to reset devices.list: Operation not permitted
Jul 04 08:24:39 diaspora-deb systemd[1]: Started Diaspora social network (unicorn).
Jul 04 08:24:40 diaspora-deb bash[24957]: I, [2017-07-04T08:24:40.190653 #24957] INFO -- : Refreshing Gem list
Jul 04 08:24:48 diaspora-deb bash[24957]: I, [2017-07-04T08:24:48.478581 #24957] INFO -- : listening on addr=0.0.0.0:3000 fd=
Jul 04 08:24:48 diaspora-deb bash[24957]: I, [2017-07-04T08:24:48.526666 #24957] INFO -- : master process ready
Jul 04 08:24:48 diaspora-deb bash[24957]: I, [2017-07-04T08:24:48.533695 #25269] INFO -- : worker=0 ready
Jul 04 08:24:48 diaspora-deb bash[24957]: I, [2017-07-04T08:24:48.537502 #25272] INFO -- : worker=1 ready
But the display is ugly (no css) I got this in the logs :
==> /home/diaspora/diaspora/log/production.log <==
[2017-07-04T15:21:15] INFO PID-25272 TID-47099318841540 Rails: Started GET "/podmin" for 89.107.168.195 at 2017-07-04 15:21:15 +0000
[2017-07-04T15:21:15] INFO PID-25272 TID-47099318841540 ActionController::Base: Processing by HomeController#podmin as HTML
Rendered home/podmin.haml within layouts/with_header_with_footer (2.8ms)
Rendered shared/_links.haml (2.2ms)
Rendered layouts/_footer.html.haml (7.0ms)
Rendered layouts/_header_not_connected.haml (0.8ms)
Rendered layouts/_header.html.haml (1.7ms)
Rendered application/_head.haml (12.0ms)
Rendered layouts/application.html.haml (26.4ms)
Rendered layouts/with_header.html.haml (28.7ms)
[2017-07-04T15:21:15] INFO PID-25272 TID-47099318841540 ActionController::Base: Completed 200 OK in 43ms (Views: 39.5ms | ActiveRecord: 0.0ms)
[2017-07-04T15:21:15] INFO PID-25269 TID-47099318841540 Rails: Started GET "/assets/jquery2-32b0ecbb2ae971189d8e4b8304c38134.js" for 89.107.168.195 at 2017-07-04 15:21:15 +0000
[2017-07-04T15:21:15] INFO PID-25272 TID-47099318841540 Rails: Started GET "/assets/jquery_ujs-935898b80e784f61e070602f51468004.js" for 89.107.168.195 at 2017-07-04 15:21:15 +0000
[2017-07-04T15:21:15] FATAL PID-25269 TID-47099318841540 Rails:
ActionController::RoutingError (No route matches [GET] "/assets/jquery2-32b0ecbb2ae971189d8e4b8304c38134.js"):
lib/rack/internet_explorer_version.rb:34:in `call'
[2017-07-04T15:21:15] FATAL PID-25272 TID-47099318841540 Rails:
ActionController::RoutingError (No route matches [GET] "/assets/jquery_ujs-935898b80e784f61e070602f51468004.js"):
lib/rack/internet_explorer_version.rb:34:in `call'
Obviously I missed something, If you have an idea…
And no https for the moment, I need to take time to do this.
I can’t reproduce this error here, everything works fine. But the error message seems to be no real problem, because it’s running.
But when you get no css/js, you either haven’t setup a reverse-proxy to serve the static files or you didn’t precompile the static files. Because it tries to load the js directly from the app-server (No route matches [GET] "/assets/jquery2-32b0ecbb2ae971189d8e4b8304c38134.js"). See: https://wiki.diasporafoundation.org/Installation/Debian/Jessie#Reverse_proxy
I’m trying to upgrade my Diaspora Docker image from jessie to stretch-slim, and I’m getting the same error described by the poster (/home/diaspora/diaspora/vendor/bundle/ruby/2.4.0/bin/loader_eye --stop_all -c config/eye.rb: symbol lookup error: /home/diaspora/diaspora/vendor/bundle/ruby/2.4.0/gems/sigar-0.7.3/lib/sigar.so: undefined symbol: sigar_skip_token). What’s the right way to overcome this error?