Posts by Sammeta Sudheer

Tomcat upgradation 8.x to 9.x

Introduction:  Apache Tomcat Upgrading from Tomcat 8 to Tomcat 9 is a critical step for taking advantage of the latest features, improved performance, and enhanced security. This blog provides a structured approach for a successful upgrade. Why we need to do:  Tomcat 9 introduces support for Servlet 4.0, HTTP/2, and other modern web technologies. Many applications require these features to maintain compatibility and performance. Moreover, Tomcat 8 has reached its end-of-life phase, leaving systems exposed to unpatched vulnerabilities. Challenges and Issues Faced During Upgradation: Configuration Incompatibilities: Configuration files such as server.xml, web.xml, and context.xml may require adjustments to align with Tomcat 9 standards. Application Dependencies: Applications running on Tomcat 8 may rely on deprecated libraries or APIs that are removed in Tomcat 9. Custom Scripts and Integrations: Custom startup scripts, monitoring tools, or integrations might need modifications for compatibility. Steps to Upgrade Tomcat from Version 8 to Version 9: Backup Your Current Setup: l Backup all configuration files: server.xml, web.xml, context.xml. l Backup application WAR files and logs. l Snapshot the current environment to ensure rollback options. Download and Install Tomcat 9: l Download the Tomcat 9 binary from the official Apache Tomcat website. l Extract the archive to a new directory (do not overwrite the existing Tomcat 8 directory). Migrate Configuration Files: l Compare the server.xml, web.xml, and context.xml from Tomcat 8 with the default Tomcat 9 configurations. l Update configurations to align with Tomcat 9 schema. Remove any deprecated elements. Migrate Applications: l Deploy your application WAR files to the webapps directory in the Tomcat 9 installation. l Test applications for compatibility, focusing on deprecated APIs and libraries. Update Custom Scripts: l Modify any startup scripts or custom integrations to reference the new Tomcat 9 directories and binaries. Test the Upgrade: l Start Tomcat 9 using the startup.sh or startup.bat script. l Monitor logs in the logs directory for errors. l Test all deployed applications to ensure they function as expected. Rollback Plan: l If issues are encountered, stop Tomcat 9 and revert to the backup of Tomcat 8.…

Read More

Weblogic .out files are not rotating issue.

Issue:  In WebLogic Server, the .out log files (such as nohup.out or server.out) are not rotating properly, causing them to grow significantly in size—sometimes reaching several GBs. This can lead to disk space exhaustion and make log analysis difficult. Cause of the issue: The primary reasons for .out files not rotating are: WebLogic Logging Configuration – The .out file is typically not managed by WebLogic’s built-in log rotation settings. nohup or Redirected Output – If the server is started using nohup ./startWebLogic.sh &, the output is redirected to nohup.out, which does not rotate automatically. Log Rotation Not Configured – The absence of an external log rotation mechanism (logrotate) can cause .out files to grow indefinitely. Long Running Process – WebLogic keeps writing to the same .out file as long as the process is running. How do we solve:  Solution 1: Enable WebLogic’s Built-in Log Rotation If .out logs are managed via WebLogic settings, follow these steps: Login to WebLogic Admin Console Navigate to Servers → Select the target Managed Server. Go to Logging Settings Click on the Logging tab → Click on the General sub-tab. Configure Rotation Settings Rotate Log Files → Enabled Rotation Type → Set to either: By Size (100MB or as needed). By Time (24 Hours). Maximum Number of Retained Files → Set a limit (e.g., 10). Save and Restart WebLogic Server Apply changes and restart the WebLogic server for them to take effect. Solution 2: Redirect Standard Output to a Rotating Log Modify the WebLogic startup script to redirect logs using cronolog: Edit startWebLogic.sh and Modify the nohup Command: ### nohup ./startWebLogic.sh > /path/to/logs/weblogic_$(date +%Y-%m-%d).log 2>&1 &…

Read More

Overcoming Deployment Hurdles: Managing Build Permissions

