Table of Contents

Troubleshooting Migrations

Overview

This guide provides troubleshooting steps for common issues encountered during the migration of Oqtane Framework instances, including both migration-related problems and post-migration issues. Whether you're migrating between servers, upgrading versions, or moving from a development to production environment, this guide will help you address common challenges throughout the entire migration process.


Migration Troubleshooting

1. Migration Failures

Symptoms: The migration process fails without completing successfully.

Solution:

  • Check Logs: Review the error logs on both the source and destination systems. These logs will provide more details about the failure and help you pinpoint the issue.
  • Disk Space: Ensure the destination environment has sufficient disk space to accommodate the migrated files and database.
  • Permissions: Verify that the user executing the migration has the necessary permissions to access both the source and destination systems and perform the migration tasks.
  • Dependencies: Make sure all required services (e.g., database, web server) are running and compatible between the source and destination environments. Double-check version compatibility for Oqtane and its dependencies.
  • Retry Migration: If the migration fails due to a temporary error, retry after resolving any issues found in the logs or environment.

2. Database Migration Problems

Symptoms: Missing data, schema mismatches, or errors during data transfer.

Solution:

  • Check Database Compatibility: Ensure the destination environment's database version is compatible with the source. If necessary, upgrade or downgrade the database to align with the Oqtane version you're migrating to.
  • Run Migration Scripts: Ensure all required database migration scripts are executed to bring the schema up to date in the destination environment.
  • Backup and Restore: If data is missing or corrupted, restore from a backup and reapply the migration scripts if needed.
  • Verify Database Permissions: Ensure the database user has full access rights to the required tables and schemas. Improper permissions can cause migration failures or incomplete data migration.

3. Configuration Errors

Symptoms: Issues with configuration files, such as mismatched settings, incorrect paths, or missing configurations.

Solution:

  • Update Configuration Files: Review and update configuration files (appsettings.json, settings.json, etc.) with the correct paths, connection strings, and environment-specific settings.
  • Check File Paths: Verify that file paths are correct and point to valid directories in the new environment, especially for file-based settings or resources.
  • Verify Environment Variables: Double-check any environment-specific variables (e.g., SMTP settings, API keys) to ensure they're set correctly in the new environment.

4. File Path and Permission Issues

Symptoms: Missing files, such as themes, modules, or uploaded content, or files are inaccessible after migration.

Solution:

  • Check File Permissions: Ensure that the web server user has the correct permissions to access all necessary files and directories. This includes read and write permissions for files related to themes, modules, and uploaded content.
  • Verify File Transfer: Ensure that all required files were successfully transferred during the migration. If transferring manually, verify the integrity of the files on both the source and destination systems.
  • Adjust File Paths: If file paths were changed in the migration process (e.g., if moving between servers with different file structures), update the paths in the Oqtane configuration to reflect the new locations.

Symptoms: Internal links or URLs are broken after migration.

Solution:

  • Update Hardcoded URLs: Check for any hardcoded URLs in the application, configuration files, or database that reference the source environment and update them to match the production environment's URLs.
  • URL Rewriting: If you're using URL rewrites or redirects, ensure the necessary rules are applied correctly in the new environment. Check the .htaccess or web.config file for rewrite rules.
  • Clear Cache: Clear any browser cache, server cache, or CDN cache that might be storing outdated URLs. Sometimes, browsers or CDNs hold onto old links after a migration.

6. Performance Issues After Migration

Symptoms: The migrated Oqtane instance is performing slower than expected in the new environment.

Solution:

  • Optimize Database Queries: Review the database for slow queries or missing indexes that could affect performance. Consider running database optimization commands (e.g., index rebuilding or query optimization).
  • Check Server Resources: Ensure the destination environment has sufficient CPU, memory, and disk I/O resources. Under-provisioned environments may struggle with performance after migration.
  • Enable Caching: Make sure caching mechanisms (e.g., application cache, object caching, CDN caching) are configured and enabled to improve performance.
  • Review Web Server Configurations: Review web server configurations (e.g., connection limits, thread pool settings) to ensure they are tuned for the expected traffic load.

