Not able to access webservice from same network java - java

My webservice is running on jboss and client is on the tomcat
both client and webservice is running perfect on my local machine.
but if i setup client on another machine, the client program giving an error message 404 not found
I have shared my jboss over network and i am able to access webservice wsdl from another machine using http:192.168.1.26:8080/FalconServer/SearchService?wsdl
I set the same url in Client code.
but it won't work, any help

I wanted to put this as a comment, but i dont seem to find a comment button.
Did you start your jboss binding to your ip address. One way to do that:
run -b

Related

Requesting API service from docker container fails

I have a docker container running java program, which is using API service of a third party. When I run the jar file on ec2 machine, it works well and gets connected to service and fetches the data also but when I containerize the jar file, it doesn't connect to the API service. API service exposes itself on port 14002. I do understand that container can send the things out but cant receive anything unless we tell it to do.
Can anybody tell me, how do I tell my java program to get the service of API running on 14002 port?
Thanks
thanks all for your comments here. I was able to resolve this issue, simply by changing the base image from FROM openjdk:8-jdk-alpine to FROM openjdk:8-jdk. In the alpine image, I was not able to ping the api dns from inside the container usining telnet. But after changing it to only openjdk:8-jdk, I was able to ping the external dns. So it was the issue in image

How can I access a service installed on Kubernetes from anywhere?

I am working on a mac machine and installed the latest Kubernetes and followed the example here (this is for dev’t purpose). All went smooth but I was hoping that Kubernetes provide me an ip address and port number where my service will be listening to so that I can access it from anywhere.
Please correct me if I am wrong.
I was able to run ifconfig as well as curl $(minikube service hello-minikube --url) and I was able to see the ip address and port but I wasn’t able to access it outside command line where Kubernetes lives in.
The reason I am trying to access it outside the VM is because we have other projects that run on other machines and I wanted to call the REST service I installed while we are on dev env. This way we don’t have to wait until the service is pushed to production.
FYI: This is my first micro service project and I would appericiate your feedback.
I followed the steps in the article you linked and it works as expected.
Just do:
minikube service hello-minikube --url
You will get a url like http://192.168.99.100:32382/ - the port and IP could and will change for you. Also note that the exposed port will be a random port like the 32382 and not 8080 that the pod uses.
Use the url in your browser, say and you should be able to see the output of the service.

Moving webapp from localhost to server - page cannot be found

I have developed a Play! 1.2.7 web application which calls an existing online payment service, eclipsified to work in Java.
I send data in POST to a servlet and get a response in GET to my application. This is possible because one of the data sent to the service is the URL of my controller handling the response.
I had this working perfectly in local environment but when I move the webapp to a Tomcat container on our local server with public ip I'm stuck because service response cannot find my webapp as it used to do with localhost.
Locally the URL was something like
http://localhost:port/myAction
When I put it on tomcat I changed the URL to
http://my.public.ip.address:tomcat_port/app_name/myAction
I get the "page is not available" message from browser.
My guess is that I miss some basics from network communication and I'd like to know how to have this working when the application is deployed on our server.
Ps. sorry for bad tagging, I'm not sure what's this question's target
EDIT: no logs from catalina.out. If I run the application nothing gets logged
I came across the solution by knowing that loopback is not enable by default on every router.
So I will never be able to have a response client side when I send the request from the lan where the server is located, unless loopback is enabled on the router.
To test my application I had to use the server local address, visible from inside.

Configuring Tomcat to communicate through proxy in Localhost - Fiddler

Tomcat is running in my localhost on standard 8080 port. When tomcat calls a service (soap/rest) running in the same server, I would like to capture it through fiddler.
Basically, any request that tomcat sends out, should be captured through Fiddler. Currently, it sends out request to another service running the same machine and that service in turn calls Amazon AWS, which I would like to capture as well.
Can anyone help? Note that this is opposite of traditional web request through proxy to the server.
I am open to any other alternatives as well.
Please have a look at How to capture SOAP messages from a Tomcat Java app to an external server? for information on setting the proxy for Tomcat.
The correct JVM parameters should look like: -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8888 -DproxySet=true -DproxyHost=127.0.0.1 -DproxyPort=8888

How to debug Java Server working for localhost but not public IP

Noob question but I'm not sure where to look:
I'm running a Java Web App on a remote linux machine (Jersey RESTful API is the goal). The server successfully runs and can handle requests locally to localhost:8080/foobar but I cannot make requests to the various urls from anywhere else (For example, my laptop through a browser).
This is a simple problem I've have many times but have no idea what terms to search on google or where to look for help debugging the problem, so any leads or advice would be greatly appreciated.
Further details:
Project is code added to a Maven2 generated archetype of a Jersey Service
This is most likely caused by firewalling on the server or in front of the internal network your server is running on. Talk to your network administrators about opening a hole for port 8080, or consider using a reverse proxy on port 80 (if open) to forward requests to port 8080. See http://en.wikipedia.org/wiki/Reverse_proxy if you are not familiar with the idea of a reverse proxy or load balancers.
Change the localhost entry in your "/etc/hosts" file, with the network configs, and if server is tomcat, edit the $CATALINA_HOME/conf/server.xml to add IP the relevant <Connector> element.
Make sure you have better idea handling /etc/hosts

Categories

Resources