NetXMS Support Forum

English Support => General Support => Topic started by: squeezypiano on September 16, 2020, 12:16:20 PM

Title: Web console installation
Post by: squeezypiano on September 16, 2020, 12:16:20 PM
I am trying to run the latest (3.5.90) WebApp on Ubuntu 20.04 with Jetty but get this when I browse to the URL.  Have tried different versions of Java and also tried Tomcat as well.  What have I missed?  Thanks.

{"description":"NetXMS web service API version 3.5.90","version":"3.5.90","build":"3.5-90-g215397d8e7"}
Title: Re: Web console installation
Post by: Victor Kirhenshtein on September 16, 2020, 01:31:42 PM
Hi,

looks like you've deployed web API instead of web interface (GUI application). You have to deploy this war file: https://netxms.org/download/releases/3.5/nxmc-3.5.90.war

Best regards,
Victor
Title: Re: Web console installation
Post by: squeezypiano on September 16, 2020, 02:10:07 PM
Yeah, that would do it.  Apologies.  All the usual excuses but none of them valid  ::)
Title: Re: Web console installation
Post by: squeezypiano on September 16, 2020, 04:55:15 PM
OK, so now I can get the page to load but it will not log in.  System is Ubuntu 20.04 (also tried on 18.04) and tried with native JDK, openjdk-8-jdk on both jetty9 and tomcat9 but all combinations it fails with 'connect timed out'.  Server is running and can connect from desktop console and WebUI is installed on the same machine as the server with firewall disabled.  What am I missing?
Title: Re: Web console installation
Post by: Victor Kirhenshtein on September 17, 2020, 02:14:09 PM
Can you login with desktop client? If yes, please send Jetty/Tomcat log.

Best regards,
Victor
Title: Re: Web console installation
Post by: squeezypiano on September 21, 2020, 11:01:57 AM
Hi Victor.
Log files attached following a clean install.
Many thanks.
Title: Re: Web console installation
Post by: Filipp Sudanov on September 22, 2020, 11:58:07 AM
Hi!

Did you try to connect from desktop client, not the web one? Did you suceed?
Title: Re: Web console installation
Post by: squeezypiano on September 22, 2020, 12:03:24 PM
Yes, desktop client is working just fine.
Title: Re: Web console installation
Post by: squeezypiano on October 01, 2020, 11:09:08 PM
Is anyone able to help, please?  Still cannot get it working.  Here is what I did on Ubuntu 20.04 to install...

wget http://packages.netxms.org/netxms-release-latest.deb
dpkg -i netxms-release-latest.deb

apt-get update

apt-get dist-upgrade -y

apt-get install postgresql postgresql-contrib tomcat9 -y

sudo -u postgres psql

CREATE DATABASE netxms;
CREATE ROLE netxms WITH LOGIN;
\password netxms
GRANT ALL PRIVILEGES ON DATABASE netxms TO netxms;
\q

apt-get install netxms-server netxms-dbdrv-pgsql netxms-agent -y

nano /etc/netxmsd.conf <-- uncomment psql and add password

nxdbmgr init

systemctl enable netxmsd
systemctl restart netxmsd

cd /tmp
wget https://www.netxms.org/download/releases/3.5/nxmc-3.5.90.war
mv nxmc-3.5.90.war /var/lib/tomcat9/webapps/nxmc.war
Title: Re: Web console installation
Post by: Filipp Sudanov on October 02, 2020, 03:08:55 PM
Hi!

Just tried your installation sequence on fresh ubuntu 20.04, nxmc correctly opens on port 8080
Title: Re: Web console installation
Post by: squeezypiano on October 02, 2020, 03:14:37 PM
Thanks, but I don't think I have SSL enabled and the page loads fine just will not connect to the service.  When I try to log in I get 'Connection error, connected timed out'.  Does it need SSL enabling?
Title: Re: Web console installation
Post by: Filipp Sudanov on October 02, 2020, 03:16:41 PM
I had error when tried to connect to 8080 via https. Should just use http.
Title: Re: Web console installation
Post by: squeezypiano on October 02, 2020, 03:17:56 PM
Ah, yes, OK.  So HTTP loads but gives the connect error when I try to log in.  The server is running and I can connect from the desktop console just not the WebUI.
Title: Re: Web console installation
Post by: Filipp Sudanov on October 02, 2020, 04:06:31 PM
Just in case, show nxmc log file:
/var/lib/tomcat9/work/Catalina/localhost/nxmc/eclipse/workspace/.metadata

Try deleting tomcat workspace:
stop tomcat process
delete /var/lib/tomcat9/work folder
start tomcat again

Title: Re: Web console installation
Post by: squeezypiano on October 02, 2020, 06:13:27 PM
Oh now that's interesting.  Hadn't found that log file but in there it has:

!MESSAGE Server address resolved from NETXMS_SERVER: x.x.x.x

The address being returned is not the address of itself but for the @ record for the machine's domain, which in this case is a public address.  What is it trying to resolve to get that?  As far as I can tell /etc/hosts and DNS are set up correctly.
Title: Re: Web console installation
Post by: Filipp Sudanov on October 02, 2020, 07:06:08 PM
Seems that you do have a DNS records NETXMS_SERVER or it's in your hosts file. Web console uses it as one of the options for situations when web console in installed on another machine. See here:
https://www.netxms.org/documentation/adminguide/installation.html?highlight=netxms_server#installing-web-interface-on-remote-system
Title: Re: Web console installation
Post by: squeezypiano on October 02, 2020, 07:59:22 PM
I definitely do not have an entry anywhere but by adding it I can now log in to the WebUI.  So does it not attempt local before checking for NETXMS_SERVER or should there always be an entry for NETXMS_SERVER?
Title: Re: Web console installation
Post by: Filipp Sudanov on October 03, 2020, 02:52:38 AM
It tries several ways, as per documentation, to get server address and takes localhost as last resort. Normally none of these is set. Could be that something changed after you launched the web api on that server.
Title: Re: Web console installation
Post by: squeezypiano on October 03, 2020, 05:00:48 PM
Thanks so much for the help and guidance, it's much appreciated.  All working happily now and my frustration is over :)