7. User Authentication and Access Issues

Symptoms: Users are unable to authenticate, or permissions are incorrectly applied after migration.

Solution:

  • Check User Roles and Permissions: Verify that user roles and permissions were correctly migrated and applied in the destination environment. If needed, manually reassign roles.
  • Session State: Ensure that session management is properly configured. If using session state servers or shared caches, verify their configurations.
  • Authentication Providers: Ensure that authentication providers (e.g., OAuth, Active Directory, custom providers) are correctly configured and functional in the new environment. This includes updating any third-party API keys or tokens.
  • Test Login Process: Run tests for different user roles to verify login functionality and ensure authentication works as expected.

Post-Migration Troubleshooting

1. Missing Data or Modules

Symptoms: Certain data or modules are missing after migration.

Solution:

  • Rebuild the Database: Run any necessary commands to rebuild or refresh the database schema to ensure all modules and data are correctly loaded.
  • Module Reinstallation: Check whether the necessary modules are installed in the target environment. Reinstall or re-enable them from the Oqtane control panel if required.
  • Verify Data Import: If data is missing, verify that the data was successfully migrated. You may need to manually re-import certain data sets or configurations.

Symptoms: Broken links or URLs are occurring post-migration.

Solution:

  • Check URL Rewrites: Ensure that any URL rewrites or redirections are correctly configured in the new environment, especially if server paths have changed.
  • Review Routing Settings: Verify that routing settings in Oqtane's configuration files are correctly set up, including base URLs and other path-related configurations.
  • Test Links: Use a link checker to test for any broken links across the site. Ensure that all internal links are properly pointing to the new location.

3. Performance Degradation

Symptoms: Performance issues arise after migration, such as slow page loads or delayed responses.

Solution:

  • Check Server Resources: Verify that the new environment has adequate resources (CPU, memory, disk space) for running Oqtane smoothly.
  • Optimize Database: After migration, run database optimization commands (e.g., index rebuilding) to ensure optimal performance.
  • Enable Caching: Ensure caching mechanisms are enabled and configured properly, including output caching and object caching, to speed up page loads and reduce server load.
  • Profile the Application: Use profiling tools to analyze performance bottlenecks, such as slow queries, high CPU usage, or memory leaks.

4. User Authentication Problems

Symptoms: Users experience authentication issues or incorrect permissions after migration.

Solution:

  • Check User Credentials: Verify that user data (e.g., usernames, passwords) was migrated successfully and is intact in the new environment.
  • Review Authentication Settings: Ensure that authentication settings (e.g., authentication provider, SMTP settings) are correctly configured in the new environment.
  • Test Login Process: Run tests for different user roles and permissions to ensure that authentication works as expected.
  • Clear Session Data: If users are having trouble logging in after migration, clear session data or cookies, as stale sessions can sometimes block new logins.

Best Practices for Successful Migrations

  • Test the Migration: Perform a test migration in a staging environment before migrating to production. This will allow you to identify and resolve any issues without impacting live systems.
  • Backup Everything: Always back up your data, files, and configurations before beginning the migration process. Ensure that you have both a database and file system backup.
  • Check for Dependencies: Ensure that all dependencies (e.g., database versions, web server settings, or third-party services) are compatible with the destination environment.
  • Use Automation: Automate the migration process as much as possible, including database updates, file transfers, and configuration changes. This reduces human error and improves consistency.
  • Monitor After Migration: After completing the migration, monitor system logs, error logs, and performance metrics. Address any issues that arise promptly to minimize downtime or performance degradation.

Conclusion

By following the steps outlined in this guide, you can effectively troubleshoot common migration issues in Oqtane Framework. Whether you are migrating between servers, upgrading to a new version, or transitioning to a production environment, these solutions will help you address migration challenges and ensure a smooth transition.

If issues persist, consult the Oqtane community or support channels for additional assistance.