Login to admin portal does nothing and console shows errors

I haven’t been using FileCloud for a few months and so it’s been sitting completely untouched and unchanged. Now when I try to log into the admin portal it does nothing. There are no visible errors or warnings. My credentials also remain loaded in the login page so there probably isn’t even a form reload.

In the browser console I do see these errors:

XML Parsing Error: syntax error
Location: https://obscured-my-domain.com/ui/admin/index.html
Line Number 1, Column 1:

Uncaught TypeError: a is null
rkd cloudadmin-0.js:6230
_O cloudadmin-0.js:977
rX cloudadmin-0.js:1269
s0 cloudadmin-0.js:1436
w0 cloudadmin-0.js:1439
VVf cloudadmin-0.js:11670
iWf cloudadmin-0.js:11682
onreadystatechange cloudadmin-0.js:12697
hKf cloudadmin-0.js:11290
kKf cloudadmin-0.js:11293
jKf cloudadmin-0.js:11292

Does someone have an idea what is happening and what can be done to fix this?

Thank you.

Hello @Unimatrix

Please check and make sure the MongoDB service is running properly on the server.

Also, please share the FileCloud server logs to check this in detail.

Anand, thank you for the steps to take. It seems things must have changed on that server despite personally not doing anything to change them. Here is what you requested:

Mongodb appears not to be running:

# service mongodb status
● mongodb.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

And it doesn’t start:

# service mongodb start
Failed to start mongodb.service: Unit mongodb.service not found.

Where can I upload for you the contents of /var/www/html/scratch/logs/log_2021-05-23.txt? Its size prevents me from pasting it into this comment. Alternatively I could break it into parts and paste those in. Let me know what you prefer.

Hello @Unimatrix

Please run the below commands in the server to check the MongoDB status and restart the service.

~# service mongod status

~# service mongod restart

Once you share the output of these commands, we will share a link to upload the logs.

Here are the results:

# service mongod status
**●**  mongod.service - MongoDB Database Server
   Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
   Active:  **active (running)**  since Mon 2021-03-29 18:50:07 UTC; 1 months 25 days ago
     Docs: https://docs.mongodb.org/manual
 Main PID: 1492 (mongod)
    Tasks: 34
   Memory: 423.2M
      CPU: 3h 37min 34.232s
   CGroup: /system.slice/mongod.service
           └─1492 /usr/bin/mongod --config /etc/mongod.conf

Warning: Journal has been rotated since unit was started. Log output is incomplete or unav

# service mongod restart

There was no output after the restart command.

Then ran the status command again:

# service mongod status
● mongod.service - MongoDB Database Server
   Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-05-24 22:35:59 UTC; 3min 46s ago
     Docs: https://docs.mongodb.org/manual
 Main PID: 20387 (mongod)
    Tasks: 24
   Memory: 141.2M
      CPU: 1.494s
   CGroup: /system.slice/mongod.service
           └─20387 /usr/bin/mongod --config /etc/mongod.conf

May 24 22:35:59 cans-mci systemd[1]: Started MongoDB Database Server.

I reloaded the admin login page after this and saw these errors in the browser console:

XHR POST https://mydomainobscured.com/admin/?time=1621896025949
Status
500 Internal Server Error
VersionHTTP/1.1
Transferred835 B (61 B size)
Referrer Policystrict-origin-when-cross-origin

and

XML Parsing Error: syntax error
Location: https://cans-mci.com/ui/admin/index.html
Line Number 1, Column 1:

@Unimatrix

Please use the below URL to upload the log files.

https://zerg.codelathe.com/url/ahtngbhxfm34dyrw

Also, please let us know which Linux distro are you using.

I’m using Ubuntu 16.04 (LTS) x64. Yesterday I uploaded a log from May 23 and another from today.

@Unimatrix

Thank you for the logs.

Please update us with the results of the below commands.


service fcmqserver status
service fcmqserial status
service fcmqparallel status

php -v
php -m


Here are the results:

