Page 1 of 1
Connecting to host name instead of IP address
Posted: 21 Aug 2022, 19:42
by thowe
When using the system host name, the login page is displayed,
but there is an error shown that says:
"Error fetching access token!
NetworkError when attempting to fetch resource."
Nothing is displayed in the log.
I have seen a topic in this forum on this issue, and it says that if I have "corsAllowOrigin=*"
set that this issue should be fixed. However, I have set corsAllowOrigin=* , and verified that it is set
by using "--print-config". However, this issue persists.
What must be done to fix this in the short term?
In future I plan to use Apache or Nginx in front of the server, but while testing I would like
to use host name.
Also, are there instructions on using nginx or Apache as a proxy? I did not see this in the docs.
Re: Connecting to host name instead of IP address
Posted: 23 Aug 2022, 01:51
by gregober
thowe wrote: ↑21 Aug 2022, 19:42
When using the system host name, the login page is displayed,
but there is an error shown that says:
"Error fetching access token!
NetworkError when attempting to fetch resource."
Nothing is displayed in the log.
This is probably related to DNS settings in the hosting server.
Can you confirm that you can resolve the FQDN you are accessing the DynFi Manager service with ?
thowe wrote: ↑21 Aug 2022, 19:42
I have seen a topic in this forum on this issue, and it says that if I have "corsAllowOrigin=*"
set that this issue should be fixed. However, I have set corsAllowOrigin=* , and verified that it is set
by using "--print-config". However, this issue persists.
What must be done to fix this in the short term?
In future I plan to use Apache or Nginx in front of the server, but while testing I would like
to use host name.
Also, are there instructions on using nginx or Apache as a proxy? I did not see this in the docs.
The setting with
should be ok.
More info can be found here :
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
Regarding config for reverse proxy, you can check this topic:
viewtopic.php?t=205
Or you can "get inspired" by this Nginx DynFi Manager config
Code: Select all
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name your.name.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2 default_server;
listen [::]:443 ss1 http2 default_server;
server_name your.name.com;
location /config.js {
proxy_pass http://192.168.xxx.yyy:9090;
sub_filter http://192.168.xxx.yyy:9090' 'https://$shost';
sub_filter_types"*";
}
location / {
proxy_passhttp://192.168.xxx.yyy:9090;
}
ssl_dhparam/etc/ssl/certs/dhparam.pem;
ssl_certificate/etc/ssl/dynfi/bundle.crt;
ssl_certificate_key/etc/ssl/dynfi/client.dynfi.com.key;
}
Of course, you'll need to generate your cert and all things tied to this.
Re: Connecting to host name instead of IP address
Posted: 23 Aug 2022, 03:20
by thowe
This is probably related to DNS settings in the hosting server.
Can you confirm that you can resolve the FQDN you are accessing the DynFi Manager service with ?
Yes the host name I am using is the public name of the machine itself.
It has both A and AAAA records...
Is it possible it is confused by the presence of the v6 record?
Could it be trying to use that to access something else like the mongodb database?
I am only running Dynfi at the public v4 address, so if it is trying to do something with the AAAA record it maybe shouldn't(?)
Re: Connecting to host name instead of IP address
Posted: 23 Aug 2022, 06:37
by gregober
Normally the default way to access the DynFi Manager is either :
or
It should work with either IPv4 or IPv6.
Can you access your service with any of these methods?
Re: Connecting to host name instead of IP address
Posted: 24 Aug 2022, 04:24
by thowe
Yes, IP address works fine.
Host name also connects, and the login screen is displayed.
But it also displays the error, and login fails. See my original post.
Re: Connecting to host name instead of IP address
Posted: 26 Aug 2022, 11:09
by gregober
Which system are you running dynfi manager on ?
Re: Connecting to host name instead of IP address
Posted: 27 Aug 2022, 06:58
by thowe
gregober wrote: ↑26 Aug 2022, 11:09
Which system are you running dynfi manager on ?
OpenBSD 7.1
OpenJDK 11
Re: Connecting to host name instead of IP address
Posted: 29 Aug 2022, 08:45
by gregober
thowe wrote: ↑27 Aug 2022, 06:58
gregober wrote: ↑26 Aug 2022, 11:09
Which system are you running dynfi manager on ?
OpenBSD 7.1
OpenJDK 11
While our app should work on OpenBSD or FreeBSD, this is not part of the supported system that we are advertising.
I would strongly suggest that you try installing DynFi Manager on Ubuntu / Debian / RedHat / Suze types of Linux systems.
Some users have managed to make the app work on Windows (though this system is not supported), so I have no doubt that you can manage to make this work, but It would be more difficult for us to help you debug your installation.