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

BRAVA doesn't reach local server #75

Open
ydeoliveira opened this issue Jul 7, 2023 · 4 comments
Open

BRAVA doesn't reach local server #75

ydeoliveira opened this issue Jul 7, 2023 · 4 comments

Comments

@ydeoliveira
Copy link

Hi,

I continue to try to test BRAVA on a local instance. For now, I succeded to compile from master branch but I face some troubles to test my implementation of the BrAPI.
BRAVA runs well on http://localhost:8080/ and I can reach the interface and try to test my own server. My own server is located also on localhost and run on port 8000.

Then, I fill the form with the endpoint url of my BrAPI (http://127.0.0.1:8000/api/v2.1/) and select the 2.1 version of the BrAPI for testing.
But, unfortunately, I get a "can't connect to tested server" error when clicking on "Test it now !" button :

image

Concerning the logs I don't have much things to show :

  • Jetty display a single line :
    77654 [qtp62096277-36] INFO de.ipk_gatersleben.bit.bi.bridge.brapicomp.testing.runner.TestItemRunner - New Request. URL: http://127.0.0.1:8000/api/v2.1/serverinfo

  • The browser console also doesn't show any message ...

  • On the server side, as expected, There isn't any log, the server is indeed not reached.

But as shown here :

image

The server URL is reachable, i can open it through a browser and display the result in my browser.

Sorry for this weak inforamtion, but do you have any clue of what can happen ?
Thanks for your help.

Additional information :
In the configuration file, I had to fill http.proxyHost (value=localhost) and http.proxyPort (value=80) as I get a NumberFormatException (traceback below)

java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString (NumberFormatException.java:65) at java.lang.Integer.parseInt (Integer.java:662) at java.lang.Integer.parseInt (Integer.java:770) at de.ipk_gatersleben.bit.bi.bridge.brapicomp.AppServletContextListener.contextInitialized (AppServletContextListener.java:66) at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized (ContextHandler.java:1040)

@patrick-koenig
Copy link
Collaborator

Hi @ydeoliveira

please try the following procedure:

  • Completely remove the config options http.proxyHost= and http.proxyPort= from the config file, meaning delete the whole lines in the config files (this should deactivate the proxy setup step in BRAVA)
  • Restart the application and check if it works now
  • And please give us feedback here in this issue if it works now or not

Best regards,
Patrick (IPK Gatersleben)

@cpommier
Copy link
Member

HI @patrick-koenig , I have the same problem as @ydeoliveira . I already removed the proxy configuration and it helps. But I get a 404 .
image
The tested url works. In the access log of the tested applicaiton, I see no connection attempt. Would you have any hint ?

@cpommier
Copy link
Member

got it, it forces on port 8080

13695 [qtp551494848-39] INFO  de.ipk_gatersleben.bit.bi.bridge.brapicomp.testing.runner.TestItemRunner  - New Request. URL: http://localhost/brapi/v2/serverinfo
14240 [qtp551494848-39] DEBUG org.apache.http.impl.conn.BasicClientConnectionManager  - Get connection for route {}->http://localhost:8080

@cpommier
Copy link
Member

cpommier commented Jul 18, 2023

Ok it's working, I deployed my applicaiton on 8080 and brava on 8090

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

No branches or pull requests

3 participants