NetXMS Support Forum

Please login or register.

Login with username, password and session length

Author Topic: Issue with the Web console after upgrading to 2.1-M1  (Read 4237 times)

adimitrov

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Issue with the Web console after upgrading to 2.1-M1
« on: October 17, 2016, 01:38:48 pm »

Hello Team ,

I have an issue with the web console. I upgraded my 2.0.6 test server to 2.1-M1 and it works, the console manager is working also, but the web application is not.

i get the error:

Not Found

The requested URL /nxmc/ was not found on this server.

Apache/2.2.22 (Debian) Server at 10.10.10.73 Port 80

I just replaced the war files as it is in the admin guide. Java and tomcat7 are running. Getting in the apache error log i can see :

[Mon Oct 17 13:30:08 2016] [error] [client 10.11.10.149] File does not exist: /var/www/nxmc

Why tomcat7 is searching for nxmc folder in /var/www, i know this is the documentroot, but before the upgrade it was working perfectly fine.

Changing the decumentroot in /etc/apache2/sites-enable/ doesn't solve the issue.

Any ideas ?

Thanks,

Best regards,
Adrian
Logged

tomaskir

  • Sr. Member
  • ****
  • Posts: 435
  • https://unimus.net
    • View Profile
Re: Issue with the Web console after upgrading to 2.1-M1
« Reply #1 on: October 17, 2016, 01:44:53 pm »

How is your apache tied to your Tomcat?
Are you using just a redirect, or mod_proxy, or something similar?

With default configs, Tomcat runs on 8080, and nothing you do in Tomcat has nothing to do with apache config, nor /var/www nor /etc/apache2/sites-enable/.

You need to look in Tomcat logs, which are usually in /var/log/tomcat/catalina.out (depends on your config tho).
Logged

adimitrov

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Issue with the Web console after upgrading to 2.1-M1
« Reply #2 on: October 17, 2016, 02:00:37 pm »

Hi Tomas, team,

it is the default installation of tomcat7 and i never changed a thing in it's configuration.

there is the tomcat7 log:

Oct 17, 2016 12:00:39 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-443"]
Oct 17, 2016 12:00:39 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 6995 ms
Oct 17, 2016 12:00:39 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Oct 17, 2016 12:00:39 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.28
Oct 17, 2016 12:00:39 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/nxmc.war
Oct 17, 2016 12:00:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Oct 17, 2016 12:00:56 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-443"]
Oct 17, 2016 12:00:56 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 17541 ms
Oct 17, 2016 12:10:37 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/nxmc]
Oct 17, 2016 12:10:38 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/nxmc.war

Seems that the archive was deployed just fine, but still i get the error.

Best regards,
Adrian
Logged

Alex Kirhenshtein

  • Team Member
  • Administrator
  • Hero Member
  • *****
  • Posts: 912
    • View Profile
Re: Issue with the Web console after upgrading to 2.1-M1
« Reply #3 on: October 17, 2016, 02:04:09 pm »

Make sure you are running Java8
Logged

tomaskir

  • Sr. Member
  • ****
  • Posts: 435
  • https://unimus.net
    • View Profile
Re: Issue with the Web console after upgrading to 2.1-M1
« Reply #4 on: October 17, 2016, 02:41:53 pm »

It seems to me like you are accessing on port 80 (where Apache runs), but you should be accessing on port 8080 (where Tomcat runs).

Make sure you connect using http://server_address:8080/nxmc/.
Logged

adimitrov

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Issue with the Web console after upgrading to 2.1-M1
« Reply #5 on: October 17, 2016, 04:50:34 pm »

Hey Victor, Tomas,

I installed jdk8, but still have the issue.

Following Tomas advise it seems that nothing is listening on port 8080:

tcp        0      0 127.0.0.1:8005          0.0.0.0:*               LISTEN      8568/java
tcp        0      0 0.0.0.0:3817            0.0.0.0:*               LISTEN      2679/ytlinsdr
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3095/sshd
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      3899/master
tcp        0      0 0.0.0.0:4700            0.0.0.0:*               LISTEN      2245/nxagentd
tcp6       0      0 :::80                   :::*                    LISTEN      2781/apache2
tcp6       0      0 :::22                   :::*                    LISTEN      3095/sshd
tcp6       0      0 :::25                   :::*                    LISTEN      3899/master
tcp6       0      0 :::443                  :::*                    LISTEN      8568/java
tcp6       0      0 :::4700                 :::*                    LISTEN      2245/nxagentd


And i get "connection refused" Trying to connect to the web application using the IPaddress:8080/nxmc.

Any idea what could be causing this behavior and how to make it listen to 8080 port ?

Thanks,

Best regards,
Adrian
Logged

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 6509
    • View Profile
Re: Issue with the Web console after upgrading to 2.1-M1
« Reply #6 on: October 18, 2016, 08:50:27 am »

Hi,

from log and netstat it seems that Tomcat listens only on port 443 (not sure from the log if it expects https or plain http connection though).

Best regards,
Victor
Logged

radw

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Issue with the Web console after upgrading to 2.1-M1
« Reply #7 on: April 19, 2017, 12:43:55 am »

Hello, I want to share my solution for tomcat7:

1) Upgrade to Java8 (Alex recomendation): https://tecadmin.net/install-java-8-on-debian/
2) On  /etc/default/tomcat7 add line JAVA_HOME=/usr/lib/jvm/java-8-oracle, and restart tomcat7 service
3) I deleted my past 2.1-m3 .war's , deploy the new 2.1-m3 .war, and it work

Regards
Logged