302 loop after restoring the database from another xibo server

To be completed by the original poster:

CMS Version

  • 3.0.0 docker release30
docker image --digests
xibosignage/xibo-cms             release30     sha256:5c526519e40dcb2a7a26ebb6412bf532b98f156b9d72fe3e90964fa80f1b6523   c3d8b25d69c9   11 days ago     538MB

Player Type

NA

Player Version

NA

Issue

Background

  • I am able to access xibo under a reverse proxy scenario as described here
    • Access DOMAIN/cmsx/login
    • Able to login, able to click something else in the dashboard etc
  • After the fresh installation on local PC (win10), I decide to load the database from another xibo server to test the setup
    • That xibo server is also running in docker with following version
xibosignage/xibo-cms             release30      sha256:c7411bd40725f1f61f070f4275c144fa25af7547fdf7921aad1d80a9fa0bad78   98e9bfe471c2   8 weeks ago     538MB

About the restoring database

Screenshots

  • 302 loop on /cmsx/login

  • 302 loop on /cmsx/

  • import sql done

image

Logs

  • docker logs
 docker logs docker_xibo-cms-web_1
Waiting for MySQL to start - max 300 seconds        
MySQL started
Updating settings.php
settingId
3
Existing Database, checking if we need to upgrade it
Phinx by CakePHP - https://phinx.org. 0.9.2

using config file .varwwwcmsphinx.php
using config parser php
using migration paths
 - /var/www/cms/db/migrations
warning no environment specified, defaulting to: production
ordering by creation time

 Status  [Migration ID]  Started              Finished             Migration Name
