Can't access my Web app running on a tomcat server from another computer in same network - eclipse

here's my problem, I have a Webservice that I run in tomcat using eclipse, and I have an android app connected to that Webservice. I access to that localhost using the local ip of my computer. Yes my phone is using same network. Sometimes when I launch the server, it's like I didnt, my app cant find a route and when I restart my computer everything works again. So my question is: What could be the problem because its kinda annoying to always have to restart my computer. I need a definitive solution. Thanks

Related

How to access chrome dev tools on a chromebook from another machine

I recently followed many guides about how to get the chromebook into dev mode, allow modifications by making the linux OS writable and how the forwarding works. Also opened the firewall to allow any traffic. I've entered the --remote-debugging-port=2253 and --remote-debugging-address=0.0.0.0 to the /etc/chrome-dev.conf file. The reason I entered 0.0.0.0 is because to my understanding, chrome does not by default allow remote hosts to connect and is by default only listening to localhost. (This method worked on Ubuntu, macOS and windows devices.)
Now when I start chrome and browse to localhost:2253 I indeed get to see inspectable pages. However, I cannot access these from another machine. (Even with forwarding enabled)
Is there something I am missing or doing wrong? The reason I want to access these pages is because I'm trying to run an automated remote test (with puppeteer) that takes screenshots while 'using' our application.
I've also tried to take another path and get node running on the chromebook without success. I tried doing this with NVM but When installing NVM it fails because of permissions errors. Even when running as sudo.
I hope someone can help me so I can remotely connect to the device with the chrome devtools.

Debug RESTful service from external device, unfamiliar error message

I have been working on a RESTful service (with VS 2015) for about 4 months now, on a Windows 7 development laptop (I don't know if Windows 7 is playing a role here, but I mention it for completeness).
I just purchased a new development machine with Windows 10. I copied my code to that machine, installed VS2015, etc (re-created my development environment).
When I right-click the service project and select Debug->Start new instance, everything works fine, and I can interact with the service from a browser using "http://localhost:[port]/api....."
However, I wish to interact with the service via my android app, that I am developing. I followed the instructions here:
http://becdetat.com/access-iis-express-from-another-machine.html
Namely, I ran the "netsh" command, made the necessary changes to applicationhost.config, etc. On my Windows 7 machine, this worked great and I was able to develop my mobile app.
However, on my new machine, the command:
netsh http add urlacl url=http://192.168.xx.xx:[port]/ user=everyone
causes me to get an error when I attempt to start the service in the debugger. The error is "There was a temporary DNS error. Try refreshing the page. Error Code: INET_E_RESOURCE_NOT_FOUND"
If I then execute:
netsh http delete urlacl url=http://192.168.xx.xx:[port]/
the service runs fine, but I still cannot access it from my android device.
As I mentioned, this worked just fine on my Windows 7 machine.
Thanks for any help.....

UWP Sockets Unable to Connect Over LAN

I am having some issues with sockets in UWP.
I'm trying to test some simple socket communications (stripped down version of the MSDN example) between a mobile and a desktop on the same LAN subnet. I am developing in a VM (on a separate desktop) and can deploy to the VM and mobile. In that case connections work fine.
When I create an app package and install it on the desktop, I cannot connect.
I have windows firewall on the desktop completely off. The VM is set to have a separate IP on the network. I have checked all IPs I'm using are correct.
I am getting the typical: A connection attempt failed because the connected party did not properly respond after a period of time
This is driving me crazy, if anyone has any helpful advice that would be much appreciated!
edit: To clarify the above.
My app has both both client and server roles (can connect to a listener, and is also listening itself).
App (on Mobile) --> App (on VM, deployed from VS) - this works fine, Mobile can connect to VM no problem.
App (on Mobile) --> App (on Desktop, installed from appx) - Mobile unable to connect to Desktop. Firewall on desktop disabled. Task Manager shows .exe listening on the correct port.
Thanks, Inci
Found a solution to this - it appears connections over LAN need to have the Internet(Client & Server) capability selected.
I am most certainly connecting over my local network (specifically 192.168.0.15 (mobile) to .21 (desktop). It seems that when deploying with VS the app doesn't need the Internet capability.
If there is a more 'correct' solution I'll amend this.

iphone app private test network

I am developing an iPhone app that relies on a custom web service I created using Ruby on Rails. I want to setup a test server on my Mac without having to change the URLs that my app is pointing to - served by the RoR service. This way I can test new features or fixed bugs more easily using the test RoR server.
I have enabled internet sharing on my Mac so I can connect with my iphone to a private wifi network. I installed dnsmasq and edited my /etc/hosts file to resolve my web service URLs to the local gateway ip. However when I use my iphone app the URLs are resolved to the production server instead of my test server (my Mac).
How do I setup dnsmasq to point to the local ip.
Thanks!
Have you set the DNS server address on the iPhone to the IP address of your Mac?
After playing with it some more I was able to get it to work. I needed to edit /opt/local/etc/dnsmasq.conf and change the 'address' tag. I also had to change my Mac ethernet settings, under advance->dns I had to add 127.0.0.1 as the first dns server. This will automatically change resolv.conf which is not meant to be edited manually on a Mac.
After reading up a bit on the Dnsmasq solution, I found a nice step-by-step guide for Mac: http://davesouth.org/stories/how-to-set-up-dnsmasq-on-snow-leopard-for-local-wildcard-domains
(although personally I use Fiddler in a Windows VM for all of this sort of thing - ask if you'd like some details on that..)

Debugging a GWT application in a remote environment

I have deployed my GWT application to its target environment (i.e. compiled and copied the war directory contents to the target device's /var/www) and some parts of it are not working. I understand that I can debug my local instance of the GWT app as if it were running in the target environment, by opening the deployed GWT App URL and adding gwt.codesvr URL parameter to it, like this:
http://deployment_host/gwtapp.html?gwt.codesvr=localhost:9997
I get
Plugin failed to connect to Development Mode server at localhost:9997
Follow the underlying troubleshooting instructions
My Chrome browser is running on the same machine as Eclipse, so localhost above should be ok. Just to make sure, I've added -bindAddress 0.0.0.0 in the Run/Debug configuration in Eclipse and tried with my external IP/hostname, with no change, except that the error message is updated accordingly. What am I doing wrong?
If I replace deployment_host with localhost above everything works fine, but it's of no use to me to debug locally. (There is some Proxy and ReverseProxy-ing going on in the local Apache, so I do not need the 8888 port when running locally, but this should be unrelated)
Questions Debugging GWT applications outside of dev mode? and Debug GWT application in a remote browser are related but do not help.
If you are using chrome, look in the address bar at the right for a grey GWT icon. In any other browser, you would see a popup message confirming that you want to debug, but in Chrome this apparently isn't possible.
Click the icon, and it will ask you to whitelist this site as allowed to run Java locally on your computer. After you whitelist it, it should run correctly.
Along the same lines as the answer above Ive just had some success restarting the extension helped (but restarting browser hadnt)
Just enable and disable it in :
chrome://chrome/extensions/
Good luck! It's the only thing wrong with GWT imho...