OPNsense Forum

Archive => 21.1 Legacy Series => Topic started by: hakuna on June 28, 2021, 03:12:39 am

Title: Router is broken somewhat after 21.1.7_1 update: No ssh as user and update loop
Post by: hakuna on June 28, 2021, 03:12:39 am
Hi,

I've asked this on Reddit but I got no answer. I am hoping someone can help me.

After updating to  21.1.7_1, it seems to have broken few things.
Let me describe how everything started:

1. Update as usual and I got dozens of pop-up: "An API exception occured. Wrong number of parameters"
2. Once the router was back after the reboot, I had  an "An issue was detected" message with the following:

Code: [Select]
PHP Errors:

[23-Jun-2021 14:17:26 Australia/Sydney] BadMethodCallException: Wrong number of parameters in /usr/local/opnsense/www/api.php:26
Stack trace:
#0 /usr/local/opnsense/www/api.php(26): Phalcon\Mvc\Application->handle()
#1 {main}
[23-Jun-2021 14:17:27 Australia/Sydney] BadMethodCallException: Wrong number of parameters in /usr/local/opnsense/www/api.php:26
Stack trace:
#0 /usr/local/opnsense/www/api.php(26): Phalcon\Mvc\Application->handle()
#1 {main}
[23-Jun-2021 14:17:27 Australia/Sydney] PHP Fatal error:  Uncaught Error: Call to undefined method Phalcon\Logger\Adapter\Syslog::info() in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php:646
Stack trace:
#0 /usr/local/opnsense/scripts/firmware/register.php(85): OPNsense\Core\Config->save()
#1 /usr/local/opnsense/scripts/firmware/register.php(192): plugins_config_set(Object(SimpleXMLElement), Array)
#2 {main}
  thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php on line 646
[23-Jun-2021 14:17:28 Australia/Sydney] BadMethodCallException: Wrong number of parameters in /usr/local/opnsense/www/api.php:26
Stack trace:
#0 /usr/local/opnsense/www/api.php(26): Phalcon\Mvc\Application->handle()
#1 {main}
[23-Jun-2021 14:17:31 Australia/Sydney] BadMethodCallException: Wrong number of parameters in /usr/local/opnsense/www/api.php:26
Stack trace:
#0 /usr/local/opnsense/www/api.php(26): Phalcon\Mvc\Application->handle()
#1 {main}
[23-Jun-2021 14:17:32 Australia/Sydney] BadMethodCallException: Wrong number of parameters in /usr/local/opnsense/www/api.php:26
Stack trace:
#0 /usr/local/opnsense/www/api.php(26): Phalcon\Mvc\Application->handle()
#1 {main}
[23-Jun-2021 14:17:33 Australia/Sydney] BadMethodCallException: Wrong number of parameters in /usr/local/opnsense/www/api.php:26
Stack trace:
#0 /usr/local/opnsense/www/api.php(26): Phalcon\Mvc\Application->handle()
#1 {main}
[23-Jun-2021 14:17:34 Australia/Sydney] BadMethodCallException: Wrong number of parameters in /usr/local/opnsense/www/api.php:26
Stack trace:
#0 /usr/local/opnsense/www/api.php(26): Phalcon\Mvc\Application->handle()
#1 {main}

3. I am unable to /firmware#checkupdate or anything under that tab. I get an infinite loop and it gets back to the lobby
4. I cannot ssh using my own user either. Thanks god I was able to enable root to ssh so I can call "pkg update" which seems to be working
5. I did cleaned Firefox cache, cookies, I even tried Chrome which isn't my browser and I am still having the same problems. I found some posts here where cleaning the caching was supposed to fix the problem but it didn't.

At least the basic seems to be working: connecting into the internet!

I am afraid of rolling back the backup and things go nuts.
I am having trust issue right now.

I appreciate any help.

Thank you
Title: Re: Router is broken somewhat after 21.1.7_1 update: No ssh as user and update loop
Post by: opnfwb on June 28, 2021, 11:02:47 pm
I can't speak to the exact cause of the errors but I wanted to see if it was possible to run a health check audit from the firmware page?
Title: Re: Router is broken somewhat after 21.1.7_1 update: No ssh as user and update loop
Post by: hakuna on July 05, 2021, 08:30:55 am
I cannot access anything under firmware section, it gives me a "The upgrade has finished and your device is being rebooted at the moment, please wait... " and that is all about it.
Title: Re: Router is broken somewhat after 21.1.7_1 update: No ssh as user and update loop
Post by: hakuna on July 05, 2021, 09:13:44 am
Problem solved!

Everything was screwed anyways so I went radical, backup checked and that is it.

While checking general log, there were dozens of lines "error in configd communication Traceback (most recent call last): File "/usr/local/opnsense/service/configd_ctl.py", line 68, in exec_config_cmd line = sock.recv(65536).decode() socket.timeout: timed out"

After some Google, it was somehow related to Sensei.
I try to access it and indeed it was crashed like all pages were empty so I used the uninstall option within it to remove everything.

Then I try opensense-update via terminal and few packages was gonna be removed, that was a win already.

I try option 12 and got the same "A firmware action is currently in progress."

Then I did a pkg update -f and why not force the upgrade??
So I did "pkg upgrade -f" and received "The following 137 package(s) will be affected (of 0 checked)"

A big F yes, I have nothing to lose anyway, reboot the router after all and everything is back online.

Fun fact, since 2 updates ago, I could not longer ssh with my users, I had to enable root to ssh the router.
After all the mess above, my user is back and the root user automatically got blocked from ssh the router.

At least everything is working as expected now. F finally.

I hope this help someonw.
Title: Re: Router is broken somewhat after 21.1.7_1 update: No ssh as user and update loop
Post by: dblock on September 28, 2021, 05:29:08 am
I am having the exam same issue. However the step to solve it did not work for me. Is there anything else I can do to allow me to access everything under System > Firmware? When I click anything under that menu I get the following error.

Fatal error: Uncaught Error: Call to undefined method Phalcon\Mvc\Router::setUriSource() in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Routing.php:176 Stack trace: #0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Routing.php(89): OPNsense\Core\Routing->setup() #1 /usr/local/opnsense/mvc/app/config/services.php(99): OPNsense\Core\Routing->__construct('/usr/local/opns...', 'ui') #2 [internal function]: Closure->{closure}() #3 [internal function]: Phalcon\Di\Service->resolve(NULL, Object(Phalcon\Di\FactoryDefault)) #4 [internal function]: Phalcon\Di->get('router', NULL) #5 [internal function]: Phalcon\Di->getShared('router') #6 /usr/local/opnsense/www/index.php(81): Phalcon\Mvc\Application->handle('/ui/') #7 {main} thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Routing.php on line 176
Title: Re: Router is broken somewhat after 21.1.7_1 update: No ssh as user and update loop
Post by: franco on September 28, 2021, 06:24:49 am
Checking the source setUriSource() was removed in 21.1.7 release so your install is trashed. Check your disk health and/or reinstall. I suppose opnsense-bootstrap would work too.

FWIW, it's pretty difficult to jump into somebody else's thread with a "me too" while discarding virtually any information about the issue you are having. It's likely unrelated.


Cheers,
Franco
Title: Re: Router is broken somewhat after 21.1.7_1 update: No ssh as user and update loop
Post by: dblock on September 29, 2021, 12:49:08 am
Well Franco, I thank you for talking the to try to help me out even with what you believe is lack of information. Full disclosure I don't a whole lot about opnsense behind the hood so I was hoping to get some guidance here. So you do have my humbles apologies If I didn't follow you guidelines on what a proper post consists of.
Title: Re: Router is broken somewhat after 21.1.7_1 update: No ssh as user and update loop
Post by: franco on September 29, 2021, 08:18:38 am
First of all which version are you running at the moment (see dashboard system information widget)? It's important because otherwise I might give you wrong commands to run on the console to recover. :)


Cheers,
Franco
Title: Re: Router is broken somewhat after 21.1.7_1 update: No ssh as user and update loop
Post by: hakuna on December 07, 2021, 05:00:13 am
I totally forgot about this.
Long story short, I use force to update both system and OPNSense, it was not easy.

Got everything working again which is awesome, no fresh install, but yeah I have trust issues with the update process, it almost always gives me hard time