Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Change Jetty/Maven listening ip/port on Android 6(Hi guys, need help. I have an android device (router) that uses Jetty v7.5.4.v20111024 as webserver for the web interface, and it listens to port 8080 on all interfaces - blocking access to external)
Change Jetty/Maven listening ip/port on Android 6 [message #1859487] Sat, 10 June 2023 19:17 Go to next message
Miki Berkovich is currently offline Miki BerkovichFriend
Messages: 1
Registered: June 2023
Junior Member
Hi guys, need help and i hope I'm posting this in the right forum.

I have an android device (router) that uses embedded Jetty v7.5.4.v20111024 (Maven) as the webserver for the router's web interface.

The problem is that it listens to port 8080 on all interfaces - therefore blocking access to external sites - any sites that I try to access is "picked up" by the jetty's router admin control page.

I understood that Jetty comes with a default setting of listening to 0.0.0.0 (all interfaces) on port 8080 - this exactly I need to change, but I have no idea how to do it - which is why I'm posting this here and i'll appreciate any help.

Here's some information from the device itself:

List of files in the directory /data/data/com.android.phone/cache/jetty-0.0.0.0-80-ROOT.war--any-/webinf/WEB-INF/lib (This seems to be the location of the Jetty server runtime classes):

-rw------- radio    radio    10474232 2022-09-06 21:06 classes.zip
-rw------- radio    radio       77587 2020-04-26 23:31 jetty-client-7.5.4.v20111024.jar
-rw------- radio    radio       20195 2020-04-26 23:31 jetty-continuation-7.5.4.v20111024.jar
-rw------- radio    radio      115084 2020-04-26 23:31 jetty-http-7.5.4.v20111024.jar
-rw------- radio    radio       90950 2020-04-26 23:31 jetty-io-7.5.4.v20111024.jar
-rw------- radio    radio       70093 2020-04-26 23:31 jetty-servlets-7.5.4.v20111024.jar
-rw------- radio    radio      215624 2020-04-26 23:31 jetty-util-7.5.4.v20111024.jar


Location of the web interface itself (named ROOT.war and is located in /storage/emulated/0/lrserver):

root@cpf906_35_c2k_36g_p:/storage/emulated/0 # ls -l
drwxrwx--x root     sdcard_rw          2017-01-01 02:00 0
drwxrwx--x root     sdcard_rw          2016-01-01 02:00 apkupdate
drwxrwx--x root     sdcard_rw          2016-01-01 02:00 imgss
drwxrwx--x root     sdcard_rw          2016-01-01 02:00 lrserver
drwxrwx--x root     sdcard_rw          2017-01-01 02:00 obb
root@cpf906_35_c2k_36g_p:/storage/emulated/0 # cd lrserver
root@cpf906_35_c2k_36g_p:/storage/emulated/0/lrserver # ls -l
drwxrwx--x root     sdcard_rw          2016-01-01 02:00 contexts
drwxrwx--x root     sdcard_rw          2023-06-10 17:51 etc
drwxrwx--x root     sdcard_rw          2016-01-01 02:00 tmp
-rw-rw---- root     sdcard_rw       10 2016-01-01 02:00 version.code
drwxrwx--x root     sdcard_rw          2016-01-01 02:00 webapps
root@cpf906_35_c2k_36g_p:/storage/emulated/0/lrserver # ls -lR

.:
drwxrwx--x root     sdcard_rw          2016-01-01 02:00 contexts
drwxrwx--x root     sdcard_rw          2023-06-10 17:51 etc
drwxrwx--x root     sdcard_rw          2016-01-01 02:00 tmp
-rw-rw---- root     sdcard_rw       10 2016-01-01 02:00 version.code
drwxrwx--x root     sdcard_rw          2016-01-01 02:00 webapps

./contexts:

./etc:
-rw-rw---- root     sdcard_rw     1420 2016-01-01 02:00 keystore
-rw-rw---- root     sdcard_rw       49 2016-01-01 02:00 realm.properties
-rw-rw---- root     sdcard_rw    23528 2016-01-01 02:00 webdefault.xml

./tmp:

./webapps:
-rw-rw---- root     sdcard_rw 13773890 2016-01-01 02:00 ROOT.war


(The ROOT.war file seems to contain all the .jar files from the previous quote + the html files required to run the web interface from the first picture).

The .jar files of the jetty server each contains a directory named "META-INF/maven/org.eclipse.jetty/<name_of_jar>" that contains a pom.xml and pom.properties files, but I don't know where the setting needs to be changed at, and also I'm worried that if I apply a wrong setting - the web server won't load at all and then i'll basically have no way of connecting to the router.

What change should I do , and where should i do it?
Is it in the jetty-*.jar files' pom.xml files ?
Or in the ROOT.war ?
Or in the webapps' webdefault.xml file ?

Thanks in advance!
Re: Change Jetty/Maven listening ip/port on Android 6 [message #1859490 is a reply to message #1859487] Sun, 11 June 2023 04:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
It's probably better to look at this page for the best place to ask questions:

https://www.eclipse.org/jetty/support.php

Using a 12 year old version of Jetty seems questionable...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Change Jetty/Maven listening ip/port on Android 6 [message #1859554 is a reply to message #1859490] Wed, 14 June 2023 22:07 Go to previous messageGo to next message
Kabiru Usman is currently offline Kabiru UsmanFriend
Messages: 42
Registered: April 2023
Member
The port and IP binding configuration are usually found in a Jetty configuration file, not in the .jar files or the ROOT.war. Check the "/etc" directory in "/storage/emulated/0/lrserver".
You may find a file like "jetty.xml" or "server.xml". Locate the part where it mentions "Connector" or "ServerConnector", change the "port" to your desired value and "host" to a specific IP.
Please remember to take a backup first, as any incorrect changes can make the server unresponsive.
Re: Change Jetty/Maven listening ip/port on Android 6 [message #1859566 is a reply to message #1859487] Thu, 15 June 2023 15:52 Go to previous message
Nitin Dahyabhai is currently online Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Miki Berkovich wrote on Sat, 10 June 2023 15:17
The problem is that it listens to port 8080 on all interfaces - therefore blocking access to external sites - any sites that I try to access is "picked up" by the jetty's router admin control page.


I guess I'll be the one to point out that consuming traffic intended for a particular port number, regardless of the intended IP address, is not how routers usually work.


_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Thu, 15 June 2023 15:52]

Report message to a moderator

Previous Topic:error Apacha Tika
Next Topic:Eclipse freezes every time after a bit of usage
Goto Forum:
  


Current Time: Sat Apr 27 21:40:47 GMT 2024

Powered by FUDForum. Page generated in 0.09491 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top