Author Message
rangari
Joined: Jun 18, 2015
Messages: 132
Offline
Hello All,

I have created the one simple http based Breeze snap-in using the 'Avaya Breeze Snap in Development guide Release' documents.
My sample snap-in just returning the 'Hello World'. Below are the two files with code which is present in my snap-in code:

1) MyResource

package com.avaya.testservice;

import javax.ws.rs.GET;
import javax.ws.rs.Path;

/*
* This class is needed if you are trying to write a JAX-RS based web service. You can enhance this as needed for the application.
*
* For applications which provide call related features only and web service is not required, remove this class.
*
*/

@Path("/myResource")
public class MyResource
{
@GET
public String doGet()
{
return "Hello World";
}
}

2) MyApplication

package com.avaya.testservice;

import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
/*
* This class is needed if you are trying to write a JAX-RS based web service. You can enhance this as needed for the application.
*
* For applications which provide call related features only and web service is not required, remove this class.
*
*/
@ApplicationPath("/ws")
public class MyApplication extends Application
{
//Don't need to implement getClasses
}



After hitting the below url in the browser, I am getting the ' 400 Bad request' error.

https://<Avaya Breeze_FQDN>/services/TestingService/ws/myResource

I have followed all the steps from dev guide for creating sample application. But still getting the same error. I am not able to find out why this error is coming.

Can you please guide me how to solve this error.


Thanks in advance
PatrickPeng
Joined: Feb 12, 2007
Messages: 9
Offline
The 400 error seems indicating the request not even hit the service yet...
Can you collect more information from your system?
(1) run "deploy_service -lv" and that can verify whether your service was deployed correctly.
(2) run "traceHTTP" tool that will collect the trace of all the http request/response on the server. Send me the /var/log/Avaya/trace/nginx_http.log


rangari
Joined: Jun 18, 2015
Messages: 132
Offline
Hello Patrick,

Thanks for reply.

Can you please check the above code which I pasted. Please confirm the above code looks good to you.


Thanks
rangari
Joined: Jun 18, 2015
Messages: 132
Offline
Hello Patrick,

Today, I have deployed my same sample snap-in with the different name i.e. 'TestingMsg'. Still I am getting the ' 400 Bad request' error.

As you suggested,
1) after running 'deploy_service -lv', I am getting the below result:
load: + deploy: + run: + car: = TestingMsg-1.0.0.0.0.

2) After running the run "traceHTTP" tool, I am getting the below result:

¦¦HTTP/1.1 400 ¦
¦Connection: close ¦
¦Content-Type: text/html ¦
¦Content-Length: 566 ¦
¦ ¦
¦<html> ¦
¦<head><title>400 Bad Request</title></head> ¦
¦<body bgcolor="white"> ¦
¦<center><h1>400 Bad Request</h1></center> ¦
¦<hr><center>web</center> ¦
¦</body> ¦
¦</html> ¦
¦<!-- a padding to disable MSIE and Chrome friendly error page --> ¦
¦<!-- a padding to disable MSIE and Chrome friendly error page --> ¦
¦<!-- a padding to disable MSIE and Chrome friendly error page --> ¦
¦<!-- a padding to disable MSIE and Chrome friendly error page --> ¦
¦<!-- a padding to disable MSIE and Chrome friendly error page --> ¦
¦<!-- a padding to disable MSIE and Chrome friendly error page -->

I have also attached the 'nginx_http.log' file.

Please help me to solve this error.

Thnanks.
Filename nginx_http.log [Disk] Download
PatrickPeng
Joined: Feb 12, 2007
Messages: 9
Offline
Looked on the previous test code again and didn't see any issue... but it seems like Nginx still cannot find the match path.
Can you send me the TestingMsg svar your built and /etc/nginx/ce_conf.d/http_TestingMsg_80.conf?
rangari
Joined: Jun 18, 2015
Messages: 132
Offline
Hello Patrick,


Please find the attached files of TestingMsg svar, my built and http_TestingMsg_80.conf file

Thanks
Filename http_TestingMsg_80.conf [Disk] Download
Filename TestingMsg-1.0.0.0.0.svar [Disk] Download
Filename TestingSnap.zip [Disk] Download
PatrickPeng
Joined: Feb 12, 2007
Messages: 9
Offline
I installed the TestingMsg on my server and everything looks good. Can you try this command from the Breeze node?
[root@vf-zr25 ce_conf.d]# curl -vL http://127.0.0.1:9080/TestingMsg-1.0.0.0.0/ws/myResource
* About to connect() to 127.0.0.1 port 9080 (#0)
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 9080 (#0)
> GET /TestingMsg-1.0.0.0.0/ws/myResource HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 127.0.0.1:9080
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/atom+xml
< Content-Language: en-US
< Transfer-Encoding: chunked
< Date: Thu, 01 Aug 2019 16:47:53 GMT
<
* Connection #0 to host 127.0.0.1 left intact
Hello World


Most likely the issue is on your environment, not the app. Can you try the followings if it still doesn't work?
(1) run "statapp" and verify WebSphere state
(2) verify the replication is GREEN to this Breeze node on SMGR
(3) run "was app list" to collect output
(4) try "was restart" and see whether that helps
  • [Thumb - output.png]
[Disk] Download
Go to:   
Mobile view