Support Forums

reset app pool
 
Notifications
Clear all

reset app pool

11 Posts
2 Users
0 Likes
1,133 Views
0
Topic starter

Experiencing an issue with cloudpanel where the application pool constantly needs to be restarted. The error states that the Cloudpaneladmin user cannot connect to database. After the application is reset it starts working again. 

Jacob Dixon 2020-09-03 11:30

@skdemille
What does the log file in CloudPanel say? Can you paste the error?

7 Answers
0
Topic starter

2020-06-07 19:04:52,852 [INFO] CloudPanel.Bootstrapper – The following migrations were pending: 201502171517110_Initial, 201502210420574_AddMessageTrackingTable, 201502211857270_UpdateMessageTrackingTable, 201503110041301_AddDescriptionFieldToUser, 201503130253121_AddCompanyCodeToAuditTrace, 201506092339208_UpgradeTo310800, 201506100137572_AddPasswordNeverExpiresToUser, 201507090144346_AddLyncTables, 201509192334141_RemoveRequiredFieldsOnCompanies, 201511280533335_UpgradeTo310830, 201512140317383_AddReportPermissions, 201512180028148_AddSuperAdminToApiKeysTable, 201512281817440_AddDocTables, 201601051757489_AddUserProfileTable, 201602010143012_AddMailProtector_Index_And_Other, 201602010155429_AddMisingIndexOnStatMailboxSizeTable, 201602010224586_AddMisingIndexOnStatMailboxDatabaseSizeTable, 201602010325262_CombineIndexesOnStatMailboxSizes, 201602010355061_CombineIndexesOnStatMailboxSizesv2, 201602080456395_CombineIndexesOnStatMessageTrackingCount, 201602121446523_UpdateSamAccountNameForSecurityGroups, 201602201659535_AddDescriptionToFiles, 201603052344341_FixCascadeDeleteForSpam, 201603100354346_AddDocSSLCertificatesAndClearDocCategories, 201603130240197_AddIssueWarningAndProhibitSendQuota, 201603140343518_AddDocumentationColumnsToUserRoles, 201603201642237_StandardizeAllTableNames, 201603201705175_AddDynamicDistributionGroupSupport, 201603211850134_AddDepartmentLockdownRole, 201603280234552_AddAcknowledgedToDelayedTable, 201606082058190_AddSessionsTable, 201608101821004_AddOWAForDevicesToMaiboxPlan, 201608191550089_AddMailprotectorLogCodes, 201610011429491_AddLastChangedToPassword, 201610181721564_AddSpamRolesToUserRoles, 201611152022055_AddProtectedColumnToGroups, 201709291958291_ConsolidateDevMigrations, 201710301511195_AddUserDisabledLogDate_mpeyton, 201711051711157_AddLastLogonTimeToStats, 201711081532569_AddedLastAttemptedAndResultToCWAgreements, 201711122222459_ResetPasswordTokenTable, 201711222353455_AddReportLogo, 201712111553558_Added_Login_Branding_mpeyton, 201712112201181_Revised_Branding_mpeyton, 201712141659227_RemoveColumnsFromSessionsTable, 201712211639219_AddCategoryToTutorials, 201801122010297_AddOfficeToUser, 201801211628052_AddExchangeDatabasesTable, 201802232030238_AddResetPasswordAndSupportNotifications_mpeyton, 201803011726338_AddBlockedIPsAndFailedAttempts, 201803021621540_RevisedBlockedIpAddressAndFailedLoginAttempt_mpeyton, 201803131352145_AddInitialInstallLicenseId_mpeyton, 201803201746572_AddConnectWiseSyncOptionColumns, 201804082106537_CitrixConnectwiseSyncChanges, 201804181940366_AddResellerCodeUserRoles_mpeyton, 201805172330453_AddEwsToMbxPlans, 201805202229039_AddPasswordPolicies, 201805202305598_ID53, 201805290130346_AddRetentionPoliciesAndTags, 201806192026137_AddRetentionTagProperty, 201806240423317_AddRetentionIdColumn, 201807100159193_AddRetentionRoles, 201807100208459_AddPasswordPolicyRoles, 201807132122147_AddPasswordLastSet, 201807162014132_AddPrecedencePasswordPolicy_mpeyton, 201808022030128_AddBrandingResellerCode_mpeyton, 201808152114564_AddCpProtectedToGroups, 201808201727050_IncreaseResetPwdUPNColumnLength, 201810121753153_AddSecurityGroupConnectWiseTables, 201811201822275_UpdateADSyncTable, 201811231957163_AddDescriptionColumnToPermissions, 201901181538213_AddReferenceColumnToCompanies, 201903292117539_AddNotificationType, 201903300213549_AddSecurityQuestionsToProfile, 201903301332482_AddNotificationTriggers, 201904022132057_AddPermissionGroupVisibility, 201904072207224_RemoveUserProfileSecurityQuestions, 201906171616362_AddToAndPasswordsADSyncSettings, 201907031817105_AddCompanyNotification, 201910181948579_AddKeyAndIpADSyncSettings, 201910251844148_AddDocPasswordADSyncSettings
2020-06-07 19:04:53,367 [ERROR] CloudPanel.Bootstrapper – Failed to update the database. Please contact support: System.Data.SqlClient.SqlException (0x80131904): Cannot open database “CloudPanel” requested by the login. The login failed.
Login failed for user ‘CloudPanelUser’.
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
at System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable`1 migrationStatements, DbConnection connection)
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.Migrations.DbMigrator.ExecuteStatements(IEnumerable`1 migrationStatements, DbTransaction existingTransaction)
at System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId, VersionedModel targetModel, IEnumerable`1 operations, IEnumerable`1 systemOperations, Boolean downgrading, Boolean auto)
at System.Data.Entity.Migrations.DbMigrator.ApplyMigration(DbMigration migration, DbMigration lastMigration)
at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId)
at System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration)
at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
at CloudPanel.Bootstrapper.UpdateDb()
ClientConnectionId:0661b989-cd91-4b17-91b1-0c885f2f7361
Error Number:4060,State:1,Class:11
2020-06-07 19:04:53,367 [ERROR] CloudPanel.Bootstrapper – Error: System.Data.SqlClient.SqlException (0x80131904): Cannot open database “CloudPanel” requested by the login. The login failed.
Login failed for user ‘CloudPanelUser’.

