Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues when using DNS name instead of IP of server #20

Open
shammyx opened this issue Oct 7, 2021 · 10 comments
Open

Issues when using DNS name instead of IP of server #20

shammyx opened this issue Oct 7, 2021 · 10 comments

Comments

@shammyx
Copy link

shammyx commented Oct 7, 2021

Describe the bug
When I call networkmaps with its IP it mostly works well but as soon as I use the DNS name, I cannot load network maps correctly. There are popping up some errors in the UI with something closed and "Error loading definition file for shape group 5. Connection error." and sometimes also other groups, e.g., "Error loading definition file for shape group 2. Connection error." One cannot see anything in a new diagram, in an existing diagram one sees only some cubes instead of the correct devices.

To Reproduce
Steps to reproduce the behavior:

  1. Login to networkmaps
  2. Click on a previously created diagram
  3. See error

Expected behavior
When I call the server via its DNS name instead of its IP it should work exactly the same way as when IP is used.

Desktop (please complete the following information):

  • OS: Arch Linux with kernel 5.14.9-arch2-1
  • Browser: tested with both, Firefox and Chromium
  • Version: Firefox 93.0, Chromium 94.0.4606.71

Additional context
networkmaps is running on a dedicated testing VM on proxmox, there's nothing else on it. VM is debian 11 bullseye with node v12.22.5. Tested on other machines as well, issue seems to be server-related. I also tried using an apache reverse proxy without any improvements. I also tried to provide the dns name instead of IP in the config "address" field to no avail.
The live log reads as follows:

~/networkmaps# ./server.js
Config file read from default (/etc/networkmaps/config.json)
Use '--config <path_to_cfg_json>' to change config file location.
Configuration file read.

If you like NetworkMaps, consider making a small donation :)

Server running at http://networkmaps.lan:3000/
GET / HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:127.0.0.1 XFORWARDED:192.168.X.X
GET /static/css/index.css HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/js/DOM.js HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/js/index.js HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /favicon.ico HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:127.0.0.1 XFORWARDED:192.168.X.X
WS /user HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/sample1.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/icon.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/account.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/element_b.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/newdiagram.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/usertexture.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/unknown.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/delete.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/settings.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/share.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/linksharing.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/export.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /diagram/8448e01f3953f35d16c3d2d13d1d3064befa7d9f180e870c83e4c0037a47df13 HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:127.0.0.1 XFORWARDED:192.168.X.X
GET /static/css/diagram.css HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/css/diagram_win.css HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/js/three.min.js HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/js/geometries.js HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/js/shapetools.js HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/js/diagram_menu.js HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/js/diagram_wgl.js HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/js/diagram_wgl_font.js HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/js/diagram_ws.js HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/js/diagram_in.js HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/js/diagram_win.js HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/js/diagram.js HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
WS /diagram/8448e01f3953f35d16c3d2d13d1d3064befa7d9f180e870c83e4c0037a47df13 HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
{ name: 'test', type: 'network' }
UUID: 8448e01f3953f35d16c3d2d13d1d3064befa7d9f180e870c83e4c0037a47df13 C: 0 M: Created
UUID: 8448e01f3953f35d16c3d2d13d1d3064befa7d9f180e870c83e4c0037a47df13 C: 0 M: Initialize Called
UUID: 8448e01f3953f35d16c3d2d13d1d3064befa7d9f180e870c83e4c0037a47df13 C: 1 M: Client added
UUID: 8448e01f3953f35d16c3d2d13d1d3064befa7d9f180e870c83e4c0037a47df13 C: 1 M: Diagram loaded.
GET /static/img/home.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/cam3d.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/settings_w.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/camera.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/element.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/new.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/star.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/cam_move.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/cam_rotate.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/textures/b1_t1.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:undefined REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/cam_zoom.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/move.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/shapes/2/definition.json HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:undefined REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/shapes/1/definition.json HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:undefined REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/shapes/3/definition.json HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:undefined REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/shapes/5/definition.json HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:undefined REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/shapes/4/definition.json HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:undefined REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/rotate.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/resize.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/edit.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/base.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/brush.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/move_v.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/textures/b2_t1.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:undefined REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/link_squared.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/palette.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/device_router.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/text.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/link_line.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/link.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/symbol.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/routing.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/link_joint.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/symbol_flag.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/symbol_a.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/symbol_x.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/symbol_v.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined
GET /static/img/bgp.png HOST:networkmaps.lan:3000 USER AGENT:Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0 COOKIE:NetSessionNoSec=c000ef727c61f0eba2f86f13a5230a5c3543feba3f79febc2a61417cca5c1e9d REMOTEIP:::ffff:192.168.X.X XFORWARDED:undefined

Please let me know if you need further details.

@pablomarle
Copy link
Owner

Hello.

Can you provide your config file (without the smtp passwords).

Thanks,
Pablo.

@shammyx
Copy link
Author

shammyx commented Oct 7, 2021

Hi Pablo,
thanks for your quick reply. My current config looks like

{
    "socket": {
        "address": "192.168.56.19",
        "port": 3000
    },
    "sendmail": {
        "server": "mail.lan",
        "port": 25,
        "is_secured": false,
        "user": "none",
        "password": "none",
        "from": "networkmaps@my.domain"
    }
}

Cheers,
Alex

@pablomarle
Copy link
Owner

Hello.

Can you try the option "use_client"? That should fix the issue. This option makes the browser to not use an absolute path when accessing resources from the server.
Your config file would look like this:

{
    "socket": {
        "address": "192.168.56.19",
        "port": 3000
    },
    "server": {
      "use_client": true
    },
    "sendmail": {
        "server": "mail.lan",
        "port": 25,
        "is_secured": false,
        "user": "none",
        "password": "none",
        "from": "networkmaps@my.domain"
    }
}

@shammyx
Copy link
Author

shammyx commented Oct 11, 2021

This worked, thanks! Wouldn't it make sense to make this the default config and put this modified config as default in the docs? One could also add that info to the explanation of "use_client". I'd be happy to help with a pr but it looks like the docs are not in this repo?

This issue can then be closed.

@shammyx
Copy link
Author

shammyx commented Oct 11, 2021

Oh, I just tried the reverse proxy (apache), this is still not working with "use_client", maybe related to the DNS/IP issue, not sure, should I open a new thread?

edit: More details...
I set up an apache reverse proxy with following apache site config

<VirtualHost *:80>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        ProxyPass "/" "http://networkmaps.bsc:3000/"
        ProxyPassReverse "/" "http://networkmaps.bsc:3000/"
</VirtualHost>

If you need, I can post again more, like the ./server.js logs.

@pablomarle
Copy link
Owner

Sorry for the late reply.
I have a similar setup but with NGINX and that is working fine.

I'll try to replicate the issue and let you know if I succeeded.

And yes, it makes sense to have this option as the default. I'll try to update the code :)

@Levvy055
Copy link

Levvy055 commented Dec 1, 2021

Using NGINX as SSL proxy emerges new problems.
WebSocket connection to 'wss://my.subdomain.pl/user' failed:

I have tried to fix it but nothing works:

 "use_ssl_socket": false,
    "use_ssl": true,
    "socket": {
        "address": "my.ip.address",
        "port": 3090
    },
     "server": {
        "hostname": "my.subdomain.pl",
        "port": 443,
        "use_client": true
    },

Without use_ssl the connection is x origin failed
and without port 443 in server part - ERR_SSL_PROTOCOL_ERROR

@pablomarle
Copy link
Owner

Sorry for the late reply.

This is a working nginx sample configuration (I've removed parts that I don't think are strictly needed)

There are two endpoints in networkmaps that are websockets and need special handling in nginx: user and diagram. I suppose this is what is failing on your setup.

Let me know if this helps you in setting up your reverse proxy.

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name app.networkmaps.org;


    ssl_certificate ***************************;
    ssl_certificate_key *************************;

    add_header X-Frame-Options DENY;
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";

    location /diagram {
        proxy_set_header        Host $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto $scheme;

        proxy_pass http://localhost:3000/diagram;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }

    location /user {
        proxy_set_header        Host $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto $scheme;

        proxy_pass http://localhost:3000/user;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }

    location / {
        proxy_set_header        Host $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto $scheme;

        proxy_pass http://localhost:3000;
    }
    client_max_body_size 8M;
}

@shammyx
Copy link
Author

shammyx commented Dec 22, 2021

Hey,
thank you for this nginx configuration file, I'll try tomorrow and will let you know if it solves the problem!

@shammyx
Copy link
Author

shammyx commented Dec 25, 2021

Thanks Pablo!
With your config everything seems to run smoothly and my problems solved. I'll let this issue open in case Levvy has something to add. Feel free to close it.
I think it could be valuable to link to this issue on your readme or to put a section about reverse proxy in your documentation. Maybe both.
All the best and merry Christmas :)

edit: I was not interested in using https so far, but trying it out shows there still seems to be an issue with that. I just used the posted config without the ssl parts and listening on port 80. When I switch to TLS, I just get a blank screen in the browser. The connection is secured, so certificates are working. I can provide logs and try to help figure this thing out, if there's a need. Levvy or Pablo, what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants