Openhabian installation

there seems to be something wrong with the openhabian-config i guess.
I have installed everything 5 times from the scratch and everytime it is the same
Influxdb does not work giving authorization problems and errors. Fresh installs everytime and using the config-tool
i tried OH2.4, 2.5 etc… something is wron either with the installation script or the influx installation…



==> /var/log/openhab2/openhab.log <==

2019-04-17 15:44:29.654 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.10:8080

2019-04-17 15:44:29.671 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.10:8443

2019-04-17 15:44:31.302 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007

2019-04-17 15:44:33.221 [INFO ] [.dashboard.internal.DashboardService] - Stopped Dashboard

2019-04-17 15:44:33.391 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.10:8080

2019-04-17 15:44:33.393 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.10:8443

==> /var/log/openhab2/events.log <==

2019-04-17 15:50:42.371 [thome.event.ExtensionEvent] - Extension 'package-expert' has been installed.

==> /var/log/openhab2/openhab.log <==

2019-04-17 15:51:13.239 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel

2019-04-17 15:51:15.783 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin

2019-04-17 15:51:15.929 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui

==> /var/log/openhab2/events.log <==

2019-04-17 15:51:16.722 [thome.event.ExtensionEvent] - Extension 'misc-restdocs' has been installed.

2019-04-17 15:51:16.735 [thome.event.ExtensionEvent] - Extension 'transformation-javascript' has been installed.

2019-04-17 15:51:16.739 [thome.event.ExtensionEvent] - Extension 'ui-habpanel' has been installed.

2019-04-17 15:51:16.741 [thome.event.ExtensionEvent] - Extension 'transformation-regex' has been installed.

2019-04-17 15:51:16.742 [thome.event.ExtensionEvent] - Extension 'transformation-jsonpath' has been installed.

2019-04-17 15:51:16.744 [thome.event.ExtensionEvent] - Extension 'transformation-xpath' has been installed.

2019-04-17 15:51:16.745 [thome.event.ExtensionEvent] - Extension 'ui-basic' has been installed.

2019-04-17 15:51:16.747 [thome.event.ExtensionEvent] - Extension 'transformation-map' has been installed.

2019-04-17 15:51:16.748 [thome.event.ExtensionEvent] - Extension 'ui-classic' has been installed.

2019-04-17 15:51:16.750 [thome.event.ExtensionEvent] - Extension 'ui-habmin' has been installed.

2019-04-17 15:51:16.752 [thome.event.ExtensionEvent] - Extension 'transformation-xslt' has been installed.

2019-04-17 15:51:16.753 [thome.event.ExtensionEvent] - Extension 'transformation-exec' has been installed.

2019-04-17 15:51:16.755 [thome.event.ExtensionEvent] - Extension 'ui-paper' has been installed.

2019-04-17 15:51:16.756 [thome.event.ExtensionEvent] - Extension 'transformation-scale' has been installed.

2019-04-17 15:54:02.893 [thome.event.ExtensionEvent] - Extension 'binding-zwave' has been installed.

2019-04-17 15:54:22.875 [thome.event.ExtensionEvent] - Extension 'persistence-influxdb' has been installed.

==> /var/log/openhab2/openhab.log <==

2019-04-17 16:01:22.494 [ERROR] [nternal.extensions.ExtensionResource] - Exception while installing extension: No extension service registered for influxdb

==> /var/log/openhab2/events.log <==

2019-04-17 16:01:22.514 [thome.event.ExtensionEvent] - influxdb: No extension service registered for influxdb

==> /var/log/openhab2/openhab.log <==

2019-04-17 16:01:24.177 [INFO ] [.dashboard.internal.DashboardService] - Stopped Dashboard

2019-04-17 16:01:24.272 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.10:8080

2019-04-17 16:01:24.274 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.10:8443


2019-04-17 16:42:24.884 [ERROR] [org.influxdb.impl.BatchProcessor    ] - Batch could not be sent. Data will be lost

java.lang.RuntimeException: {"error":"authorization failed"}

	at org.influxdb.impl.InfluxDBErrorHandler.handleError(InfluxDBErrorHandler.java:19) ~[241:org.openhab.persistence.influxdb:1.13.0]

	at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:242) ~[241:org.openhab.persistence.influxdb:1.13.0]

	at org.influxdb.impl.$Proxy135.writePoints(Unknown Source) ~[241:org.openhab.persistence.influxdb:1.13.0]

	at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:151) ~[241:org.openhab.persistence.influxdb:1.13.0]

	at org.influxdb.impl.BatchProcessor.write(BatchProcessor.java:171) [241:org.openhab.persistence.influxdb:1.13.0]

	at org.influxdb.impl.BatchProcessor$1.run(BatchProcessor.java:144) [241:org.openhab.persistence.influxdb:1.13.0]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

	at java.lang.Thread.run(Thread.java:748) [?:?]