----------------------------------------------------------------------------------
     up  20180130073838  2021-06-18 05:12:16  2021-06-18 05:12:16  InstallMigration
     up  20180131113100  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep85Migration 
     up  20180131113853  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep86Migration 
     up  20180131113941  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep87Migration 
     up  20180131113948  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep88Migration 
     up  20180131113952  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep92Migration 
     up  20180131113957  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep120Migration
     up  20180131114002  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep121Migration
     up  20180131114007  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep122Migration
     up  20180131114013  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep123Migration
     up  20180131114017  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep124Migration
     up  20180131114021  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep125Migration
     up  20180131114025  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep126Migration
     up  20180131114030  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep127Migration
     up  20180131114050  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep128Migration
     up  20180131114058  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep129Migration
     up  20180131114103  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep130Migration
     up  20180131114107  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep131Migration
     up  20180131114110  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep132Migration
     up  20180131114114  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep133Migration
     up  20180131114118  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep134Migration
     up  20180131114123  2021-06-18 05:12:16  2021-06-18 05:12:16  OldUpgradeStep135Migration
     up  20180131122645  2021-06-18 05:12:16  2021-06-18 05:12:16  OneRegionPerPlaylistMigration
     up  20180131123038  2021-06-18 05:12:16  2021-06-18 05:12:16  PlaylistTagsMigration
     up  20180131123248  2021-06-18 05:12:16  2021-06-18 05:12:16  WidgetFromToDtMigration
     up  20180212143336  2021-06-18 05:12:16  2021-06-18 05:12:16  DaypartSystemEntriesAsRecords
     up  20180213173846  2021-06-18 05:12:16  2021-06-18 05:12:16  MailFromNameSettingMigration
     up  20180219141257  2021-06-18 05:12:16  2021-06-18 05:12:16  DisplayGroupClosureIndexToNonUnique
     up  20180223180534  2021-06-18 05:12:16  2021-06-18 05:12:16  DataSetColumnFilterAndSortOptionsMigration
     up  20180302182421  2021-06-18 05:12:16  2021-06-18 05:12:16  WidgetCreatedAndModifiedDtMigration
     up  20180313085749  2021-06-18 05:12:16  2021-06-18 05:12:16  MediaTableEditedIdIndexMigration
     up  20180320154652  2021-06-18 05:12:16  2021-06-18 05:12:16  PlaylistAddDynamicFilterMigration
     up  20180327153325  2021-06-18 05:12:16  2021-06-18 05:12:16  RemoveUserLoggedInMigration
     up  20180514114415  2021-06-18 05:12:16  2021-06-18 05:12:16  FixCaseOnHelpTextFieldMigration
     up  20180515123835  2021-06-18 05:12:16  2021-06-18 05:12:16  LayoutPublishDraftMigration
     up  20180529065816  2021-06-18 05:12:16  2021-06-18 05:12:16  DataSetTruncateFixMigration
     up  20180529073531  2021-06-18 05:12:16  2021-06-18 05:12:16  DisplayAsVncLinkMigration
     up  20180621134013  2021-06-18 05:12:16  2021-06-18 05:12:16  AddWidgetSyncTaskMigration
     up  20180621134250  2021-06-18 05:12:16  2021-06-18 05:12:16  EventLayoutPermissionSettingMigration
     up  20180906115552  2021-06-18 05:12:16  2021-06-18 05:12:16  AddForeignKeysToTagsMigration
     up  20180906115606  2021-06-18 05:12:16  2021-06-18 05:12:16  AddForeignKeysToPermissionsMigration
     up  20180906115712  2021-06-18 05:12:16  2021-06-18 05:12:16  AddForeignKeysToWidgetMediaMigration
     up  20180906131643  2021-06-18 05:12:16  2021-06-18 05:12:16  ForgottenPasswordReminderMigration
     up  20180906131716  2021-06-18 05:12:16  2021-06-18 05:12:16  DataSetRssMigration
     up  20181011160130  2021-06-18 05:12:16  2021-06-18 05:12:17  SimpleSettingsMigration
     up  20181113173310  2021-06-18 05:12:17  2021-06-18 05:12:17  RemoveFinanceModuleMigration
     up  20181113180337  2021-06-18 05:12:17  2021-06-18 05:12:17  SplitTickerModuleMigration
     up  20181126113231  2021-06-18 05:12:17  2021-06-18 05:12:17  Release1812Migration
     up  20181210092443  2021-06-18 05:12:17  2021-06-18 05:12:17  RemoveImageUriModuleMigration
     up  20181212114400  2021-06-18 05:12:17  2021-06-18 05:12:17  CreatePlayerVersionsTableMigration
     up  20181217135044  2021-06-18 05:12:17  2021-06-18 05:12:17  EventSyncMigration
     up  20190121092556  2021-06-18 05:12:17  2021-06-18 05:12:17  PlayerUpgradeAndOverrideConfigMigration
     up  20190125170130  2021-06-18 05:12:17  2021-06-18 05:12:17  PlayerSoftwareVersionFieldMigration
     up  20190129103831  2021-06-18 05:12:17  2021-06-18 05:12:17  AddLinuxDisplayProfileMigration
     up  20190212112534  2021-06-18 05:12:17  2021-06-18 05:12:17  AddProofOfPlayStatsDurationAndCountMigration
     up  20190212115432  2021-06-18 05:12:17  2021-06-18 05:12:17  AddDefaultTransitionDurationSettingMigration
     up  20190213160914  2021-06-18 05:12:17  2021-06-18 05:12:17  AddGlobalStatSettingMigration
     up  20190213162212  2021-06-18 05:12:17  2021-06-18 05:12:17  AddHorizontalMenuSettingMigration
     up  20190214102508  2021-06-18 05:12:17  2021-06-18 05:12:17  AddLayoutEnableStat
     up  20190214102516  2021-06-18 05:12:17  2021-06-18 05:12:17  AddMediaEnableStat
     up  20190220165703  2021-06-18 05:12:17  2021-06-18 05:12:17  AddScheduleRecurrenceMonthlyRepeatsOnMigration
     up  20190227101705  2021-06-18 05:12:17  2021-06-18 05:12:17  MakeDisplayLicenseColumnUniqueMigration
     up  20190228120603  2021-06-18 05:12:17  2021-06-18 05:12:17  AddDynamicCriteriaTagsMigration
     up  20190301115046  2021-06-18 05:12:17  2021-06-18 05:12:17  AdjustGenericfileValidExtensionsMigration
     up  20190315134628  2021-06-18 05:12:17  2021-06-18 05:12:17  AddBandwidthLimitColumnToDisplaygroupMigration
     up  20190322162052  2021-06-18 05:12:17  2021-06-18 05:12:17  AddPublishedDateColumnMigration
     up  20190326163016  2021-06-18 05:12:17  2021-06-18 05:12:17  CreateLayoutHistoryTableMigration
     up  20190328111718  2021-06-18 05:12:17  2021-06-18 05:12:17  AddCampaignStatMigration
     up  20190401150256  2021-06-18 05:12:17  2021-06-18 05:12:17  AddScheduleNowPageMigration
     up  20190509101525  2021-06-18 05:12:17  2021-06-18 05:12:17  CreateReportScheduleTableMigration
     up  20190509102648  2021-06-18 05:12:17  2021-06-18 05:12:17  CreateSavedReportTableMigration
     up  20190509113001  2021-06-18 05:12:17  2021-06-18 05:12:17  AddReportPageMigration
     up  20190510140126  2021-06-18 05:12:17  2021-06-18 05:12:17  TwoFactorAuthMigration
     up  20190514134430  2021-06-18 05:12:17  2021-06-18 05:12:17  NullableTextFieldsMigration
     up  20190515094133  2021-06-18 05:12:17  2021-06-18 05:12:17  AddHtmlDatatypeMigration
     up  20190515105624  2021-06-18 05:12:17  2021-06-18 05:12:17  InstallAdditionalStandardModulesMigration
     up  20190517080033  2021-06-18 05:12:17  2021-06-18 05:12:17  AddForeignKeysToLktagTablesMigration
     up  20190521092700  2021-06-18 05:12:17  2021-06-18 05:12:17  AddReportScheduleTaskMigration
     up  20190521092930  2021-06-18 05:12:17  2021-06-18 05:12:17  AddPreviousRunDateReportScheduleMigration
     up  20190521102635  2021-06-18 05:12:17  2021-06-18 05:12:17  PlaylistDurationUpdateAtTimestamp
     up  20190603083836  2021-06-18 05:12:17  2021-06-18 05:12:17  ChangeStatTableStartEndColumnMigration
     up  20190610150331  2021-06-18 05:12:17  2021-06-18 05:12:17  TagsWithValuesMigration
     up  20190611145607  2021-06-18 05:12:17  2021-06-18 05:12:17  RemoveOldVersionTableMigration
     up  20190612140955  2021-06-18 05:12:17  2021-06-18 05:12:17  DisplayTableDatabaseSchemaAdjustmentsMigration
     up  20190620112611  2021-06-18 05:12:17  2021-06-18 05:12:17  MoveTidyStatsToStatsArchiveTaskMigration
     up  20190620142655  2021-06-18 05:12:17  2021-06-18 05:12:17  AddPlaylistEnableStatMigration
     up  20190626091331  2021-06-18 05:12:17  2021-06-18 05:12:17  WidgetHistoryMigration
     up  20190626110359  2021-06-18 05:12:17  2021-06-18 05:12:17  CreateStatTableMigration
     up  20190628083649  2021-06-18 05:12:17  2021-06-18 05:12:17  AddStatsMigrationTaskMigration
     up  20190710213414  2021-06-18 05:12:17  2021-06-18 05:12:17  AddIsActiveReportScheduleMigration
     up  20190717101342  2021-06-18 05:12:17  2021-06-18 05:12:17  NullableCommandValidationStringMigration
     up  20190719074601  2021-06-18 05:12:17  2021-06-18 05:12:17  MissingDefaultValueMigration
     up  20190725115532  2021-06-18 05:12:17  2021-06-18 05:12:17  AddScheduleReminderTaskMigration
     up  20190801102042  2021-06-18 05:12:17  2021-06-18 05:12:17  DisplayProfileCommandLinkFixMigration
     up  20190801141737  2021-06-18 05:12:17  2021-06-18 05:12:17  DatasetAddCustomHeadersColumnMigration
     up  20190801142302  2021-06-18 05:12:17  2021-06-18 05:12:17  AddDoohUserTypeMigration
     up  20190802145636  2021-06-18 05:12:17  2021-06-18 05:12:17  CreateScheduleReminderTableMigration
     up  20190806144729  2021-06-18 05:12:17  2021-06-18 05:12:17  AddShowContentFromMigration
     up  20190823081448  2021-06-18 05:12:17  2021-06-18 05:12:17  AddImageProcessingTaskMigration
     up  20190828123735  2021-06-18 05:12:17  2021-06-18 05:12:17  AddDefaultSettingResizeLimitResizeThresholdMigration
     up  20190903083314  2021-06-18 05:12:17  2021-06-18 05:12:17  AddGlobalSettingForCascadePermissionsMigration
     up  20190905084201  2021-06-18 05:12:17  2021-06-18 05:12:17  AddSettingForDefaultTransitionTypeMigration
     up  20190905084642  2021-06-18 05:12:17  2021-06-18 05:12:17  AddSettingForAutoLayoutPublishMigration
     up  20190910132520  2021-06-18 05:12:17  2021-06-18 05:12:17  DisplayMoveCmsMigration
     up  20190917093141  2021-06-18 05:12:17  2021-06-18 05:12:17  InterruptLayoutMigration
     up  20190918090608  2021-06-18 05:12:17  2021-06-18 05:12:17  AddDefaultSettingQuickChartMigration
     up  20190919154513  2021-06-18 05:12:17  2021-06-18 05:12:17  AddNotificationAttachmentFilenameNonUsersMigration
     up  20190926135518  2021-06-18 05:12:17  2021-06-18 05:12:17  AddSettingForTransitionAutoApplyToLayoutMigration
     up  20190926140809  2021-06-18 05:12:17  2021-06-18 05:12:17  InstallSavedReportsAndSpacerModulesMigration
     up  20191001092651  2021-06-18 05:12:17  2021-06-18 05:12:17  AddNotificationOriginalFilenameMigration
     up  20191022101141  2021-06-18 05:12:17  2021-06-18 05:12:17  AddCommandEntityToPermissionEntityMigration
     up  20191024152519  2021-06-18 05:12:17  2021-06-18 05:12:17  AddScheduleExclusionsTableMigration
     up  20191122114104  2021-06-18 05:12:17  2021-06-18 05:12:17  FixDuplicateModuleFilesMigration
     up  20191126103120  2021-06-18 05:12:17  2021-06-18 05:12:17  GeoScheduleMigration
     up  20191126141140  2021-06-18 05:12:17  2021-06-18 05:12:17  RemoteDataSetCsvSourceMigration
     up  20191205180116  2021-06-18 05:12:17  2021-06-18 05:12:17  AddPlaylistDashboardPageUserMigration
     up  20200107082625  2021-06-18 05:12:17  2021-06-18 05:12:17  DisplayAddResolutionMigration
     up  20200115115935  2021-06-18 05:12:17  2021-06-18 05:12:17  AddReportScheduleMessageMigration
     up  20200122143630  2021-06-18 05:12:17  2021-06-18 05:12:17  AddReleasedRequiredFileMigration
     up  20200122191232  2021-06-18 05:12:17  2021-06-18 05:12:17  AddCommercialLicenceColumnMigration
     up  20200129104944  2021-06-18 05:12:17  2021-06-18 05:12:17  AddEngagementsStatsMigration
     up  20200130165443  2021-06-18 05:12:17  2021-06-18 05:12:17  CountdownModuleAddMigration
     up  20200311110512  2021-06-25 10:32:59  2021-06-25 10:32:59  AddIsDrawerColumnMigration
     up  20200311110535  2021-06-25 10:32:59  2021-06-25 10:32:59  CreateActionTableMigration
     up  20200319093235  2021-06-25 10:32:59  2021-06-25 10:33:00  ChangeInterruptLayoutMigration
     up  20200401121544  2021-06-25 10:33:00  2021-06-25 10:33:00  AddSystemUserSettingMigration
     up  20200407143200  2021-06-25 10:33:00  2021-06-25 10:33:00  AddCodeColumnToLayoutMigration
     up  20200422101006  2021-06-25 10:33:00  2021-06-25 10:33:00  AddDataSetRowLimitMigration
     up  20200427085958  2021-06-25 10:33:00  2021-06-25 10:33:00  AddReportScheduleStartEndMigration
     up  20200530103029  2021-06-25 10:33:00  2021-06-25 10:33:00  DisplayRemoteLinksMigration
     up  20200604103141  2021-06-25 10:33:00  2021-06-25 10:33:00  CommandImprovementsMigration
     up  20200612141755  2021-06-25 10:33:00  2021-06-25 10:33:00  OauthUpgradeMigration
     up  20200720092246  2021-06-25 10:33:00  2021-06-25 10:33:00  AddSavedReportSchemaVersionMigration
     up  20200916134817  2021-06-25 10:33:00  2021-06-25 10:33:00  RemoveOldScreenshotsMigration
     up  20200917140227  2021-06-25 10:33:00  2021-06-25 10:33:00  DisplayGroupCreatedModifiedDates
     up  20201007080829  2021-06-25 10:33:00  2021-06-25 10:33:00  AddFoldersMigration
     up  20201007093511  2021-06-25 10:33:00  2021-06-25 10:33:00  FeaturesMigration
     up  20201025153753  2021-06-25 10:33:00  2021-06-25 10:33:00  RemoveOldPermissionSettingsMigration
     up  20210105105646  2021-06-25 10:33:00  2021-06-25 10:33:00  AddMcaasScopeAndRouteMigration
     up  20210113134628  2021-06-25 10:33:00  2021-06-25 10:33:00  EnableUserSharingFeatureOnUsersGroupMigration
     up  20210201150259  2021-06-25 10:33:00  2021-06-25 10:33:00  UserOnboardingMigration
     up  20210305131937  2021-06-25 10:33:00  2021-06-25 10:33:00  FixDuplicateTagsMigration
     up  20210407111756  2021-06-25 10:33:00  2021-06-25 10:33:00  RemoveReportNameColumnFromSavedReportMigration
     up  20210601104441  2021-06-25 10:33:00  2021-06-25 10:33:00  AddUserAgentToDataSetMigration