# service fcmqserver status
● fcmqserver.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

# service fcmqserial status
● fcmqserial.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

# service fcmqparallel status
● fcmqparallel.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

# php -v
PHP 7.2.34-18+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Feb 23 2021 15:07:41) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.3.2, Copyright (c) 2002-2018, by ionCube Ltd.
    with Zend OPcache v7.2.34-18+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

# php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
http
iconv
intl
ionCube Loader
json
ldap
libxml
mbstring
mcrypt
memcache
mongodb
openssl
pcntl
pcre
PDO
Phar
posix
propro
raphf
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)

Hello @Unimatrix

It looks like the PHP zmq module is not present in the server. Please follow the below instructions to install the module.

~# apt install php7.2-zmq

After you install the module, please run the below commands.


#service fcmqserver restart
#service fcmqserial restart
#service fcmqparallel restart


We will wait for your update on this.

No joy. Here are the results of those commands:

~# apt install php7.2-zmq
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  php7.2-zmq
0 upgraded, 1 newly installed, 0 to remove and 53 not upgraded.
Need to get 35.2 kB of archives.
After this operation, 139 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 php7.2-zmq amd64 1.1.3-18+ubuntu16.04.1+deb.sury.org+1 [35.2 kB]
Fetched 35.2 kB in 0s (74.6 kB/s)
Selecting previously unselected package php7.2-zmq.
(Reading database ... 141806 files and directories currently installed.)
Preparing to unpack .../php7.2-zmq_1.1.3-18+ubuntu16.04.1+deb.sury.org+1_amd64.deb ...
Unpacking php7.2-zmq (1.1.3-18+ubuntu16.04.1+deb.sury.org+1) ...
Setting up php7.2-zmq (1.1.3-18+ubuntu16.04.1+deb.sury.org+1) ...
Processing triggers for php7.2-cli (7.2.34-18+ubuntu16.04.1+deb.sury.org+1) ...
Processing triggers for libapache2-mod-php7.2 (7.2.34-18+ubuntu16.04.1+deb.sury.org+1) ...

root@cans-mci:~# service fcmqserver restart
Failed to restart fcmqserver.service: Unit fcmqserver.service not found.

root@cans-mci:~# service fcmqserial restart
Failed to restart fcmqserial.service: Unit fcmqserial.service not found.

root@cans-mci:~# service fcmqparallel restart
Failed to restart fcmqparallel.service: Unit fcmqparallel.service not found.

Hello @Unimatrix

Please update us on the php -m command output again.

# php -m
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
http
iconv
intl
ionCube Loader
json
ldap
libxml
mbstring
mcrypt
memcache
mongodb
openssl
pcntl
pcre
PDO
Phar
posix
propro
raphf
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
zmq

[Zend Modules]
Zend OPcache
the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)

I’m curious why FileCloud was working, then not using it for a few months and not doing anything to the server, that these required components/services were altered or gone missing. Do you have any idea why this might happen?

Hi @Unimatrix

Thank you for the update.
From the logs you have provided earlier, the system could not work properly due to message queue service issues.
It looks like the service was not able to start after you installed the module as well.

Please update us with the screenshot of this below command.

~# ls -al /etc/systemd/system/

Hello @Unimatrix

It looks like the message queue service files are missing in this location.

We suggest you upgrade the FileCloud Server to the latest version. In the latest version 21.1, we are using a different message queue service.

Please follow the below steps to perform the upgrade.

https://www.getfilecloud.com/supportdocs/display/cloud/LINUX+Upgrade+Script

Also, please take a full server backup/snapshot before you proceed with the upgrade.

The filecloudcp CLI is not found on that system and the issue that we’re trying to solve here is my inability to log into the Admin web UI. Is there a way I can install the filecloudcp CLI using SSH or SCP from my workstation?

Hello @Unimatrix

Please try the below commands.

curl --location https://patch.codelathe.com/tonidocloud/live/installer/filecloudcp -o /usr/bin/filecloudcp
chmod 744 /usr/bin/filecloudcp

