Installation of Influx&Grafana fails

  • Platform information:
    • Hardware: Raspberry Pi 4 Model B Rev 1.2
    • OS: openHAB 2.5.0-1 (Release Build)
    • Java Runtime Environment: install default (Zulu)
    • openHAB version: openHAB 2.5.0-1 (Release Build)
  • Issue of the topic: First time installation of openHAB (after reviewing the excellent video’s of BK Hobby on YouTube. Moving from Domoticz to openHAB. During installation I got the message:

Sadly there was a problem setting up the selected option. Please report this problem in the openHAB
community forum or as a openHABian GitHub issue.

I searched the forum for similar posts. I saw one that was solved, but the solution was abacadabra for me. I am new to openHAB, not to Linux.

Can anybody advise me what to do ?

Thx in advance !!

Post the link please and maybe someone can help.:wink:

@lwolfs also see this topic OH 2.5M4 Error Installing Influx and Grafana you may need to use translation for the video.

Did you create an influx.persist file and use default strategy?

Strategies {
 everyMinute : "0 * * * * ?"
 everyHour : "0 0 * * * ?"
 everyDay : "0 0 0 * * ?"
 every15min : "0 0/15 * * * ?"
 default = everyMinute

Items {
            Your item here
1 Like

I am very sorry to post so little details about the error…

Here are the messages

$ systemctl enable grafana-server.service
Synchronizing state of grafana-server.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable grafana-server
Created symlink /etc/systemd/system/ â /usr/lib/systemd/system/grafana-server.service.

$ systemctl start grafana-server.service
Updating Grafana admin password…curl: (7) Failed to connect to localhost port 3000: Connection refused
FAILED Connection Grafana to InfluxDB…curl: (7) Failed to connect to localhost port 3000: Connection refused
Adding openHAB dashboard tile for Grafana… 2019-12-27_16:33:10_CET

Your problem is listed in our post “Connection refused”, check that something is not blocking the port and your server has access.

Done some digging. This is what I have found:

My problemblem seems to resemble the problem here image InfluxDB+Grafana installation error

The Influxdb users and database were NOT created, except grafana user.
[09:24:19] openhabian@openhab:~$ influx -username admin -password ******* -host localhost
Connected to http://localhost:8086 version 1.7.9
InfluxDB shell version: 1.7.9
> CREATE DATABASE openhab_db

> CREATE USER grafana WITH PASSWORD ‘*******’
ERR: user already exists
Warning: It is possible this error is due to not setting a database.
Please set a database with the command "use ".
> GRANT ALL ON openhab_db TO openhab
> GRANT READ ON openhab_db TO grafana
> exit
[09:27:20] openhabian@openhab:~$

Also password of grafana admin was the default password (admin) instead of what I stated in the openhabian-config menu

I followed most of the steps in

Looks promissing, but SAMBA also doesnt work for me. Have setup another workgroup than WORKGROUP. Docs also donot help me.

I think I am going to start over again, without influx&grafana, and first get a simple setup that is working (for the first time).

Looks like you may have missed a step in setup.

Post your smb.config as you may have in issue in the config.

Being new to OH that might be a good idea. Take things slow and move from one device to the next.

@H102 Thanks for your reply. Appreciate it a lot.

The creation of the users in InfluxDB and Grafana is done automatically when using the openhabian-config. But somehow 2 users and the main database were not created.

OpenHAB is reinstalled, and I am following the steps BK Hobby explained in his youtube tutorials.
Great resource. This speeds up the adaption of the product. Great work !!!

My Windows workstation is not in the default WORKGROUP group, but in WWG.
I did modify the smb.conf file, but no luck so far.

Here’s the global section of smb.cfg:


  workgroup = WWG
  wins support = yes
  dns proxy = no

The log.nmbd tells me
[19:13:50] openhabian@openhab:/var/log/samba$ tail log.nmbd
[2019/12/28 19:13:46.578504, 0] …/source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)

  Samba name server OPENHAB is now a local master browser for workgroup WWG on subnet

[2019/12/28 19:13:46.578927,  0] ../source3/nmbd/nmbd_browsesync.c:354(find_domain_master_name_query_fail)
  Unable to find the Domain Master Browser name WWG<1b> for the workgroup WWG.
  Unable to sync browse lists in this workgroup.

and the log.smbd

[2019/12/28 19:13:11.804059,  0] ../lib/util/become_daemon.c:138(daemon_ready)
  daemon_ready: STATUS=daemon 'smbd' finished starting up and ready to serve connections

Do you have a section near the bottom of smb.conf called “Custom Share Definitions”?

Add/change the file at the bottom to this and save.

Screenshot at 2019-12-28 12-33-51

My complete smb.cfg looks like this:

  workgroup = WWG
  wins support = yes
  dns proxy = no
  log file = /var/log/samba/log.%m
  max log size = 1000
  syslog = 0
  server role = standalone server
  passdb backend = tdbsam
  obey pam restrictions = yes
  unix password sync = yes
  passwd program = /usr/bin/passwd %u
  passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  pam password change = yes
  map to guest = bad user

  comment = Home Directories
  browseable = no
  valid users = %S
  writeable = yes
  create mask = 0700
  directory mask = 0700

   comment = All Printers
   browseable = no
   public = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = no
   public = no
   read only = yes
   guest ok = no

  comment=openHAB2 combined folders
  create mask=0777
  directory mask=0777
  veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
  delete veto files = yes

  comment=openHAB2 site configuration
  create mask=0777
  directory mask=0777
  veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
  delete veto files = yes

SAMBA doesnt like me… :frowning:

I changed the permissions on /srv to 775 ( from 664 ) and now SAMBA is on my side. :slight_smile:

Glad it to hear.:+1:

Did you getr Influx and Grafana running?

@H102 I will first going to get more familiar with openHAB. There is a LOT to learn.
I will give it a try in the next few days.

Thanks for asking.

And have a happy and healthy 2020 !!!

Yes, there is more I do not know about OH than I do,:crazy_face: and I’ve been using it for a few years.:grin:

Thanks and you too.

Followed the excellent instructions on GRAFANA in OPENHAB 2 deutsch / Influxdb / HABpanel / OPENHAB Tutorial and InfluxDB and Grafana work !!
Great tutorial.

Installing both using config-openhab didnt work for me. Dont know why.