Accessing web interface



  • I installed eGeoffrey on a Raspi 3b.
    After installation I am urged to access the web interface on IP address 192.168.2.208.
    (which should be correct).

    When I try to access the web interface I get the error message that the server can not be found.

    What am I doing wrong?
    Please your advice.



  • @eporocrail welcome to the forum!

    • First let's ensure all the services are correctly running by executing egeoffrey-cli status from within the directory where eGeoffrey has been installed. You should see a bunch of services up and running .
    • Then, if everything is fine there, check if the GUI service is accessible by running netstat -tunap |grep 80, you should see the port open and something listening on it (ensure you are not running other processes using port 80).
    • Finally let's have a look at the logs. Those are in data/egeoffrey/logs/egeoffrey.log. If the file is empty, you can run egeoffrey-cli logs to see live logs from the different components.

    Feel free to copy and paste the output of the commands here if you need any help with the troubleshooting. Of course I'm expecting you can ping 192.168.2.208 correctly from the machine you are trying to access the web interface.
    Thanks!



  • @user2684

    Pinging is OK.
    Listener was running.
    Log file was not present.

    Part of the logging:

    `egeoffrey-gui_1 | [2020-05-28 08:35:44][system/watchdog-egeoffrey-gui-d6100c42ac] WARNING: Unable to connect to egeoffrey-gateway:443 - Traceback (most recent call last):| File "sdk/python/module/helpers/mqtt_client.py", line 51, in __connect| self.gateway.connect(self.module.gateway_hostname, self.module.gateway_port)| File "/usr/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 937, in connect| return self.reconnect()| File "/usr/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 1071, in reconnect| sock = self._create_socket_connection()| File "/usr/local/lib/python2.7/site-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection| return socket.create_connection(addr, source_address=source, timeout=self._keepalive)| File "/usr/local/lib/python2.7/socket.py", line 557, in create_connection| for res in getaddrinfo(host, port, 0, SOCK_STREAM):|gaierror: [Errno -2] Name does not resolve|'

    I am curious what turns out to be the problem.



  • @eporocrail ok so apparently the GUI service has started but is still trying to connect to the eGeoffrey gateway which is the message bus used by any service of the platform for exchanging information. Would you mind sharing the output of egeoffrey-cli status so to understand if egeoffrey-gateway is running as well.
    You should also have a file named docker-compose.yml in the eGeoffrey directory, feel free to share it as well so to understand if something is missing there.
    Last question: any error message during installation?
    Thanks!



  • pi@raspberrypi:~/egeoffrey $ sudo egeoffrey-cli status
    Name Command State Ports

    egeoffrey_egeoffrey- sh docker- Up 0.0.0.0:1883->1883/tcp
    bridge_1 entrypoint.sh mo ... ,
    0.0.0.0:443->443/tcp,
    0.0.0.0:8883->8883/tcp
    egeoffrey_egeoffrey- sh docker- Up
    controller_1 entrypoint.sh eg ...
    egeoffrey_egeoffrey- docker-entrypoint.sh Up 0.0.0.0:6379->6379/tcp
    database_1 redis ...
    egeoffrey_egeoffrey- sh docker- Up 0.0.0.0:80->80/tcp
    gui_1 entrypoint.sh eg ...
    pi@raspberrypi:~/egeoffrey $

    docker-compose.yml:

    networks:
    egeoffrey:
    driver: bridge
    services:
    egeoffrey-bridge:
    env_file: .env
    image: egeoffrey/egeoffrey-bridge:master-arm32v6
    networks:
    - egeoffrey
    ports:
    - 443:443
    - 1883:1883
    - 8883:8883
    restart: always
    volumes:
    - ./data/bridge/config:/mosquitto/config
    - ./data/bridge/data:/mosquitto/data
    - ./data/bridge/logs:/mosquitto/logs
    egeoffrey-controller:
    env_file: .env
    environment:
    - EGEOFFREY_LOGGING_LOCAL=0
    - EGEOFFREY_MODULES=controller/logger, controller/db, controller/config, controller/alerter,
    controller/chatbot, controller/hub
    image: egeoffrey/egeoffrey-controller:master-arm32v6
    networks:
    - egeoffrey
    restart: always
    volumes:
    - ./data/egeoffrey/logs:/egeoffrey/logs
    - ./data/egeoffrey/config:/egeoffrey/config
    egeoffrey-database:
    env_file: .env
    image: egeoffrey/egeoffrey-database:master-arm32v6
    networks:
    - egeoffrey
    ports:
    - 6379:6379
    restart: always
    volumes:
    - ./data/database/data:/database/data
    egeoffrey-gui:
    env_file: .env
    environment:
    - EGEOFFREY_MODULES=gui/webserver
    image: egeoffrey/egeoffrey-gui:master-arm32v6
    networks:
    - egeoffrey
    ports:
    - 80:80
    restart: always
    version: '3'

    During installation nothing arose any suspicion.



  • @eporocrail here it is, I see you are running a bridge instead of a gateway (gateway is for local installation, bridge is for cloud based installation but you would need a publicly accessible remote server for this) so I guess you answered something when the installer was requesting a hostname of your remote gateway. You should have left it empty for the local installation. If this is the case, simplest thing would be to run a egeoffrey-cli stop, delete eGeoffrey's installation directory and reinstall leaving it empty when asked "What is, if any, the hostname of your remote gateway? Leave if empty for a local installation []". Let me know if this was the issue. Thanks!



  • @user2684

    That was it!

    I did a new install earlier but without deleting the previous installation directory.



  • @eporocrail excellent, let me know of course if you need any additional information or you face additional issues. Thanks!



  • I am installing egeoffrey on a Raspi 3B+.

    Something is not working as expected.
    Like before I did an install. When the problem occurred (no access to the webpage, pinging OK.) I did a re-install, deleting the egeoffrey directory. Still no access but the status is now slightly different.

    ellard@machinist:~/egeoffrey$ sudo egeoffrey-cli status
    Name Command State Ports

    egeoffrey_egeoffrey- sh docker- Up
    controller_1 entrypoint.sh eg ...
    egeoffrey_egeoffrey- docker-entrypoint.sh Up 0.0.0.0:6379->6379/t
    database_1 redis ... cp
    egeoffrey_egeoffrey- sh docker- Restarting
    gateway_1 entrypoint.sh mo ...
    egeoffrey_egeoffrey- sh docker- Up 0.0.0.0:80->80/tcp
    gui_1 entrypoint.sh eg ...
    ellard@machinist:~/egeoffrey$

    One component is "Restarting"

    What do I need to do to solve this issue?



  • I would like to give you some background info on what I am doing.

    I started to install eGeoffrey on one of the two Raspi's which were laying around. Along the way of installing, testing and so on it turned out that the piece did not reboot . Instead it just shot down.

    Therefor I grabbed the second one, a 3B+ version. This one did reboot correctly. But it turned out that something went wrong during installation of eGeoffrey.

    At the moment I am following two roads. On the first Raspi I try to get as far as possible with installation and testing.

    The experience gained I use to put eGeoffrey into service on the second Raspi 3B+.

    The goal is to put eGeoffrey into service with the sensors being hooked up to a ESP8266MQTTmesh. The protocol I implemented is the one from MySensors.org.

    The test of the sensors sending their messages via the ESP mesh is concluded successfully.

    Now eGeoffrey is supposed to do the data processing and presentation.



  • @eporocrail first of all thanks for testing this out and being so patient. That restarting is weird, it could mean the service is continuously restarting itself for some reasons. Try getting out the logs with egeoffrey-cli logs egeoffrey-gateway which is the one restarting looks like. This makes me also think I should put together a ready-to-use raspberry image for an easier setup.
    Your use case fits well, I have something similar running here.



  • @user2684 Maybe I can help a little with making a user description of the procedure to configure the system I am looking for. I am volunteering gladly.



  • @user2684
    Apparently mosquitto is not running. Next to that the mosquitto log file can not be written:

    egeoffrey-gateway_1 | 1591346467: Error: Unable to open log file /mosquitto/logs/gateway.log for writing.
    egeoffrey-gateway_1 | Starting moquitto...
    egeoffrey-gateway_1 | 1591346496: Error: Unable to open log file /mosquitto/logs/gateway.log for writing.
    egeoffrey-gateway_1 | Starting moquitto...
    egeoffrey-gateway_1 | 1591380957: Error: Unable to open log file /mosquitto/logs/gateway.log for writing.
    egeoffrey-gateway_1 | Starting moquitto...
    egeoffrey-gateway_1 | 1591381021: Error: Unable to open log file /mosquitto/logs/gateway.log for writing.
    ellard@machinist:~/egeoffrey$



  • @eporocrail ok thanks, looks like you hit a bug introduced to the very latest updated of the gateway package. If you go and open the file data/gateway/config/mosquitto.conf and change the line log_dest file /mosquitto/logs/gateway.log into log_dest file /mosquitto/log/gateway.log (without the "s") should start just fine. Also just fixed in v1.1-5 in case you will reinstall. Thanks for reporting it.

    Regarding you kindly volunteering to contribute to the documentation, every effort is more than welcome! https://docs.egeoffrey.com/ is supposed to be there to help new users but we are aware it is just a starting point and many useful things can be added. In case you want to add anything, feel free to submit a PR on https://github.com/egeoffrey/docs.egeoffrey.com, it will be published straight away. The website is based on mkdocs.

    Even if the core is pretty solid since almost 3 years old now, eGeoffrey is a quite a new project especially in its new architecture but I strongly believe once you will bring it alive could be really pleasant to use, powerful and flexible, so any contribution feedback and contribution is super-appreciated! 🙂



  • @user2684
    Some years ago I have been playing around with the "my house" version of your system also. I do like the ideas behind it very much. At that time I was not familiar with Jason at all. Now with your fully new approach I like to come to a fully working setup.

    I gave an introductory idea of the system I am looking for to implement. I propose to report my proceedings under that topic. People can then get a more coherent look on what my findings and proceedings are.

    The solution of the change in the mosquito.conf did the job. eGeoffrey woke up.
    From now on I report in my system topic.


Log in to reply