==> /var/log/openhab2/events.log <==

2019-04-17 16:42:28.955 [vent.ItemStateChangedEvent] - ZWaveSerialController_FramesAcknowledged changed from 42 to 43

==> /var/log/openhab2/openhab.log <==

2019-04-17 16:42:28.988 [ERROR] [org.influxdb.impl.BatchProcessor    ] - Batch could not be sent. Data will be lost

java.lang.RuntimeException: {"error":"authorization failed"}

	at org.influxdb.impl.InfluxDBErrorHandler.handleError(InfluxDBErrorHandler.java:19) ~[241:org.openhab.persistence.influxdb:1.13.0]

	at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:242) ~[241:org.openhab.persistence.influxdb:1.13.0]

	at org.influxdb.impl.$Proxy135.writePoints(Unknown Source) ~[241:org.openhab.persistence.influxdb:1.13.0]

	at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:151) ~[241:org.openhab.persistence.influxdb:1.13.0]

	at org.influxdb.impl.BatchProcessor.write(BatchProcessor.java:171) [241:org.openhab.persistence.influxdb:1.13.0]

	at org.influxdb.impl.BatchProcessor$1.run(BatchProcessor.java:144) [241:org.openhab.persistence.influxdb:1.13.0]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

	at java.lang.Thread.run(Thread.java:748) [?:?]

if i change user to admin in influxdb.cfg i get:

2019-04-17 17:03:00.421 [ERROR] [org.influxdb.impl.BatchProcessor    ] - Batch could not be sent. Data will be lost

java.lang.RuntimeException: {"error":"database not found: \"openhab_db\""}

	at org.influxdb.impl.InfluxDBErrorHandler.handleError(InfluxDBErrorHandler.java:19) ~[241:org.openhab.persistence.influxdb:1.13.0]

	at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:242) ~[241:org.openhab.persistence.influxdb:1.13.0]

	at org.influxdb.impl.$Proxy135.writePoints(Unknown Source) ~[241:org.openhab.persistence.influxdb:1.13.0]

	at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:151) ~[241:org.openhab.persistence.influxdb:1.13.0]

	at org.influxdb.impl.BatchProcessor.write(BatchProcessor.java:171) [241:org.openhab.persistence.influxdb:1.13.0]

	at org.influxdb.impl.BatchProcessor$1.run(BatchProcessor.java:144) [241:org.openhab.persistence.influxdb:1.13.0]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

	at java.lang.Thread.run(Thread.java:748) [?:?]

it seems that the db is not even created!!!

installing influxdb manually works ok… Jesus i had a lot to learn those couple of days…
but please fix it

What does your influxdb.cfg look like?

believe me i am in Openhab for 5 years everything was/is perfect

# The database URL, e.g. http://127.0.0.1:8086 or https://127.0.0.1:8084 .
# Defaults to: http://127.0.0.1:8086
# url=http(s)://<host>:<port>

# The name of the database user, e.g. openhab.
# Defaults to: openhab
user=openhab

# The password of the database user.
password=XXX

# The name of the database, e.g. openhab.
# Defaults to: openhab
db=openhab_db

once i installed influx the ooold way manually everything is ok
SHOW DATABASES actually was only giving “_internal” and no “openhab_db”

there is something wrong with the installation script definitely

OK. So it works fine with manual install of InfluxDB? I don’t use openhabian, so can’t comment on that.

Yes it works ok. But it is a pain to install in comparison to the script I am using both windows 10 nuc and raspberry pi on 3 installations.

This problem has been mentioned quite a few times now in the last few months. I wonder why it still continue to be a problem. I guess some maintainer needs to be told directly. (dont know who).

You need to open an issue on Github to address maintainers.
Provide a useful log to show the installation process
(add “set -x” as 2nd line to /usr/local/bin/openhabian-config and catch the output to a file)

just realized today that the installation of Nginx is also broken in the config… I had to also install it manually…

@Nomader can you elaborate? Also have you filed an issue on git?

I just used the nginx install 2 days ago and all seemed to work…

used the config on a fresh install to install nginx yesterday… it installs without errors, but the server does not ask for authentication. tried the installation a couple of times again… but nothing. installed it manually as explained here: https://www.openhab.org/docs/installation/security.html and it worked fine.

I will try again in a few hours and keep you informed
i will try on a fresh install on Rpi3 as always


this is a totally fresh install 10 minutes ago…
it seems that no password is generated and the relevant fields in the nginx config are commented out… (no .htpasswd is found in /etc/nginx directory
as soon as i create a password using

sudo htpasswd -c /etc/nginx/.htpasswd username

and remove the “##” from nginx config everything works as it should

EDIT: so .htpasswd is a hidden system file and can only be visible on “ls -a” command and not regular “ls”. The file is created by the config though correctly but something is wrong in it and the nginx config still has the auth lines commented out.