Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Linux Proget Upgrade 4.6.7 to 4.7.4 Fails



  • I've been running the linux proget container solution for some time and want to upgrade from 4.6.7 to 4.7.4, however when launching the new container for 4.7.4 pointing to the existing postgres DB, it stops without any error message. I've also tried other versions of 4.7.x without success.

    This is the full log from docker run to exit:

    Determining which change scripts need to be run...
    4 change scripts need to be run.
    10. Add download retention.sql executed successfully.
    10. Add License Filters.sql failed: 2BP01: cannot drop table "FeedLicenseUrls" because other objects depend on it
    20. VSIX Feeds.sql executed successfully.
    10. Add context to logs.sql executed successfully.

    Executing additional scripts...
    0.INIT/1.DropFunctions.sql...
    1.FUNCTIONS/2.ParseNuGetVersion.sql...
    2.VIEWS/1.DashboardFeeds_VulnerabilityAssessments.sql...
    2.VIEWS/1.DashboardPackages_Largest.sql...
    2.VIEWS/1.DashboardPackages_Latest.sql...
    2.VIEWS/1.DockerRepositories.sql...
    2.VIEWS/1.EventOccurrences_Users.sql...
    2.VIEWS/1.FeedConnectors_Extended.sql...
    2.VIEWS/1.FeedRetentionRules_Extended.sql...
    2.VIEWS/1.LicenseRules_Extended.sql...
    42P01: relation "LicenseRules" does not exist
    2.VIEWS/1.LogMessages_Categories.sql...
    2.VIEWS/1.LogMessages_Extended.sql...
    2.VIEWS/1.MavenArtifactFiles_Extended.sql...
    2.VIEWS/1.MavenArtifacts_Extended.sql...
    2.VIEWS/1.MavenArtifacts_Versions.sql...
    2.VIEWS/1.NpmPackages_AllVersions.sql...
    2.VIEWS/1.NpmPackages_Latest.sql...
    2.VIEWS/1.NuGetFeeds_Extended.sql...
    2.VIEWS/1.NuGetPackages_Extended.sql...
    2.VIEWS/1.NuGetPackages_Latest.sql...
    2.VIEWS/1.NuGetPackages_LatestStable.sql...
    2.VIEWS/1.PackagePromotions_Extended.sql...
    2.VIEWS/1.Packages_Combined.sql...
    2.VIEWS/1.PackagesSlim_Combined.sql...
    2.VIEWS/1.Privileges_Extended.sql...
    2.VIEWS/1.ProGetPackageVersions_Extended.sql...
    2.VIEWS/1.RoleTasks_Extended.sql...
    2.VIEWS/1.RubyGems_Extended.sql...
    2.VIEWS/1.RubyGemVersions_Extended.sql...
    2.VIEWS/1.ScheduledTasks_Extended.sql...
    2.VIEWS/1.VsixPackages_Latest.sql...
    2.VIEWS/1.Vulnerabilities_Extended.sql...
    2.VIEWS/2.DashboardFeeds.sql...
    3.TRIGGERS/1.TR__NuGetPackages__Prerelease_Indicator.sql...
    3.TRIGGERS/1.TR__Users__ValidateAnonymous.sql...
    4.PROCEDURES/0.1.AddStoredProcInfo.sql...
    4.PROCEDURES/0.3.Events_RaiseEvent.sql...
    4.PROCEDURES/0.5.Feed_CreateOrUpdateTypedFeed.sql...
    4.PROCEDURES/1.ApiKeys_CreateOrUpdateApiKey.sql...
    4.PROCEDURES/1.ApiKeys_DeleteApiKey.sql...
    4.PROCEDURES/1.ApiKeys_GetAccessLog.sql...
    4.PROCEDURES/1.ApiKeys_GetAccessLogs.sql...
    4.PROCEDURES/1.ApiKeys_GetApiKey.sql...
    4.PROCEDURES/1.ApiKeys_GetApiKeyByName.sql...
    4.PROCEDURES/1.ApiKeys_GetApiKeys.sql...
    4.PROCEDURES/1.ApiKeys_LogRequest.sql...
    4.PROCEDURES/1.AssessmentTypes_CreateOrUpdateAssessmentType.sql...
    4.PROCEDURES/1.AssessmentTypes_DeleteAssessmentType.sql...
    4.PROCEDURES/1.AssessmentTypes_GetAssessmentTypes.sql...
    4.PROCEDURES/1.BowerPackages_CreateOrUpdatePackage.sql...
    4.PROCEDURES/1.BowerPackages_DeletePackage.sql...
    4.PROCEDURES/1.BowerPackages_GetPackage.sql...
    4.PROCEDURES/1.BowerPackages_GetPackages.sql...
    4.PROCEDURES/1.BowerPackages_IncrementHitCount.sql...
    4.PROCEDURES/1.Configuration_GetConfiguration.sql...
    4.PROCEDURES/1.Configuration_GetValue.sql...
    4.PROCEDURES/1.Configuration_SetValue.sql...
    4.PROCEDURES/1.Connectors_CreateOrUpdateConnector.sql...
    4.PROCEDURES/1.Connectors_DeleteConnector.sql...
    4.PROCEDURES/1.Connectors_GetConnector.sql...
    4.PROCEDURES/1.Connectors_GetConnectors.sql...
    4.PROCEDURES/1.Connectors_SetStatus.sql...
    4.PROCEDURES/1.Connectors_SetUpdated.sql...
    4.PROCEDURES/1.Dashboards_GetDashboardInfo.sql...
    4.PROCEDURES/1.Dashboards_GetFeedVulnerabilityAssessments.sql...
    4.PROCEDURES/1.Dashboards_GetLargestPackages.sql...
    4.PROCEDURES/1.DockerBlobs_CompleteUpload.sql...
    4.PROCEDURES/1.DockerBlobs_CreateOrUpdateBlob.sql...
    4.PROCEDURES/1.DockerBlobs_DeleteBlob.sql...
    4.PROCEDURES/1.DockerBlobs_GetBlobs.sql...
    4.PROCEDURES/1.DockerBlobs_GetUploads.sql...
    4.PROCEDURES/1.DockerBlobs_RecordChunkUpload.sql...
    4.PROCEDURES/1.DockerBlobs_StartUpload.sql...
    4.PROCEDURES/1.DockerImages_CreateImage.sql...
    4.PROCEDURES/1.DockerImages_DeleteImage.sql...
    4.PROCEDURES/1.DockerImages_GetImage.sql...
    4.PROCEDURES/1.DockerImages_GetImages.sql...
    4.PROCEDURES/1.DockerImages_GetRepositories.sql...
    4.PROCEDURES/1.DockerImages_GetTags.sql...
    4.PROCEDURES/1.DockerImages_UpdateDescription.sql...
    4.PROCEDURES/1.EventOccurrences_GetOccurrence.sql...
    4.PROCEDURES/1.EventOccurrences_GetOccurrences.sql...
    4.PROCEDURES/1.EventOccurrences_GetUsers.sql...
    4.PROCEDURES/1.EventTypes_GetEventTypes.sql...
    4.PROCEDURES/1.Executions_AddLogMessage.sql...
    4.PROCEDURES/1.Executions_DeleteExecution.sql...
    4.PROCEDURES/1.Executions_EndExecution.sql...
    4.PROCEDURES/1.Executions_FailRunningExecutions.sql...
    4.PROCEDURES/1.Executions_GetExecution.sql...
    4.PROCEDURES/1.Executions_GetFeedSyncExecutions.sql...
    4.PROCEDURES/1.Executions_StartFeedSyncExecution.sql...
    4.PROCEDURES/1.FeedAdapters_CreateOrUpdateFeedAdapter.sql...
    4.PROCEDURES/1.FeedAdapters_DeleteFeedAdapter.sql...
    4.PROCEDURES/1.FeedAdapters_GetFeedAdapters.sql...
    4.PROCEDURES/1.FeedPackageFilters_CreateOrUpdatePackageFilter.sql...
    4.PROCEDURES/1.FeedPackageFilters_DeletePackageFilter.sql...
    4.PROCEDURES/1.FeedPackageFilters_GetPackageFilters.sql...
    4.PROCEDURES/1.FeedRetentionRules_CreateOrUpdateRule.sql...
    4.PROCEDURES/1.FeedRetentionRules_DeleteRule.sql...
    4.PROCEDURES/1.FeedRetentionRules_GetRules.sql...
    4.PROCEDURES/1.FeedRetentionRules_ResequenceRule.sql...
    4.PROCEDURES/1.Feeds_AddFeedConnector.sql...
    4.PROCEDURES/1.Feeds_AddVulnerabilitySource.sql...
    4.PROCEDURES/1.Feeds_CreateFeed.sql...
    4.PROCEDURES/1.Feeds_DeleteFeed.sql...
    4.PROCEDURES/1.Feeds_DeleteFeedConnector.sql...
    4.PROCEDURES/1.Feeds_DeleteSyncSettings.sql...
    4.PROCEDURES/1.Feeds_DeleteVulnerabilitySource.sql...
    4.PROCEDURES/1.Feeds_GetFeed.sql...
    4.PROCEDURES/1.Feeds_GetFeedConnectors.sql...
    4.PROCEDURES/1.Feeds_GetFeeds.sql...
    4.PROCEDURES/1.Feeds_GetMavenFeed.sql...
    4.PROCEDURES/1.Feeds_GetNpmFeed.sql...
    4.PROCEDURES/1.Feeds_GetNuGetFeed.sql...
    4.PROCEDURES/1.Feeds_GetSyncFeeds.sql...
    4.PROCEDURES/1.Feeds_GetSyncSettings.sql...
    4.PROCEDURES/1.Feeds_GetVulnerabilitySources.sql...
    4.PROCEDURES/1.Feeds_SetFeedProperty.sql...
    4.PROCEDURES/1.Feeds_SetLastSyncDate.sql...
    4.PROCEDURES/1.Feeds_SetNuGetFeedProperty.sql...
    4.PROCEDURES/1.Feeds_UpdateSyncSettings.sql...
    4.PROCEDURES/1.IndexingServers_DeleteServer.sql...
    4.PROCEDURES/1.IndexingServers_GetServers.sql...
    4.PROCEDURES/1.IndexingServers_SetUpdated.sql...
    4.PROCEDURES/1.LicenseRules_CreateOrUpdateLicenseRule.sql...
    4.PROCEDURES/1.LicenseRules_DeleteLicenseRule.sql...
    4.PROCEDURES/1.LicenseRules_GetLicenseRules.sql...
    4.PROCEDURES/1.LicenseRules_GetMatchingRule.sql...
    4.PROCEDURES/1.Licenses_DeleteLicense.sql...
    42704: type "LicenseRules_Extended" does not exist
    4.PROCEDURES/1.Licenses_GetLicenses.sql...
    4.PROCEDURES/1.Licenses_ImportLicense.sql...
    4.PROCEDURES/1.Licenses_UpdateLicense.sql...
    4.PROCEDURES/1.LogMessages_AddMessage.sql...
    4.PROCEDURES/1.LogMessages_DeleteMessages.sql...
    4.PROCEDURES/1.LogMessages_GetCategories.sql...
    4.PROCEDURES/1.LogMessages_GetMessage.sql...
    4.PROCEDURES/1.LogMessages_GetMessages.sql...
    4.PROCEDURES/1.LogMessages_SetReadIndicator.sql...
    4.PROCEDURES/1.MavenArtifacts_CreateOrUpdateArtifact.sql...
    4.PROCEDURES/1.MavenArtifacts_DeleteArtifact.sql...
    4.PROCEDURES/1.MavenArtifacts_GetArtifactFiles.sql...
    4.PROCEDURES/1.MavenArtifacts_GetArtifacts.sql...
    4.PROCEDURES/1.MavenArtifacts_GetArtifactVersions.sql...
    4.PROCEDURES/1.MavenArtifacts_IncrementDownloadCount.sql...
    4.PROCEDURES/1.MavenArtifacts_SetReleaseVersion.sql...
    4.PROCEDURES/1.NpmConnectors_CreateOrUpdatePackage.sql...
    4.PROCEDURES/1.NpmConnectors_DeleteIndex.sql...
    4.PROCEDURES/1.NpmConnectors_GetPackageCount.sql...
    4.PROCEDURES/1.NpmConnectors_GetPackages.sql...
    4.PROCEDURES/1.NpmConnectors_SearchPackages.sql...
    4.PROCEDURES/1.NpmFeeds_GetAllPackageVersions.sql...
    4.PROCEDURES/1.NpmFeeds_GetConnectorPackage.sql...
    4.PROCEDURES/1.NpmFeeds_GetLatestPackageVersions.sql...
    4.PROCEDURES/1.NpmFeeds_SetTagVersion.sql...
    4.PROCEDURES/1.NpmPackages_CreateOrUpdatePackage.sql...
    4.PROCEDURES/1.NpmPackages_DeletePackage.sql...
    4.PROCEDURES/1.NpmPackages_GetPackage.sql...
    4.PROCEDURES/1.NpmPackages_IncrementDownloadCount.sql...
    4.PROCEDURES/1.NuGetPackages_CreateOrUpdatePackage.sql...
    4.PROCEDURES/1.NuGetPackages_DeletePackage.sql...
    4.PROCEDURES/1.NuGetPackages_GetFeedSyncPackages.sql...
    4.PROCEDURES/1.NuGetPackages_GetLatest.sql...
    4.PROCEDURES/1.NuGetPackages_GetLatestStable.sql...
    4.PROCEDURES/1.NuGetPackages_GetPackage.sql...
    4.PROCEDURES/1.NuGetPackages_GetPackageCount.sql...
    4.PROCEDURES/1.NuGetPackages_GetPackages.sql...
    4.PROCEDURES/1.NuGetPackages_IncrementDownloadCount.sql...
    4.PROCEDURES/1.NuGetPackages_PullCached.sql...
    4.PROCEDURES/1.NuGetPackages_SetListed.sql...
    4.PROCEDURES/1.NuGetPackageSymbols_GetSymbols.sql...
    4.PROCEDURES/1.PackageDownloads_AddDownload.sql...
    4.PROCEDURES/1.PackageDownloads_GetDownloads.sql...
    4.PROCEDURES/1.Packages_GetDeletedPackages.sql...
    4.PROCEDURES/1.Packages_GetFeedSyncPackages.sql...
    4.PROCEDURES/1.Packages_GetPackageDeployments.sql...
    4.PROCEDURES/1.Packages_GetPackagePromotions.sql...
    4.PROCEDURES/1.Packages_GetPackages.sql...
    4.PROCEDURES/1.Packages_RecordPackageDelete.sql...
    4.PROCEDURES/1.Packages_RecordPackageDeployment.sql...
    4.PROCEDURES/1.Packages_RecordPackagePromotion.sql...
    4.PROCEDURES/1.ProGetPackages_CreateOrUpdatePackage.sql...
    4.PROCEDURES/1.ProGetPackages_DeletePackage.sql...
    4.PROCEDURES/1.ProGetPackages_GetPackageCount.sql...
    4.PROCEDURES/1.ProGetPackages_GetPackages.sql...
    4.PROCEDURES/1.ProGetPackages_GetPackageVersions.sql...
    4.PROCEDURES/1.ProGetPackages_GetPopularPackages.sql...
    4.PROCEDURES/1.ProGetPackages_IncrementDownloadCount.sql...
    4.PROCEDURES/1.ProGetPackages_SearchPackages.sql...
    4.PROCEDURES/1.RubyGems_CreateOrUpdateGem.sql...
    4.PROCEDURES/1.RubyGems_DeleteGem.sql...
    4.PROCEDURES/1.RubyGems_GetGem.sql...
    4.PROCEDURES/1.RubyGems_GetGemVersions.sql...
    4.PROCEDURES/1.RubyGems_GetLatestGemVersions.sql...
    4.PROCEDURES/1.RubyGems_GetPopularGems.sql...
    4.PROCEDURES/1.RubyGems_IncrementDownloadCount.sql...
    4.PROCEDURES/1.RubyGems_SearchGems.sql...
    4.PROCEDURES/1.RubyGems_UpdateExtendedData.sql...
    4.PROCEDURES/1.ScheduledTasks_CreateScheduledTask.sql...
    4.PROCEDURES/1.ScheduledTasks_GetExecutions.sql...
    4.PROCEDURES/1.ScheduledTasks_GetScheduledTasks.sql...
    4.PROCEDURES/1.ScheduledTasks_StartExecution.sql...
    4.PROCEDURES/1.ScheduledTasks_UpdateScheduledTask.sql...
    4.PROCEDURES/1.Security_AddPrivilege.sql...
    4.PROCEDURES/1.Security_CreateOrUpdateRole.sql...
    4.PROCEDURES/1.Security_DeleteRole.sql...
    4.PROCEDURES/1.Security_GetPrivileges.sql...
    4.PROCEDURES/1.Security_GetRole.sql...
    4.PROCEDURES/1.Security_GetRoles.sql...
    4.PROCEDURES/1.Security_GetTasks.sql...
    4.PROCEDURES/1.Security_GetUserPrivileges.sql...
    4.PROCEDURES/1.Security_RemovePrivilege.sql...
    4.PROCEDURES/1.UserDirectories_CreateOrUpdateDirectory.sql...
    4.PROCEDURES/1.UserDirectories_GetDirectories.sql...
    4.PROCEDURES/1.Users_CreateGroup.sql...
    4.PROCEDURES/1.Users_CreateOrUpdateUser.sql...
    4.PROCEDURES/1.Users_DeleteGroup.sql...
    4.PROCEDURES/1.Users_DeleteUser.sql...
    4.PROCEDURES/1.Users_GetGroups.sql...
    4.PROCEDURES/1.Users_GetUser.sql...
    4.PROCEDURES/1.Users_GetUsers.sql...
    4.PROCEDURES/1.Users_GetUsersInGroup.sql...
    4.PROCEDURES/1.Users_SetPassword.sql...
    4.PROCEDURES/1.Users_ValidateLogin.sql...
    4.PROCEDURES/1.VsixPackages_CreateOrUpdatePackage.sql...
    4.PROCEDURES/1.VsixPackages_DeletePackage.sql...
    4.PROCEDURES/1.VsixPackages_GetLatest.sql...
    4.PROCEDURES/1.VsixPackages_GetPackages.sql...
    4.PROCEDURES/1.Vulnerabilities_CreateAssessment.sql...
    4.PROCEDURES/1.Vulnerabilities_CreateOrUpdateComment.sql...
    4.PROCEDURES/1.Vulnerabilities_CreateOrUpdateVulnerability.sql...
    4.PROCEDURES/1.Vulnerabilities_DeleteComment.sql...
    4.PROCEDURES/1.Vulnerabilities_DeleteVulnerability.sql...
    4.PROCEDURES/1.Vulnerabilities_GetVulnerabilities.sql...
    4.PROCEDURES/1.Vulnerabilities_GetVulnerabilitiesForPackage.sql...
    4.PROCEDURES/1.Vulnerabilities_GetVulnerability.sql...
    4.PROCEDURES/1.Vulnerabilities_UpdateExternalVulnerability.sql...
    4.PROCEDURES/1.VulnerabilitySources_CreateOrUpdateVulnerabilitySource.sql...
    4.PROCEDURES/1.VulnerabilitySources_DeleteVulnerabilitySource.sql...
    4.PROCEDURES/1.VulnerabilitySources_GetAllPackages.sql...
    4.PROCEDURES/1.VulnerabilitySources_GetVulnerabilitySources.sql...

    Product: ProGet
    Version: 4.7.4



  • It seems that this error is possible depending on a few factors, such as whether this is an upgrade and the version of PostgreSQL. We are deploying v4.7.5 today, which should no longer have this issue, but your database will likely be in an inconsistent state.

    The easiest solution would be to restore a database backup, then upgrade to 4.7.5. If that isn't possible, we can send you a SQL script to run that will most likely correct the problem and allow the upgrade to work.



  • I'm not sure if we have a backup from prior to any upgrade attempt, so if there's a SQL script I'd appreciate it.

    Is there a recommended version of PostgreSQL to use with proget?



  • We test with the latest version of Posgres, but I haven't heard of any issues with 9.4 or newer.

    This ought to recreate the missing tables in your database:

    CREATE TABLE "Licenses"
    (
    	"License_Id" SERIAL NOT NULL,
    	"External_Id" VARCHAR(50) NOT NULL,
    	"Title_Text" VARCHAR(200) NOT NULL,
    
    	CONSTRAINT "PK__Licenses"
    		PRIMARY KEY ("License_Id"),
    
    	CONSTRAINT "CK__Licenses__External_Id"
    		CHECK (RTRIM(LTRIM("External_Id")) <> ''),
    
    	CONSTRAINT "UQ__Licenses__External_Id"
    		UNIQUE ("External_Id")
    );
    
    CREATE TABLE "LicenseUrls"
    (
    	"License_Id" INT NOT NULL,
    	"License_Url" VARCHAR(400) NOT NULL,
    
    	CONSTRAINT "FK__LicenseUrls__Licenses"
    		FOREIGN KEY ("License_Id")
    		REFERENCES "Licenses" ("License_Id")
    		ON DELETE CASCADE,
    
    	CONSTRAINT "CK__LicenseUrls__License_Url"
    		CHECK ("License_Url" NOT LIKE 'http://%' AND "License_Url" NOT LIKE 'https://%'),
    
    	CONSTRAINT "UQ__LicenseUrls__License_Url"
    		UNIQUE ("License_Url")
    );
    
    CREATE INDEX "IX__LicenseUrls__License_Id"
    	ON "LicenseUrls" ("License_Id");
    
    CREATE TABLE "LicenseRules"
    (
    	"LicenseRule_Id" SERIAL NOT NULL,
    	"Feed_Id" INT NULL,
    	"License_Id" INT NOT NULL,
    	"Allow_Indicator" YNINDICATOR NOT NULL,
    
    	CONSTRAINT "PK__LicenseRules"
    		PRIMARY KEY ("LicenseRule_Id"),
    
    	CONSTRAINT "FK__LicenseRules__Feeds"
    		FOREIGN KEY ("Feed_Id")
    		REFERENCES "Feeds" ("Feed_Id")
    		ON DELETE CASCADE,
    
    	CONSTRAINT "FK__LicenseRules__Licenses"
    		FOREIGN KEY ("License_Id")
    		REFERENCES "Licenses" ("License_Id")
    		ON DELETE CASCADE
    );
    
    CREATE INDEX "IX__LicenseRules__Feed_Id"
    	ON "LicenseRules" ("Feed_Id");
    
    ALTER TABLE "Feeds"
    	ADD "AllowUnknownLicenses_Indicator" YNINDICATOR NULL;
    
    DROP TABLE "FeedLicenseUrls" CASCADE;

Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation