Unable to access openhsb dashboard in linux system

Hi,

This 10.1.68.206:8080 is my PC IP address.

I have followed these steps when installing by apt method,

sudo systemctl start openhab2.service sudo systemctl status openhab2.service sudo systemctl daemon-reload sudo systemctl enable openhab2.service

It is not working.

Thanks,

Dhanasekar

What is the output when you use this command?

I am unable to access the dashboard.

Hi H102,

I am getting below output, when I run “sudo systemctl status openhab2.service”

ananth@ananth:/tmp$ sudo systemctl status openhab2.service

**[sudo] password for ananth: **

● openhab2.service - openHAB 2 - empowering the smart home

Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled; vendor preset: enabled)

Active: active (running) since Tue 2018-10-30 12:35:20 IST; 1h 44min ago

Docs: https://www.openhab.org/docs/

https://community.openhab.org

Process: 12662 ExecStop=/usr/share/openhab2/runtime/bin/karaf stop (code=exited, status=0/SUCCESS)

Main PID: 12845 (java)

CGroup: /system.slice/openhab2.service

└─12845 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -Dope

Oct 30 12:35:20 ananth systemd[1]: Started openHAB 2 - empowering the smart home.

lines 1-11/11 (END)

Thanks,

Dhanasekar

Did you install OH in the tmp directory?

Hi H102,

No, I have not installed OH in tmp directory. Can you please help me to install OH?.

FYI, I am following manual installation steps which is in this link https://www.openhab.org/docs/installation/linux.html#installation.

Please provide standard steps to install openHAB in Ubuntu 16.

Thanks,

Dhanasekar

You can install manually or by using apt-get (the same as the openhabian image install for RPI). With the ubuntu version posted install using apt-get and follow the instructions. You may need to uninstall, remove and purge what’s been installed thus far and start over.

Hi H102,

I am very new to openHAB project. I have come across lot of procedures (for installing openhab in Ubunutu), I am getting confuse.

Can you please share the steps in this mail thread?.

Thanks,

Dhanasekar

I have followed below steps for installing openhab in Ubuntu 16.04 LTS Desktop,

  1. sudo adduser --system --no-create-home --group --disabled-login openhab

  2. cd /tmp
    wget -O openhab-download.zip https://bintray.com/openhab/mvn/download_file?
    file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.3.0%2Fopenhab-2.3.0.zip

    sudo unzip openhab-download.zip -d /opt/openhab2
    rm openhab-download.zip

3. 
sudo chown -hR openhab:openhab /opt/openhab2

sudo su -s /bin/bash -c ‘/opt/openhab2/start.sh’ openhab

5. When I enter "http://10/1.68.206:8080" in browser, I am not seeing openhab dashboard. 

FYI, my Java configuration details,

**_ananth@ananth:/tmp$java -version_
_openjdk version "1.8.0_181"_
_OpenJDK Runtime Environment (Zulu 8.31.0.1-linux64) (build 1.8.0_181-b02)_
_OpenJDK 64-Bit Server VM (Zulu 8.31.0.1-linux64) (build 25.181-b02, mixed mode)_



Thanks,
Dhanasekar

Hi All,

I have pasted my “etc/default/openhab2” below and I am seeing most variables are commented.
Is it expected?.

ananth@ananth:/$ sudo cat /etc/default/openhab2

openHAB 2 service options

#########################

PORTS

The ports openHAB will bind its HTTP/HTTPS web server to.

#OPENHAB_HTTP_PORT=8080
#OPENHAB_HTTPS_PORT=8443

#########################

HTTP(S) LISTEN ADDRESS

The listen address used by the HTTP(S) server.

0.0.0.0 (default) allows a connection from any location

127.0.0.1 only allows the local machine to connect

#OPENHAB_HTTP_ADDRESS=0.0.0.0

#########################

BACKUP DIRECTORY

Set the following variable to specify the backup location.

runtime/bin/backup and runtime/bin/restore will use this path for the zip files.

#OPENHAB_BACKUPS=/var/lib/openhab2/backups

#########################

JAVA OPTIONS

Additional options for the JAVA_OPTS environment variable.

These will be appended to the execution of the openHAB Java runtime in front of all other options.

A couple of independent examples:

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0"

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

EXTRA_JAVA_OPTS="-Djna.library.path=/lib/arm-linux-gnueabihf/ -Duser.timezone=Europe/Berlin -Dgnu.io.rxtx.SerialPorts=/dev/ttyS0"

