Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Server Update woes
#1
Hello,

Longtime user, big fan of your work. Thank you for everything you've done.

Hashtopolis: 0.5.1
PHP: 7.0.33
MariaDB: 10.1.37


I'm attempting to upgrade the server to latest, and come across an odd hurdle.

I backed up db.php, Encryption.class.php and files/
Trashed it,
Put https://archive.hashtopolis.org/server/all/0.10.1.zip files in,
replace db.php, Encryption.class.php and files/
jump into install/updates/

When I attempt "php -f update_v0.5.x_v0.6.0.php", it has a total hissyfit:
PHP Parse error:  syntax error, unexpected '=' in /var/www/html/install/updates/update_v0.5.x_v0.6.0.php on line 13

That line simply being "Factory = new Factory();"

Literally the first line after the includes.


Help would be hugely appreciated.
Reply
#2
That's a pretty old version you got there Smile

Could you try if it works if you just remove that faulty line? It might be a leftover from an older update procedure file which is not needed anymore as the factory was changed to a singleton pattern.
Reply
#3
Sure thing, after commenting it out I got this:

Code:
Apply updates...
Check agent binaries... PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updateTrack' in 'field list' in /var/www/html/dba/AbstractModelFactory.class.php:569
Stack trace:
#0 /var/www/html/dba/AbstractModelFactory.class.php(569): PDOStatement->execute(Array)
#1 /var/www/html/dba/models/AgentBinaryFactory.class.php(54): DBA\AbstractModelFactory->filter(Array, true)
#2 /var/www/html/inc/Util.class.php(194): DBA\AgentBinaryFactory->filter(Array, true)
#3 /var/www/html/install/updates/update_v0.5.x_v0.6.0.php(18): Util::checkAgentVersion('python', '0.1.4')
#4 {main}
 thrown in /var/www/html/dba/AbstractModelFactory.class.php on line 569



Progress is progress. Tongue

I may rollback this VM and retry (with the line 13 factory commented out of course) to ensure I didn't do something stupid.

Mind you if the above can't find a column in the DB, either something's out of sync with the update vs the DB, or the dba code is too far ahead of the schema to work properly anymore.


Any hints? Tongue
Reply
#4
The issue is that the update script is that old, that some components which the update script depends on were changed and don't work on the really old DB anymore.

But I think you should be fine if you also just remove the lines where the agent update is checked (because that's the part where it uses some changed function). So just remove the following lines:

Code:
echo "Check agent binaries... ";
Util::checkAgentVersion("python", "0.1.4");
Util::checkAgentVersion("csharp", "0.52.2");
echo "\n";
Reply
#5
Side note (this is on a completely different test installation)
I also just noticed in the new one 0.10.1, in /tasks.php it's not showing the TOTAL hashes under the agent column (ie: 2 @483.91 kH/s ). That figure is definitely not the total of the 2 agents.
Going into the task and reading the graph or speed however shows the correct amount. It seems the figure in /tasks.php is the speed of the last checked in agent?
Reply
#6
Yep that worked, up to update_v0.8.0_v0.9.0.php .

Code:
NOTICE: After this update the Peppers for Encryption.class.php and CSRF.class.php are stored in the new config file. So if you didn't merge them you would have to put the old pepper values into inc/conf.php to make the log in working again. Read more on this on the specific release information.
Apply updates...
Moving db config... OK
Check agent binaries... PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updateTrack' in 'field list' in /var/www/html/dba/AbstractModelFactory.class.php:569
Stack trace:
#0 /var/www/html/dba/AbstractModelFactory.class.php(569): PDOStatement->execute(Array)
#1 /var/www/html/dba/models/AgentBinaryFactory.class.php(54): DBA\AbstractModelFactory->filter(Array, true)
#2 /var/www/html/install/updates/update_v0.8.0_v0.9.0.php(31): DBA\AgentBinaryFactory->filter(Array, true)
#3 {main}
 thrown in /var/www/html/dba/AbstractModelFactory.class.php on line 569


It's just moved/changed the DB conf, so on the next run of this the DB is unusable to update.  Tongue
I'll rollback the snapshot and start over.


So, for update_v0.8.0_v0.9.0 the errored line is thrown at 31, which is:




Code:
  $binary = Factory::getAgentBinaryFactory()->filter([Factory::FILTER => $qF], true);
  if ($binary != null) {
    if (Util::versionComparison($binary->getVersion(), "0.3.0") == 1) {
      echo "update python version... ";
      $binary->setVersion("0.3.0");
      Factory::getAgentBinaryFactory()->update($binary);
      echo "OK";
    }
  }



How hosed am I?
Reply
#7
I've had a bit of a fiddle around, however I'm definitely unable to proceed.

Any thoughts?

Am I doomed to start over?
Reply
#8
I'm having the exact same problem. My installation was fully functional running on v.0.8.0 and I'm wanting to update. I've rolled back a backup several times and keep trying to see where I may have gone wrong but it seems that I didn't break it this time.


Apply updates...
Moving db config... OK
Check agent binaries... PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updateTrack' in 'field list' in /var/www/hashtopolis/dba/AbstractModelFactory.class.php:569
Reply
#9
Your error looks like the same as the original one from this thread, did you already try to do what I wrote in this post? https://hashtopolis.org/thread-211-post-293.html#pid293

If you encounter the same as here: https://hashtopolis.org/thread-211-post-295.html#pid295 just also try to remove the part which SomeFellow mentioned beeing the reason for it to fail.

All these errors happen on non-critical update parts, so it's not a big deal to remove them in order to get the update working.
Reply
#10
(05-26-2019, 11:06 AM)s3in!c Wrote: Your error looks like the same as the original one from this thread, did you already try to do what I wrote in this post? https://hashtopolis.org/thread-211-post-293.html#pid293

If you encounter the same as here: https://hashtopolis.org/thread-211-post-295.html#pid295 just also try to remove the part which SomeFellow mentioned beeing the reason for it to fail.

All these errors happen on non-critical update parts, so it's not a big deal to remove them in order to get the update working.

I missed that part somehow. You're amazing! I was able to update all the way to the current version!

All I had to remove was this section.

  echo "Check agent binaries... ";
  $qF = new QueryFilter(AgentBinary::TYPE, "python", "=");
  $binary = Factory::getAgentBinaryFactory()->filter([Factory::FILTER => $qF], true);

Thank You!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)