Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"CApp has encountered deployment issues. Please refer to the output for error logs" ERROR in wso2 micro integrator with visual studio #539

Open
JustinRaj-S opened this issue Dec 6, 2024 · 13 comments
Assignees
Labels

Comments

@JustinRaj-S
Copy link

Description

Hi Team,

I am following the WSO2 Quick start guide to work with MI integration (Helloworld service).

after designing the project, click ctrl + shift + p to add the MI Server in visual studio. Click on "Build and Run" button.

after build success, getting pop up like "CApp has encountered deployment issues. Please refer to the output for error logs."

CApp_failure

Logs from MicroIntegrator Server - Output console :

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.857 s
[INFO] Finished at: 2024-12-06T22:33:48+05:30
[INFO] ------------------------------------------------------------------------
Stopping the Micro Integrator Server
SUCCESS: The process with PID 5132 has been terminated.

Logs from Micro Integrator - Output console:

[12/6/2024, 10:33:48 PM] [MI Debug] [INFO] Build and copy tasks executed successfully
[12/6/2024, 10:34:04 PM] [MI Debug] [ERROR] Error while checking for Server readiness: connect ECONNREFUSED 127.0.0.1:9201

Steps to Reproduce

Version

WSO2 MI 4.3.0

Environment Details (with versions)

  • OS: Windows 11

  • WSO2 MI 4.3.0

  • Visual Studio Code: 1.95.3

@JustinRaj-S JustinRaj-S changed the title CApp has encountered deployment issues. Please refer to the output for error logs in wso2 micro integrator with visual studio "CApp has encountered deployment issues. Please refer to the output for error logs" ERROR in wso2 micro integrator with visual studio Dec 6, 2024
@ChinthakaJ98
Copy link

Hi @JustinRaj-S,

Do you see any server starting logs after the build is success and before it gets terminated? Also please confirm that you are pointing to the server location and not its bin folder.

@JustinRaj-S
Copy link
Author

JustinRaj-S commented Dec 9, 2024

Hi @ChinthakaJ98

I have selected only the wso2-mi product, not bin directly while adding MI Server.

image

Below is the server log after build success:
`[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.microintegrator.projects:HelloWorld:pom:1.0.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 96, column 19
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] --------------< com.microintegrator.projects:HelloWorld >---------------
[INFO] Building HelloWorld 1.0.0
[INFO] from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
Downloading from wso2-nexus: https://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml
Downloading from wso2.snapshots: https://maven.wso2.org/nexus/content/repositories/snapshots/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml
Progress (1): 1.3 kB

Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml (1.3 kB at 1.6 kB/s)
Progress (1): 1.6 kB

Downloaded from wso2-nexus: https://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/maven/plugins/maven-compiler-plugin/maven-metadata.xml (1.6 kB at 981 B/s)
[WARNING] Ignoring incompatible plugin version 4.0.0-beta-1: The plugin org.apache.maven.plugins:maven-compiler-plugin:4.0.0-beta-1 requires Maven version 4.0.0-beta-3
[INFO] Latest version of plugin org.apache.maven.plugins:maven-compiler-plugin failed compatibility check
[INFO] Looking for compatible RELEASE version of plugin org.apache.maven.plugins:maven-compiler-plugin
[INFO] Selected plugin org.apache.maven.plugins:maven-compiler-plugin:3.13.0
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ HelloWorld ---
[INFO] Deleting f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\HelloWorld\target
[INFO]
[INFO] --- dependency:3.5.0:copy-dependencies (default) @ HelloWorld ---
[INFO]
[INFO] --- vscode-car:5.2.75:car (default) @ HelloWorld ---
[INFO] datamapper directory not found
[INFO] ------------------------------------------------------------------------
[INFO] Building Composite Project
[INFO] ------------------------------------------------------------------------
[INFO] Processing artifacts in f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\HelloWorld\src\main\wso2mi\artifacts
[INFO] Processing API definitions in f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\HelloWorld\src\main\wso2mi\resources
[INFO] Processing connectors in f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\HelloWorld\src\main\wso2mi\resources
[INFO] Processing registry resources in f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\HelloWorld\src\main\wso2mi\resources
[INFO] Processing metadata in f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\HelloWorld\src\main\wso2mi\resources
[INFO] datamapper directory not found
[INFO]
[INFO] --- install:2.5.2:install-file (install-car) @ HelloWorld ---
[INFO] pom.xml not found in HelloWorld_1.0.0.car
[INFO] Installing f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\HelloWorld\target\HelloWorld_1.0.0.car to C:\Users\justin.m2\repository\com\microintegrator\projects\HelloWorld\1.0.0\HelloWorld-1.0.0.car
[INFO]
[INFO] --- synapse-unit-test:5.2.75:synapse-unit-test (synapse-unit-test) @ HelloWorld ---
[INFO]
[INFO] --- install:2.5.2:install (default-install) @ HelloWorld ---
[INFO] Installing f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\HelloWorld\pom.xml to C:\Users\justin.m2\repository\com\microintegrator\projects\HelloWorld\1.0.0\HelloWorld-1.0.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.837 s
[INFO] Finished at: 2024-12-09T12:16:28+05:30
[INFO] ------------------------------------------------------------------------
[2024-12-09 12:16:33,062] INFO {org.wso2.config.mapper.ConfigParser} - Overriding files in configuration directory f:\WSO2_Learning\wso2_product\wso2mi-4.3.0\bin..
[2024-12-09 12:16:33,517] INFO {org.wso2.config.mapper.ConfigParser} - Applying configurations with deployment configurations
Stopping the Micro Integrator Server
SUCCESS: The process with PID 23136 has been terminated.
`

As soon as build success, getting that pop up

@JustinRaj-S
Copy link
Author

Hi @ChinthakaJ98
I have shortened the directory path of the MI Server in Windows OS.

Before:F:\WSO2_Learning\wso2_product\wso2mi-4.3.0\wso2mi-4.3.0 (Failed)
Now: F:\WSO2_Learning\wso2_product\wso2mi-4.3.0 (Success)

After shortening Path, it is working as expected, and tested API via Runtime services

@JustinRaj-S
Copy link
Author

JustinRaj-S commented Dec 9, 2024

Hi @ChinthakaJ98

I think issue persists for some other project. I am trying this tutorialhttps://mi.docs.wso2.com/en/latest/learn/integration-tutorials/sending-a-simple-message-to-a-service/

As soon as build was successful, getting pop up like "CApp has encountered deployment issues. Please refer to the output for error logs."

ERROR Logs:
[INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.microintegrator.projects:MessageSample:pom:1.0.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 96, column 19 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] -------------< com.microintegrator.projects:MessageSample >------------- [INFO] Building MessageSample 1.0.0 [INFO] from pom.xml [INFO] --------------------------------[ pom ]--------------------------------- [WARNING] Ignoring incompatible plugin version 4.0.0-beta-1: The plugin org.apache.maven.plugins:maven-compiler-plugin:4.0.0-beta-1 requires Maven version 4.0.0-beta-3 [INFO] Latest version of plugin org.apache.maven.plugins:maven-compiler-plugin failed compatibility check [INFO] Looking for compatible RELEASE version of plugin org.apache.maven.plugins:maven-compiler-plugin [INFO] Selected plugin org.apache.maven.plugins:maven-compiler-plugin:3.13.0 [INFO] [INFO] --- clean:3.2.0:clean (default-clean) @ MessageSample --- [INFO] [INFO] --- dependency:3.5.0:copy-dependencies (default) @ MessageSample --- [INFO] [INFO] --- vscode-car:5.2.75:car (default) @ MessageSample --- [INFO] datamapper directory not found [INFO] ------------------------------------------------------------------------ [INFO] Building Composite Project [INFO] ------------------------------------------------------------------------ [INFO] Processing artifacts in f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\MessageSample\src\main\wso2mi\artifacts [INFO] Processing API definitions in f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\MessageSample\src\main\wso2mi\resources [INFO] Processing connectors in f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\MessageSample\src\main\wso2mi\resources [INFO] Processing registry resources in f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\MessageSample\src\main\wso2mi\resources [INFO] Processing metadata in f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\MessageSample\src\main\wso2mi\resources [INFO] datamapper directory not found [INFO] [INFO] --- install:2.5.2:install-file (install-car) @ MessageSample --- [INFO] pom.xml not found in MessageSample_1.0.0.car [INFO] Installing f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\MessageSample\target\MessageSample_1.0.0.car to C:\Users\justin\.m2\repository\com\microintegrator\projects\MessageSample\1.0.0\MessageSample-1.0.0.car [INFO] Installing C:\Users\justin\AppData\Local\Temp\mvninstall286000344121606296.pom to C:\Users\justin\.m2\repository\com\microintegrator\projects\MessageSample\1.0.0\MessageSample-1.0.0.pom [INFO] [INFO] --- synapse-unit-test:5.2.75:synapse-unit-test (synapse-unit-test) @ MessageSample --- [INFO] [INFO] --- install:2.5.2:install (default-install) @ MessageSample --- [INFO] Installing f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\MessageSample\pom.xml to C:\Users\justin\.m2\repository\com\microintegrator\projects\MessageSample\1.0.0\MessageSample-1.0.0.pom [INFO] ------------------------------------------------------------------------ **[INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.748 s [INFO] Finished at: 2024-12-09T13:07:09+05:30 [INFO] ------------------------------------------------------------------------ Stopping the Micro Integrator Server SUCCESS: The process with PID 8488 has been terminated.**

Screenshots added:
image
image

Kindly check on this

@justinraj96
Copy link

Hi @ChinthakaJ98 if you don't mind, could you able to check on this further once you are free?

@ChinthakaJ98
Copy link

Hi @JustinRaj-S,

We tried to reproduce this issue in a Windows OS but we were unable to reproduce it. May I know whether you are facing this issue intermittently or whether it happens continuously on specific projects?

@QuantumSupraLogic
Copy link

Hi @ChinthakaJ98 , @JustinRaj-S

I have the same issue.

From my experience, it works again, when I delete

  • wso2carbon.pid
  • tmlog0.log
  • tmlog.lck
  • xxx.xxx.xxx.xxx.tm0.epoch

and restart VSCode.

It seems to me that the cleanup does not happen correctly when stopping the server from VSCode. I already ruled out file permissions and UAC - the issue remains regardless if I have %mi_home% in my user folder or in the programs folder.

@JustinRaj-S
Copy link
Author

Hi @QuantumSupraLogic

I also deleted the files mentioned above(wso2carbon.pid, tmlog0.log, tmlog.lck and xxx.xxx.xxx.xxx.tm0.epoch) and restarted VSCode , However issue remains same for me

@JustinRaj-S
Copy link
Author

Hi @ChinthakaJ98

For every project I'm creating, facing the same issue. FYI, I tried another tutorial https://mi.docs.wso2.com/en/latest/learn/integration-tutorials/using-scheduled-tasks/ , this also leads to a similar issue, after build success, getting same pop-up "CApp has encountered deployment issues. Please refer to the output for error logs."

Screenshot:

image

@ChinthakaJ98
Copy link

Thank you @QuantumSupraLogic for sharing your experience with us as it will help us to look further into this issue.

@JustinRaj-S we will try to reproduce this from our end too and find the root cause for the issue you are facing. I will share an update once we pinpoint the issue and find a fix for it as soon as possible.

@QuantumSupraLogic
Copy link

Hi @JustinRaj-S

can you try to close VSCode (all instances) and all Java-processes, then delete the aforementioned files and start VSCode again.

@JustinRaj-S
Copy link
Author

Hi @QuantumSupraLogic

I tried closing visual studio by Ctrl + Shift + W --> Visual studio closed

and java process by taskkill /f /im java.exe --> The process "java.exe" not found.

Deleted all aforementioned files under WSO2 MI 4.3.0 distribution.

Re-Opened visual studio code again. Build and Run done in visual studio. as soon as build was successful, getting below ERROR

Micro Integrator Server:

[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.046 s
[INFO] Finished at: 2024-12-27T21:26:50+05:30
[INFO] ------------------------------------------------------------------------
[2024-12-27 21:26:55,359]  INFO {org.wso2.config.mapper.ConfigParser} - Overriding files in configuration directory f:\WSO2_Learning\wso2_product\wso2mi-4.3.0\bin\..
[2024-12-27 21:26:55,712]  INFO {org.wso2.config.mapper.ConfigParser} - Applying configurations with deployment configurations
Stopping the Micro Integrator Server
SUCCESS: The process with PID 3168 has been terminated.

Micro integrator:

detecting project 9:25:35 PM
MI project detected
Current workspace path: f:\WSO2_Learning\wso2_product\wso2_workspace\learn_mi\ScheduleTaskTutorial
Project detection completed 9:25:36 PM
Waiting for LS to be ready 9:25:36 PM
LS is ready 9:25:38 PM
[12/27/2024, 9:26:51 PM] [MI Debug] [INFO] Build and copy tasks executed successfully
[12/27/2024, 9:27:07 PM] [MI Debug] [ERROR] Error while checking for Server readiness: connect ECONNREFUSED 127.0.0.1:9201

Still same behaviour unfortunately.

@KalinduGandara
Copy link

This issue will be fix in new version - https://github.com/wso2-enterprise/vscode-extensions/pull/4442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants