ARCAD-Software / elias-vscode

ARCAD-Elias VSCode extension
Other
2 stars 0 forks source link

Unable to reach /elias/arcad/v1 url #5

Closed mlstoppa closed 10 months ago

mlstoppa commented 10 months ago

Hi! I am trying to have the Elias Rest API Server running stand-alone on two different PCs, both running Windows 11.

One PC runs the following version of Java:

openjdk version "1.8.0_252"                                                                                                                               
OpenJDK Runtime Environment (build 1.8.0_252-b09)                                                                                                         
Eclipse OpenJ9 VM (build openj9-0.20.0, JRE 1.8.0 Windows 10 amd64-64-Bit Compressed References 20200422_667 (JIT enabled, AOT enabled)                   
OpenJ9   - 05fa2d361                                                                                                                                      
OMR      - d4365f371                                                                                                                                      
JCL      - 5e623848e9 based on jdk8u252-b09)    

so Jetty 9.4 has been installed.

The other PC runs the following version of Java:

openjdk version "15.0.2" 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 15.0.2+7)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.24.0, JRE 15 Windows 10 amd64-64-Bit Compressed References 20210121_173 (JIT enabled, AOT enabled)
OpenJ9   - 345e1b09e
OMR      - 741e94ea8
JCL      - 863b523566 based on jdk-15.0.2+7)

so Jetty 11 has been installed instead.

Both PCs have the same number of Jetty modules installed and the same Jetty configuration addressing localhost in port 2012.

Both PCs are able to launch Arcad extension on VSC and connect to the development system.

Here is the difference: when adding an environment, the first PC is able to call the Elias Rest API Server correctly and receive the information back, while the second one returns an error, which I wasn't able to recover. That's the trace information fo the second PC:

[8/14/2023 5:16:49 PM] [TRC] REST request ARCAD-Elias REST (http) DEVELOPM.GUESS.NET@lbarchi: get /ping  
[8/14/2023 5:16:50 PM] [ERR] 404 - Not Found: {"servlet":"default","message":"Not Found","url":"/elias/arcad/v1/ping","status":"404"}
[8/14/2023 5:16:50 PM] [TRC] {"connection":"close","cache-control":"must-revalidate,no-cache,no-store","content-type":"application/json","content-length":"92","server":"Jetty(11.0.15)"}
[8/14/2023 5:16:50 PM] [ERR] Failed to reach Elias ping /ping
[8/14/2023 5:16:50 PM] [ERR] Error: Request failed with status code 404
[8/14/2023 5:16:50 PM] [ERR] Can't ping http://localhost:2012/elias/arcad/v1
[8/14/2023 5:16:50 PM] [ERR] Error: Request failed with status code 404

I assume the error might be how the elias.war file was deployed into the stand-alone Jetty instances, but I couldn't find any information related to it, nor is available the documentation about how the Elias Rest API Server will be deployed to the IBMi server.

Can you please help me? Thank you

MichelMouchon commented 10 months ago

Ha lucia, I am going to let support to answer you, bit i have a question. Why do you have 2 Elias server ? Normally we have the elias server and it cloud be installed on the ibm i… Tomorrow 15/8 is public holiday (maybe in Italy as well) so the Specialist may only answer by the 16/8.

Cordialement Michel Mouchon 0684513864

Le 14 août 2023 à 17:34, Lucia Stoppa @.***> a écrit :



Hi! I am trying to have the Elias Rest API Server running stand-alone on two different PCs, both running Windows 11.

One PC runs the following version of Java:

openjdk version "1.8.0_252" OpenJDK Runtime Environment (build 1.8.0_252-b09) Eclipse OpenJ9 VM (build openj9-0.20.0, JRE 1.8.0 Windows 10 amd64-64-Bit Compressed References 20200422_667 (JIT enabled, AOT enabled) OpenJ9 - 05fa2d361 OMR - d4365f371 JCL - 5e623848e9 based on jdk8u252-b09)

so Jetty 9.4 has been installed.

The other PC runs the following version of Java:

openjdk version "15.0.2" 2021-01-19 OpenJDK Runtime Environment AdoptOpenJDK (build 15.0.2+7) Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.24.0, JRE 15 Windows 10 amd64-64-Bit Compressed References 20210121_173 (JIT enabled, AOT enabled) OpenJ9 - 345e1b09e OMR - 741e94ea8 JCL - 863b523566 based on jdk-15.0.2+7)

so Jetty 11 has been installed instead.

Both PCs have the same number of Jetty modules installed and the same Jetty configuration addressing localhost in port 2012.

Both PCs are able to launch Arcad extension on VSC and connect to the development system.

Here is the difference: when adding an environment, the first PC is able to call the Elias Rest API Server correctly and receive the information back, while the second one returns an error, which I wasn't able to recover. That's the trace information fo the second PC:

[8/14/2023 5:16:49 PM] [TRC] REST request ARCAD-Elias REST (http) @.***: get /ping [8/14/2023 5:16:50 PM] [ERR] 404 - Not Found: {"servlet":"default","message":"Not Found","url":"/elias/arcad/v1/ping","status":"404"} [8/14/2023 5:16:50 PM] [TRC] {"connection":"close","cache-control":"must-revalidate,no-cache,no-store","content-type":"application/json","content-length":"92","server":"Jetty(11.0.15)"} [8/14/2023 5:16:50 PM] [ERR] Failed to reach Elias ping /ping [8/14/2023 5:16:50 PM] [ERR] Error: Request failed with status code 404 [8/14/2023 5:16:50 PM] [ERR] Can't ping http://localhost:2012/elias/arcad/v1 [8/14/2023 5:16:50 PM] [ERR] Error: Request failed with status code 404

I assume the error might be how the elias.war file was deployed into the stand-alone Jetty instances, but I couldn't find any information related to it, nor is available the documentation about how the Elias Rest API Server will be deployed to the IBMi server.

Can you please help me? Thank you

— Reply to this email directly, view it on GitHubhttps://github.com/ARCAD-Software/elias-vscode/issues/5, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABPC24WBN6EITS2D4MVDKZ3XVJARBANCNFSM6AAAAAA3P3USII. You are receiving this because you are subscribed to this thread.Message ID: @.***>

mlstoppa commented 10 months ago

Hi Michael, The point is I am not loading the Elias REST API Server on IBMi, at least not for now. For us (external developers) to test how the VSC works before asking our customers to do so, we decided to load the server locally, on our computers. If I knew how is configured the Jetty instance on the IBMi I would probably be able to make the same configuration on my local Jetty instance. Thank you

sebjulliand commented 10 months ago

Hi there! There is indeed no in-depth information for elias.war deployment as of yet, mainly because we provide a pre-packaged Jetty installation for both Windows and IBM i. That's the preferred way to install it since it's the most plus and play approach.

Deploying the war file by yourself on either IBM i or Windows is up to you. You can use Jetty, but other options are available (e.g. Tomcat or even using a Jetty Docker image).

But usually, deploying it in Jetty works fine (dropping it in the webapps folder is enough). The key point being it must be deployed on the /elias endpoint. However, it's only been tested on Jetty 9.x with Java 8.

Reach out to me if you need assistance downloading the Windows setup package. That may save you some time 😊

mlstoppa commented 10 months ago

Hi Sebastien! So, the key here is that the non-working instance is running Jetty 11. Maybe some more modules are needed, will give it a try. As regards the Windows setup package, yes!, please, tell me where can I find it as I remember to have seen it nowhere, so I can try confronting the installation. Thank you

sebjulliand commented 10 months ago

The best I can do for now is send it over to you through WeTransfer since you don't have access to the customer portal at the moment. You must have received it.

mlstoppa commented 10 months ago

Hi Sebastien! I downloaded the file, but will do the test tomorrow when my colleague will come back to work. Anyway, can you please tell me where the Windows setup package can be found on the customer portal? I don't have access to it, but other colleagues of mine do. The only reference to VSC that I found is on this page image but I couldn't recognize the file you sent me. Thank you

sebjulliand commented 10 months ago

You're welcome. It seems it's not been put on the portal in the first place, since the Windows installation of the server is supposed to remain exceptional. But I'll ask for it to be put with the next upgrade.

Let me know if your tests are successful and close this issue if so 🙂 Thanks!

mlstoppa commented 10 months ago

Hi Sebastien, The Windows bundle works smoothly and fine on both the installation, my colleague's PC and mine, so we need a separate installation and configuration no more. Assuming the bundle contains everything that's needed for the Elias REST API server to work, it doesn't interfere with all the rest as it is a self-contained environment. So, we have already started using it, and are getting accustomed to the differences towards RDi extension. Perfect! Many thanks One last thing: in case we would ask questions on how it works compared to RDi (functions we don't find or other stuff like this) where are we supposed to post our questions?

sebjulliand commented 10 months ago

Glad it works @mlstoppa ! In case you have other questions, feel free to post them here, as issues, labelled with the question tag. image

This will help create a shared knowledge base 😉

mlstoppa commented 10 months ago

Will do!