Jacob Dixon 2020-09-03 13:51

@skdemille
That is saying that use CloudPanelUser doesn’t have rights to the SQL database. Chances are you installed it as a different user and put in the CloudPanelUser credentials but didn’t add it to SQL. Please add this user to SQL using SQL management studio to have db owner rights to the database

0
Topic starter

User is setup in SQL and has all the rights. I can login with the creds in SQL management. This is the content of the settings.xml file:

<?xml version=”1.0″ encoding=”utf-8″ standalone=”yes”?>
<cloudpanel>
<Settings>
<Database>Data Source=manager\SQLEXPRESS;Initial Catalog=CloudPanel;User Id=CloudPanelUser;Password=xxxxxxxxxx</Database>
</Settings>
</cloudpanel>

0
Topic starter

Tried changing it to:

<Database>Data Source=manager\SQLEXPRESS;Initial Catalog=cloudpanel;Integrated Security=SSPI</Database>

But that did not work

0
Topic starter

Hi Jacob,

Was wondering if you had a chance to look at this?

Thanks

Jacob Dixon 2020-09-11 12:33

@skdemille I responded above. Since you are using Integrated Security=SSPI in the connection string it is using the user that is on the application pool in IIS for the application. You need to add that user to the SQL server to have rights to the CloudPanel database. If this is a new install, I would recommend installing the application with the user you are assigning to the application pool in the first place. Chances are it won’t install because that user doesn’t have rights to the database server.

0
Topic starter

Using this:

<Database>Data Source=manager\SQLEXPRESS;Initial Catalog=CloudPanel;User Id=CloudPanelUser;Password=xxxxxxxxxx</Database>

After recycling app pool it works for a bit and crashes again. 

0
Topic starter

Updated to latest version successfully via user which is set on app pool. Tried using settings file with security-SSPI and got this error when trying to login:

Server Error in ‘/CloudPanel’ Application.


Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a “web.config” configuration file located in the root directory of the current web application. This <customErrors> tag should then have its “mode” attribute set to “Off”.

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the “defaultRedirect” attribute of the application’s <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

Reverted to <Database>Data Source=manager\SQLEXPRESS;Initial Catalog=CloudPanel;User Id=CloudPanelUser;Password=xxxxxxxxxx</Database>

Jacob Dixon 2020-09-11 13:24

@skdemille You updated? The original version you installed never got spun up and updated the database object. I think we are going to have to do a remote session.

0
Topic starter

Sure let me know when you can.

Share: