Http://openhabianpi:8080 , not found but http://192.168.1.* works OK

  • Platform information:
    • Hardware: _Pi 3
    • OS: openhabianpi
    • openHAB version: 2

I have done several reinstalls using the openHABian v1.4 released! SOP.

I have never been able to get the http://openhabianpi:8080 to works but always returns Server Not Found

Checking IPs on network

nmap -sP 192.168.1.*

to get the IP.

http://192.168.1.*

works OK. It isnt always the same but each install maintains the one it first returned so I just bookmark it.

I am not sure which way to go to find out why this is happening.

BTW my OS is Ubuntu 7.10

TIA

Mark

Hi,
I’ve just registered to the Community and am a newbie.

Are you literally entering ‘http://192.168.1.*’ as when I enter it as that, I too get Server not found.
I think you need to replace that asterix with the actual fourth segment of the IP address of your server.

1 Like

Thanks for the reply.

http://192.168.1.* where * has been 3, 6, 7 , currently 8 works fine. I use nmap to discover the IP and take it from there.
It is http://openhabianpi:8080 that is supposed to be the alternative hostname served by openhabian has never worked. It would mean I could setup a browser permanently at that address rather than having to look for the IP every time.

Kind Regards

Mark

Hostname is done through your DHCP. Your openhabian pi will request the DHCP for a lease on that hostname. DHCP grants that request and reserves the hostname to that IP address based on MAC address. Is your DHCP working correctly? 99% of home users have the DHCP on the router itself. On your router, can you check if you can manually set a DHCP static route? For example, reserve MAC address of your pi to the hostname openhabianpi and point it to IP 1.2.3.4.

1 Like

Thanks to you Sir for that insight.

I was a little muddled as to exactly where the hostname to IP was taking place. It MUST be at the router and could be no place else.

I will investigate.

Props to you for pointing a nOOb in the right direction. Sometimes we just don’t know what we don’t know and just need a hint.

Not a prob. If you mention what router you have, I bet more people will be able to assist you further.

1 Like

Very much obliged.

The Router was the one out of the cereal packet with iiNet. Huawei, I must confess I dont see any obvious options for setting up static IPs and assigning them to my http://openhabianpi:8080 host.

My most devastating superpower is my lack of talent.

I was awesome at instructing Karate because I understood why not everyone was a “natural” … since I was hopeless.

Can you check if the router has DNS server capabilities?

Hi, I had the same problem and I found that a service called avahi-deamon could help.
But first check if your hostname really is openhabianpi by executing the command “hostname” on the command line. This should return the hostname. You can also try to access your openHAB via:
Http://openhabianpi.local:8080

Are you accessing it from a Mac or Windows computer?

Then you can try installing avahi:
sudo apt install avahi-daemon
then reboot and it is doing it’s job.

1 Like

Are you accessing it from a Mac or Windows computer?

It is a Linux machine

[09:38:46] openhabian@openHABianPi:~$ hostname
openHABianPi
mark@mark-Lenovo:~$ cat /proc/net/arp
IP address       HW type     Flags       HW address            Mask     Device
192.168.1.8      0x1         0x2         b8:27:eb:ad:62:6d     *        wlp1s0
192.168.1.5      0x1         0x2         ec:1f:72:cd:83:9f     *        wlp1s0
192.168.1.1      0x1         0x2         50:04:b8:5e:8a:87     *        wlp1s0

I assume this will always assign the IP 192.168.1.8 to that MAC address - i.e. it will be a “static address”. I have a notion it was already doing that since I found that MAC address in the list on the modem.

The avahi is already installed on the Pi and

[13:54:55] openhabian@openHABianPi:~$ cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd:         compat
group:          compat
shadow:         compat
gshadow:        files
**hosts:          files mdns4_minimal [NOTFOUND=return] dns**
networks:       files

appears to be the line to edit.

I will mark the question as solved because the static IP - MAC configuration on the router should mean no guess work using ssh or http. avahi is a whole level up and the ability to resolve the openhabpi.local hostname is not critical.

Thanks to all who helped me.

The static DHCP solution works but using names is easier, especially if the number of hosts increases. Did you try to access it via:

http://openhabianpi.local:8080

I always have to add the .local.

1 Like

I have the same issue, but this worked. I can also reach openhab dashboard through myopenhab.org.

But what is changed from yesterday until today that makes me unable to use openhabianpi, but have to add .local?

1 Like

Reading and searching on this topic for another case learnt me that if you don’t have a DNS service in your local network you need to use .local. If you don’t add the .local your machine will send a request to your internet DNS. Adding .local will send out a multicast message telling the machine on the internal network with the hostname specified to respond. For a Mac this is preinstalled as a service called Bonjour, on Linux avahi is one solution and for a windows machine there is a windows version of Bonjour available from Apple.

2 Likes