After reboot, Poste has tons of errors, ALL MAIL IS LOST

Issue #141 closed
Michael Shadle created an issue

Updated this because it appears that my mail is gone. Simply gone. The "domains" directory is empty, all my years of important stuff (which I thought I had setup ZFS snapshots for, that's MY fault) has been wiped. Like it doesn't exist. Somehow Poste decided when the domains table didn't exist to just delete the files/directories? or something?

~~~

Have tried latest docker image, sill no good.

The domains table seems to be missing (?) even though the sqlite db is there. what options do I have at this point? Also the nginx sites-enabled is not properly initializing.

# docker exec -it poste poste domain:list

  Error happend during domain listing:
  An exception occurred while executing 'SELECT DISTINCT name_0 FROM (SELECT d0_.name AS name_0, d0_.created AS created_1, d0_.updated AS updated_2 FROM domains d0_) dctrn_result ORDER BY name_0 ASC LIMIT 999999 OFFSET 0':

SQLSTATE[HY000]: General error: 1 no such table: domains


-------------- STACKTRACE --------------

#0 /opt/mailserver-admin/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(116): Doctrine\DBAL\Driver\AbstractSQLiteDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
#1 /opt/mailserver-admin/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(836): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOSqlite\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'SELECT DISTINCT...', Array)
#2 /opt/mailserver-admin/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery('SELECT DISTINCT...', Array, Array, NULL)
#3 /opt/mailserver-admin/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(321): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array)
#4 /opt/mailserver-admin/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(969): Doctrine\ORM\Query->_doExecute()
#5 /opt/mailserver-admin/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(924): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 3)
#6 /opt/mailserver-admin/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(751): Doctrine\ORM\AbstractQuery->execute(NULL, 3)
#7 /opt/mailserver-admin/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php(151): Doctrine\ORM\AbstractQuery->getScalarResult()
#8 /opt/mailserver-admin/src/Analogic/MailserverBundle/CommandInternal/DomainListCommand.php(31): Doctrine\ORM\Tools\Pagination\Paginator->getIterator()
#9 /opt/mailserver-admin/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php(256): Analogic\MailserverBundle\CommandInternal\DomainListCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /opt/mailserver-admin/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(834): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /opt/mailserver-admin/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(Analogic\MailserverBundle\CommandInternal\DomainListCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /opt/mailserver-admin/src/Analogic/MailserverBundle/CommandInternal/Application.php(66): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /opt/mailserver-admin/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(117): Analogic\MailserverBundle\CommandInternal\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /opt/mailserver-admin/bin/mailserver(41): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput))
#15 {main}

---------- EXECUTION OPTIONS -----------

Array
(
    [command] => domain:list
)

Comments (5)

  1. SH repo owner

    There is no such logic to delete directories which are not in database. Also missing table is strange - there is no possible way that poste itself would change database schema. You can try open database with sqlite - but i think that it will be completely empty or damaged...

    I am almost sure that the issue will be higher in docker, filesystem or hardware and your data is lost, i am sorry.

  2. Michael Shadle reporter

    this is a ZFS-backed filesystem, there is no bitrot happening... all I did was reboot the server and when it came back the docker container could no longer do anything and there's no way to get the services to start properly or anything. Even getting a fresh copy of it, no dice. the data directory simply just became like an empty installation, without even a fully formed database.

  3. Log in to comment