Git Product home page Git Product logo

addon-octobox's Issues

Error when starting the Postgres database server

Problem

When starting the add-on I get an error when starting the Postgres database server.

I did change Github to use 2FA, but afterwards I registered the application again at https://github.com/settings/applications/new, but that makes no difference.
Guess the 2FA doesn't influence the addon as it is registered as an OAuth application.

Log

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 10-postgres: applying... 
[fix-attrs.d] 10-postgres: exited 0.
[fix-attrs.d] 11-octobox: applying... 
[fix-attrs.d] 11-octobox: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 

-----------------------------------------------------------
 Hass.io Add-on: Octobox v0.2.0

 Take back control of your GitHub notifications

 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 

INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 20-initdb.sh: executing... 
[cont-init.d] 20-initdb.sh: exited 0.
[cont-init.d] 30-nginx.sh: executing... 
Adding password for user gerard
[cont-init.d] 30-nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
INFO: Starting the Postgres database server...
INFO: Starting NGinx...
postgres: could not access the server configuration file "/data/postgres/postgresql.conf": Permission denied
[services.d] done.

System

Ubuntu 18.04.1 LTS / HA 0.75.3 / SU 126

Permission denied to cd into /opt

Problem/Motivation

Cannot start the octobox add-on due to unable to create database. Log shows several errors indicating permission denied to do anything in /opt. I am running this on the hassOS2.2 beta image on Odroid-C2.

Expected behavior

Normal startup of octobox add-on application.

Actual behavior

full add-on log below

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 10-postgres: applying... 
[fix-attrs.d] 10-postgres: exited 0.
[fix-attrs.d] 11-octobox: applying... 
[fix-attrs.d] 11-octobox: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: Octobox v0.3.1
 Take back control of your GitHub notifications
 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
 aarch64 / HassOS 2.2 / HA 0.77.1 / SU 128 / stable
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
INFO: Password is NOT in the Have I Been Pwned database! Nice!
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 20-initdb.sh: executing... 
could not change directory to "/opt": Permission denied
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /data/postgres ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
sh: locale: not found
2018-08-31 14:04:20.346 CEST [12979] WARNING:  no usable system locales were found
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
Success.
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
could not change directory to "/opt": Permission denied
waiting for server to start....2018-08-31 14:04:22.853 CEST [12983] LOG:  listening on Unix socket "/run/postgresql/.s.PGSQL.5432"
2018-08-31 14:04:22.862 CEST [12983] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2018-08-31 14:04:22.898 CEST [12984] LOG:  database system was shut down at 2018-08-31 14:04:21 CEST
2018-08-31 14:04:22.906 CEST [12983] LOG:  database system is ready to accept connections
 done
server started
could not change directory to "/opt": Permission denied
CREATE DATABASE
could not change directory to "/opt": Permission denied
CREATE ROLE
could not change directory to "/opt": Permission denied
waiting for server to shut down...2018-08-31 14:04:23.790 CEST [12983] LOG:  received fast shutdown request
.2018-08-31 14:04:23.795 CEST [12983] LOG:  aborting any active transactions
2018-08-31 14:04:23.798 CEST [12983] LOG:  worker process: logical replication launcher (PID 12990) exited with exit code 1
2018-08-31 14:04:23.800 CEST [12985] LOG:  shutting down
2018-08-31 14:04:23.838 CEST [12983] LOG:  database system is shut down
 done
server stopped
[cont-init.d] 20-initdb.sh: exited 0.
[cont-init.d] 30-nginx.sh: executing... 

Steps to reproduce

Try to install and run the add-on on same image and hardware?

Proposed changes

not a clue

Adding username/password produces `htpasswd: command not found` error

Problem/Motivation

When adding a username/password the logs produce this error:

[cont-init.d] 30-nginx.sh: executing... 
/var/run/s6/etc/cont-init.d/30-nginx.sh: line 36: htpasswd: command not found

Full log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 10-postgres: applying... 
[fix-attrs.d] 10-postgres: exited 0.
[fix-attrs.d] 11-octobox: applying... 
[fix-attrs.d] 11-octobox: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: Octobox v0.1.0
 Take back control of your GitHub notifications
 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 20-initdb.sh: executing... 
[cont-init.d] 20-initdb.sh: exited 0.
[cont-init.d] 30-nginx.sh: executing... 
/var/run/s6/etc/cont-init.d/30-nginx.sh: line 36: htpasswd: command not found
[cont-init.d] 30-nginx.sh: exited 127.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.
 
 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.

Steps to reproduce

Add a username/password to the add-on config

Addon does not start after reboot

Problem/Motivation

After restart, the addon does not start (see Actual behavior).

Expected behavior

Addon starts on startup.

Actual behavior

INFO: Running database migrations...
/root is not writable.
Bundler will use /tmp/bundler/home/unknown' as your home directory temporarily. INFO: Syncing notifications... rake aborted! OpenSSL::Cipher::CipherError: /opt/app/models/user.rb:117:in effective_access_token'
/opt/app/workers/sync_notifications_worker.rb:15:in perform' /opt/config/initializers/custom_sidekiq_worker.rb:9:in perform_async_if_configured'
/opt/app/models/user.rb:74:in sync_notifications' /opt/lib/tasks/tasks.rake:6:in block (3 levels) in <top (required)>'
/opt/lib/tasks/tasks.rake:4:in `block (2 levels) in <top (required)>'
Tasks: TOP => tasks:sync_notifications
(See full trace by running task with --trace)

Steps to reproduce

Seem to be enough to restart the machine for the error to occur. I have it running after setup, then I reboot the machine, and it does not work. It isn't enough to restart the addon, but it seems to work to uninstall and install addon again (and do setup again).

Proposed changes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.