Importing ca-certs
cp: can't stat '/var/www/cms/ca-certs/*.pem': No such file or directory
cp: can't stat '/var/www/cms/ca-certs/*.crt': No such file or directory
WARNING: ca-certificates.crt does not contain exactly one certificate or CRL: skipping
Setting up Quickchart
Configuring Maintenance
Setting up CMS alias
Removing web/install/index.php from production container
Starting cron
Starting webserver
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.30.0.7. Set the 'ServerName' directive globally to suppress this message
  • container log
cat /var/www/logs/access.log
...
172.30.0.2 - - [31/Aug/2021:08:51:19 +0000] "GET /cmsx/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
172.30.0.2 - - [31/Aug/2021:08:51:20 +0000] "GET /cmsx/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
172.30.0.2 - - [31/Aug/2021:08:51:20 +0000] "GET /cmsx/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
172.30.0.2 - - [31/Aug/2021:08:51:20 +0000] "GET /cmsx/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
172.30.0.2 - - [31/Aug/2021:08:51:20 +0000] "GET /cmsx/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
172.30.0.2 - - [31/Aug/2021:08:51:20 +0000] "GET /cmsx/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
172.30.0.2 - - [31/Aug/2021:08:51:20 +0000] "GET /cmsx/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
172.30.0.2 - - [31/Aug/2021:08:51:20 +0000] "GET /cmsx/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
172.30.0.2 - - [31/Aug/2021:08:51:20 +0000] "GET /cmsx/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
...
  • Database can be restored

Any one know why is this happening?

I figure this out.

The looping is due to FORCE_HTTPS setting. My original server is running in HTTPS while my new server (development) is running in HTTP. If I import the database (the backup database) directly into my HTTP (development) server, there is a loop between HTTP, and HTTPS since FORCE_HTTPS is enabled.

In order to turn off FORCE_HTTPS, we can follow instructions in this post

IMO, is it possible to add an environment SET_FORCE_HTTPS such that entrypoint.sh can do this update at all?

The Xibo Community site uses cookies. What are cookies?