If this didn’t work, you can perform the upgrade using the below option.

~# wget http: //patch.codelathe.com/tonidocloud/live/installer/filecloud-liu.sh && bash filecloud-liu.sh

Please make sure there is no older filecloud-liu.sh file present in your current working directory when you run the above command.

I used wget. At the end of the installation I saw this:

2021-06-08 23:22:29: * Switching CLI PHP to 7.4...
2021-06-08 23:22:29: * Switch to PHP 7.4 complete.
find: ‘/etc/php/7.4/cli/conf.d/’: No such file or directory

So I wanted to see what version of PHP is running:

# php -v
PHP 7.2.34-18+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Feb 23 2021 15:07:41) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.3.2, Copyright (c) 2002-2018, by ionCube Ltd.
with Zend OPcache v7.2.34-18+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

The browser no longer loads the admin login page and the base URL for FileCloud now opens the default Apache2 Debian Default Page.

Out of curiosity I wanted to see what would happen when using filecloudcp:

# filecloudcp -u
PHP Fatal error: Uncaught CodeLathe\Core\Common\Exception\TonidoCloudException: Database Error: Failed to load settings in /var/www/html/src/Core/Infrastructure/Settings/SettingsManager.php:1047
Stack trace:
#0 /var/www/html/src/Core/Infrastructure/Settings/SettingsManager.php(436): CodeLathe\Core\Infrastructure\Settings\SettingsManager->getSettingFromDB('TONIDOCLOUD_AUD...', '')
#1 /var/www/html/src/Core/Subsystem/Analytics/Audit/AuditManager.php(98): CodeLathe\Core\Infrastructure\Settings\SettingsManager->getSetting('TONIDOCLOUD_AUD...')
#2 /var/www/html/thirdparty/vendor/php-di/php-di/src/Definition/Resolver/ObjectCreator.php(142): CodeLathe\Core\Subsystem\Analytics\Audit\AuditManager->__construct()
#3 /var/www/html/thirdparty/vendor/php-di/php-di/src/Definition/Resolver/ObjectCreator.php(71): DI\Definition\Resolver\ObjectCreator->createInstance(Object(DI\Definition\ObjectDefinition), Array)
#4 /var/www/html/thirdparty/vendor/php-di/php-di/src/Definition/Resolver/ResolverDispatcher.php(64): DI\Definition\Resolver\ObjectCre in /var/www/html/src/Core/Infrastructure/Settings/SettingsManager.php on line 1047
PHP Fatal error: Uncaught CodeLathe\Core\Common\Exception\TonidoCloudException: Database Error: Failed to load settings in /var/www/html/src/Core/Infrastructure/Settings/SettingsManager.php:1047

Stack trace:
#0 /var/www/html/src/Core/Infrastructure/Settings/SettingsManager.php(436): CodeLathe\Core\Infrastructure\Settings\SettingsManager->getSettingFromDB('TONIDOCLOUD_AUD...', '')
#1 /var/www/html/src/Core/Subsystem/Analytics/Audit/AuditManager.php(98): CodeLathe\Core\Infrastructure\Settings\SettingsManager->getSetting('TONIDOCLOUD_AUD...')
#2 /var/www/html/thirdparty/vendor/php-di/php-di/src/Definition/Resolver/ObjectCreator.php(142): CodeLathe\Core\Subsystem\Analytics\Audit\AuditManager->__construct()
#3 /var/www/html/thirdparty/vendor/php-di/php-di/src/Definition/Resolver/ObjectCreator.php(71): DI\Definition\Resolver\ObjectCreator->createInstance(Object(DI\Definition\ObjectDefinition), Array)
#4 /var/www/html/thirdparty/vendor/php-di/php-di/src/Definition/Resolver/ResolverDispatcher.php(64): DI\Definition\Resolver\ObjectCre in /var/www/html/src/Core/Infrastructure/Settings/SettingsManager.php on line 1047

And:

# filecloudcp -v
20.3.2.13174