EXTRA_JAVA_OPTS=""

#########################

OPENHAB DEFAULTS PATHS

The following settings override the default apt/rpm locations and should be used with caution.

openHAB will fail to update itself if you’re using different paths.

Only set these if you are testing and are confident in debugging.

#OPENHAB_HOME=/usr/share/openhab2
#OPENHAB_CONF=/etc/openhab2
#OPENHAB_RUNTIME=/usr/share/openhab2/runtime
#OPENHAB_USERDATA=/var/lib/openhab2
#OPENHAB_LOGDIR=/var/log/openhab2

#########################

OPENHAB USER AND GROUP

The user and group that takes ownership of openHAB. Only available for init.d systems.

To edit user and group for systemd, see the service file at /usr/lib/systemd/system/openhab2.service.

#OPENHAB_USER=openhab
#OPENHAB_GROUP=openhab

#########################

SYSTEMD START MODE

The Karaf startmode for the openHAB runtime. Only available for systemctl/systemd systems.

Defaults to daemon when unset here. Multiple options can be used without quotes.

debug increases log output. daemon launches the Karaf/openHAB processes.

Hi H102,

I can able to reach OH dashboard. I have deleted all old OH source code and it’s related files in Ubuntu system . I have followed “apt-get” automatic installation procedure for OH.

  1. with “https://10.1.68.206:8443/” - I can able to reach dashboard.

  2. with “http://10.1.68.206:8080” - I can’t able to reach dashboard.

Can you please help me on this?

Thanks,

Dhanasekar

If https works do you have something in your network that’s blocking http access?

The 2.3 version is really old at this point. Before you go too far with 2.3, you might want to consider starting with Milestone M5.

Hi H102,

I am not sure. I have to check my network. I have to debug further.

Thanks,

dhanasekar

Hi Mark,

I am using “SNAPSHOT” release and its version is 2.4.0. .

Can I still use this version or you want me to upgrade?.

Thanks,

Dhanasekar

The snapshot version is fine.

Hi Mark,

Thanks for the info.

I am trying to include InfluxDB and Grafana to my OH2.

I am following this link https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761#examplesfor enabling influxdb and grafana.

I am unable to link InfluxDB with Grafana Dashboard and I am getting “network error”

I have realised that I have not selected InfluxDB addon in Paper UI. After that, I have included InfluxDB addon in Paper UI.

Still, I am not getting “network error” when I try to link InfluDB in Grafana.

You want me to repate those steps in https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761#examples ?.

Please help me on this.

If there any new updated steps for OH Snapshot. Please share with me.

Thanks,

Dhanasekar

Thanks,

Dhanasekar

Sorry, @Dhanasekar_Jaganatha, I’ve never worked with InfluxDB and Grafana. Perhaps someone else here on the forum can weigh in?

Thanks for the reply

Hi All,

I am trying to bring sine wave in my Grafana dashboard.
I am following instruction in this link InfluxDB+Grafana persistence and graphing and I have run sample sine.py.

$ python sine.py
Traceback (most recent call last):
File “sine.py”, line 27, in
r = requests.post(“http://%s:8086/write?db=%s” %(IP, DB), auth=(USER, PASSWORD), data=v)
File “/home/ananth/.local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/api.py”, line 116, in post
return request(‘post’, url, data=data, json=json, **kwargs)
File “/home/ananth/.local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/api.py”, line 60, in request
return session.request(method=method, url=url, **kwargs)
File “/home/ananth/.local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/sessions.py”, line 533, in request
resp = self.send(prep, **send_kwargs)
File “/home/ananth/.local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/sessions.py”, line 646, in send
r = adapter.send(request, **kwargs)
File “/home/ananth/.local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/adapters.py”, line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host=‘192.168.0.2’, port=8086): Max retries exceeded with url: /write?db=test (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f3631961590>: Failed to establish a new connection: [Errno 110] Connection timed out’,))

While creating “Data Sources” in Grafana, When I select any of the below access type and after selecting “save and test”, I am getting below errors.

 1. Access = Server (default) -----> Error : Bad Gateway (502)
                                        or
 2. Access = NetworkError: undefined (undefined). 

Please help me to solve this issue and get the sine wave in Grafana dashboard.

Thanks,
Dhanasekar