Clean 5.0.1.20-PRO install "broken" - Slim Application Error

Before posting something, READ the changelog, WATCH the videos, howto and provide following:
Your install is: Bare metal, ESXi, what CPU model, RAM, HD, what EVE version you have, output of the uname -a and any other info that might help us faster.

Moderator: mike

Post Reply
jangliss
Posts: 3
Joined: Wed Jan 26, 2022 3:03 pm

Clean 5.0.1.20-PRO install "broken" - Slim Application Error

Post by jangliss » Wed Sep 07, 2022 7:36 pm

I've been smashing my head against the desk on this one.

I initially had a 4.x install, and without thinking did an

Code: Select all

apt update && apt upgrade
. After the reboot, the box came up, but none of the labs would start, it appears something broke in the configurations for the network so it could never find the network interfaces or some such. That's fine, I see 5.0.1-20 is out, lets do a clean install.

Fresh install 1) Base OS install fine, logged in as root, go to type the IP address for the management address for initial config using my 10-key numbers. Instead of actually typing numbers, it hoped to the next screen. There's no back button, argh! So I continued thinking it'd complain at the end that I didn't fill some information out, nope. It rebooted with no IP address. Used iDRAC, got onto box, set the IP in /etc/network/interfaces, rebooted, seemed to be okay. Logged in, uploaded a few devices, connected them, booted, devices can't talk to each other. One device can see the other ARPing, the other device sees nothing. Okay, maybe it was the messed up IP address at the beginning.

Fresh install 2) I screwed up and used the 10-key again, scrapped the install, tried again.

Fresh install 3) Installed, used number keys at top of keyboard, finished all items.

- Box rebooted
- Login to console as root
- Ran through management IP setup (static)
- Box rebooted again
- Did apt update, apt upgrade, and apt install eve-ng-dockers
- Login via SSH and added license to /opt/unetlab/html/eve-ng.lic
- Rebooted, for luck.
- Open the web page, try logging in with admin/eve and I cannot login to web interface. Pull up dev tools in browser, and I get the error

Code: Select all

Slim Application Error

The application could not run because of the following error:
Details
Type: ErrorException
Code: 2
Message: file_get_contents(https://127.0.0.1/html5/api/tokens): failed to open stream: HTTP request failed! HTTP/1.1 404
File: /opt/unetlab/html/includes/functions.php
Line: 2193
in

Code: Select all

/opt/unetlab/data/Logs/api.txt
the following error is shown:

Code: Select all

ErrorException: file_get_contents(https://127.0.0.1/html5/api/tokens): failed to open stream: HTTP request failed! HTTP/1.1 404 ^M
 in /opt/unetlab/html/includes/functions.php:2193
Stack trace:
#0 /opt/unetlab/html/includes/functions.php(2193): Slim\Slim::handleErrors()
#1 /opt/unetlab/html/includes/api_authentication.php(254): updateUserToken()
#2 /opt/unetlab/html/api.php(154): apiLogin()
#3 /opt/unetlab/html/includes/Slim/Route.php(468): {closure}()
#4 /opt/unetlab/html/includes/Slim/Slim.php(1357): Slim\Route->dispatch()
#5 /opt/unetlab/html/includes/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#6 /opt/unetlab/html/includes/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#7 /opt/unetlab/html/includes/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
#8 /opt/unetlab/html/includes/Slim/Slim.php(1302): Slim\Middleware\PrettyExceptions->call()
#9 /opt/unetlab/html/api.php(2476): Slim\Slim->run()
#10 {main}
I've skimmed some of the configs, and realize that it's calling through a proxy to Tomcat. Looking in the Tomcat logs, in localhost.<date>.log I see the following:

Code: Select all

07-Sep-2022 16:02:12.560 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [org.apache.guacamole.GuacamoleServletContextListener]
        java.lang.ClassNotFoundException: org.apache.guacamole.GuacamoleServletContextListener
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
                at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
                at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540)
                at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521)
                at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
                ...
Seems like something is broken with tomcat and the guacaome webapp, but not sure why. Anybody got any clues as to what's going on here? I can do another rebuild, but as this is the second time I've hit this, not sure it'll be worth it.

Uldis (UD)
Posts: 5081
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: Clean 5.0.1.20-PRO install "broken" - Slim Application Error

Post by Uldis (UD) » Thu Sep 08, 2022 7:35 pm

Firstly check what EVE Pro version you have

Code: Select all

dpkg -l eve-ng-pro
if it is 5/0/1-20 then try:

Code: Select all

apt-mark hold ifupdown
apt purge -y  tomcat* openjdk* php7.2* 
rm -fr /var/lib/tomcat9/webapps
rm  /etc/guacamole
rm  -fr /usr/share/tomcat9/.guacamole

apt install --reinstall eve-ng-pro
apt-mark unhold ifupdown

jangliss
Posts: 3
Joined: Wed Jan 26, 2022 3:03 pm

Re: Clean 5.0.1.20-PRO install "broken" - Slim Application Error

Post by jangliss » Fri Sep 09, 2022 7:02 pm

It is, indeed, 5.0.1-20:

Code: Select all

~# dpkg -l eve-ng-pro
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-==============================================
ii  eve-ng-pro     5.0.1-20     amd64        A new generation software for networking labs.
However, reinstalling eve-ng-pro package did not appear to help. I still get the 404 from the API service/guacamole

I did notice several errors during the re-install that could contribute possible:

Code: Select all

Check existing SSL Certificate... done
Unpacking eve-ng-pro (5.0.1-20) over (5.0.1-20) ...
Setting up eve-ng-pro (5.0.1-20) ...
Tuning systemd... done
Terminated
Checking SSL... done
Tuning nat interface... done
Why was "tunning" terminated?

Code: Select all

Check Janus... Failed to enable unit: Unit file janus.service does not exist.
Failed to start janus.service: Unit janus.service not found.
done
Creating MySQL backup... done
Looks like maybe a service file didn't get installed either, something else wrong here?

Uldis (UD)
Posts: 5081
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: Clean 5.0.1.20-PRO install "broken" - Slim Application Error

Post by Uldis (UD) » Sat Sep 10, 2022 12:46 pm

again

apt-mark hold ifupdown
apt purge -y tomcat* openjdk* php7.2*
rm -fr /var/lib/tomcat9/webapps
rm /etc/guacamole
rm -fr /usr/share/tomcat9/.guacamole

apt install --reinstall eve-ng-pro
apt-mark unhold ifupdown

jangliss
Posts: 3
Joined: Wed Jan 26, 2022 3:03 pm

Re: Clean 5.0.1.20-PRO install "broken" - Slim Application Error

Post by jangliss » Mon Sep 12, 2022 9:22 pm

Uldis (UD) wrote:
Sat Sep 10, 2022 12:46 pm
again

apt-mark hold ifupdown
apt purge -y tomcat* openjdk* php7.2*
rm -fr /var/lib/tomcat9/webapps
rm /etc/guacamole
rm -fr /usr/share/tomcat9/.guacamole

apt install --reinstall eve-ng-pro
apt-mark unhold ifupdown
Yes, that was what I did, and while going through the reinstall step of eve-ng-pro is when I saw the comment about it terminating the tuning of systemd, and throwing an error about janus.service not being found. Even after those, reboots, and a third time running through it, I still see the same slim application error.

Post Reply