Introduction In today’s fast-paced development environment, efficient and smooth application deployment is critical. A common challenge faced by development teams is the inability to deploy applications due to insufficient permissions on shared build directories. This blog post will explore the root causes of this issue and provide practical solutions to prevent deployment failures. Understanding the Problem When build artifacts are staged in a shared directory without proper group write permissions, it can lead to several issues: Deployment Failures:The deployment process cannot overwrite or modify the existing build files, resulting in deployment failures. Version Control Issues:Changes made to the build artifacts directly on the shared directory might not be reflected in the version control system, leading to inconsistencies. Security Risks:If sensitive information is present in the build artifacts, lack of proper permissions could expose it to unauthorized access. Solutions: Dedicated Build Directories: o Assign each developer or team a dedicated build directory with appropriate permissions. o This ensures exclusive write access for each user, preventing conflicts and deployment issues. Leverage Build Tools: o Utilize build tools like Maven or Gradle to manage the build process and artifact generation. o These tools often provide mechanisms to handle build outputs and dependencies effectively. Implement Version Control: o Enforce the use of a version control system (like Git) to manage code and build artifacts. o This ensures that all changes are tracked and can be easily reverted or recovered. Grant Appropriate Permissions: o If using a shared build directory, ensure that the deployment process has the necessary write permissions. o Implement role-based access control to limit permissions to authorized users. Automate Deployment: o Consider automating the deployment process using tools like Jenkins or Bamboo. o Automation can help streamline the deployment process and reduce manual errors. Establish Clear Guidelines: o Develop clear guidelines for build artifact management and deployment procedures. o Communicate these guidelines to all team members to ensure consistency. Best Practices: Regularly Review Permissions:Periodically check and update file and directory permissions to prevent access issues. Test Deployment Process:Thoroughly test the deployment process in different environments to identify potential problems. Monitor Deployment Failures:Track deployment failures to identify recurring issues and implement preventive measures.…

Read More

Conquering Application Deployment Failures in WebLogic

Introduction: Deploying applications to WebLogic can often be a daunting task, fraught with potential pitfalls. In this post, we’ll delve into common deployment failures, classpath issues, and deployment descriptor errors, providing practical solutions to get your applications up and running smoothly. Common Deployment Failures Deployment failures can stem from various issues. Here are some common culprits and their solutions: Incorrect deployment package format:Ensure your application is packaged correctly as a WAR, EAR, or other supported format. Missing or incorrect libraries:Verify that all required libraries are included in the deployment package and their dependencies are resolved. Configuration errors:Check for typos, invalid syntax, or missing elements in deployment descriptors (web.xml, application.xml, etc.). Resource conflicts:Resolve conflicts with existing applications or resources by using unique names and avoiding overlapping configurations. Tackling Classpath Issues Classpath problems often lead to deployment failures. Here are some tips: Organize libraries:Structure your project’s libraries effectively to avoid conflicts. Leverage classloaders:Understand WebLogic’s classloader hierarchy and how it impacts class resolution. Use dependency management tools:Employ tools like Maven or Gradle to manage dependencies and avoid version conflicts. Check for duplicate classes:Identify and resolve any duplicate classes in your application or its dependencies. Resolving Deployment Descriptor Errors Deployment descriptors provide essential metadata for your application. Common errors include: XML syntax errors:Validate your XML structure using a linter or XML editor. Invalid or missing elements:Ensure all required elements are present and correctly configured. Version compatibility:Verify compatibility between your deployment descriptor version and WebLogic’s supported versions. Schema validation:Use a schema to validate your deployment descriptor against the correct specification. Best Practices: Thorough testing:Test your application in different environments (development, testing, production) to identify potential issues early. Logging:Enable detailed logging to capture errors and troubleshoot effectively. Version control:Use version control to track changes and revert to previous working versions if needed. Continuous integration and deployment (CI/CD):Automate the build, test, and deployment process to reduce errors and improve efficiency. Conclusion: By understanding common deployment challenges and following best practices, you can significantly improve your application deployment success rate in WebLogic. Remember to carefully analyze error messages, leverage available tools, and systematically troubleshoot issues to resolve them efficiently.

Read More

How to zip current running file with out any issues on prod weblogic servers

Issue:- How to zip current running file with out any issues on prod weblogic servers  Alert:–  Disk space alert >90% from weblgoic servers   Error:– Some times .out file is consuming…

Read More

Weblogic apps are failed/admin state after applying weblogic patches and after restart twice came to up and running mode.

Issue: Weblogic apps are failed/admin state after applying weblogic patches and after restart twice came to up and running mode. If your weblogic applications are entering an admin state or…

Read More

ASSERTION ERROR IN WEBLOGIC

Problem:-Assertion Error Cause:- We will get the Assertion Error in the console because while running managed servers some one clear the cache. So that we will get Assertion Error Solution:-…

Read More

Weblogic Servers getting failed on restarting after upgrade failed.

Issue: Servers getting failed on restarting after upgrade failed. Description: For upgradation purpose all the servers are stopped and tried for reconfig.sh but unable to open GUI due to VDI…

Read More

Update (redeploy) a Web application in weblogic

When you update a Web application, WebLogic Server redeploys the archive file or exploded directory. Update a Web application if you have made changes to it and you want to…

Read More

How to fix deployment is in start running state- weblogic 12c

When we see the app is in start running state at the time of deployment in weblogic 12c Go to the logs if you didn’t see any issues Just try…

Read More