Skip to content

Commit 1f82009

Browse files
committed
reserve ports 13371 to 13399 to avoid issues with 2222 (usually used for SSH)
1 parent d3d694d commit 1f82009

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/defaults.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
JOERN_JAVA_OPTS = "-Xmx4G -Xms2G -XX:+UseG1GC -Dfile.encoding=UTF-8"
1818
JOERN_SERVER_HOST = "localhost"
1919
JOERN_SERVER_PORT = 8080
20-
JOERN_PORT_MIN = 2000
21-
JOERN_PORT_MAX = 2999
20+
JOERN_PORT_MIN = 13371
21+
JOERN_PORT_MAX = 13399
2222
JOERN_SERVER_INIT_SLEEP_TIME = 3.0
2323

2424
# Joern HTTP connection pooling defaults

src/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ class JoernConfig:
110110
server_port: int = 8080
111111
server_auth_username: Optional[str] = None
112112
server_auth_password: Optional[str] = None
113-
port_min: int = 2000
114-
port_max: int = 2999
113+
port_min: int = 13371
114+
port_max: int = 13399
115115
server_init_sleep_time: float = 3.0
116116
# HTTP Connection Pooling
117117
http_pool_connections: int = 10

src/services/port_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class PortManager:
1313
"""Manages port allocation for Joern server instances"""
1414

15-
def __init__(self, port_min: int = 2000, port_max: int = 2999):
15+
def __init__(self, port_min: int = 13371, port_max: int = 13399):
1616
self.port_min = port_min
1717
self.port_max = port_max
1818
self._session_to_port: Dict[str, int] = {} # session_id -> port

src/tools/core_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ async def _generate_cpg_async(
298298

299299
logger.info(f"CPG generated successfully: {cpg_path}")
300300

301-
# Step 4: Start Joern server with randomly assigned port (2000-2999)
301+
# Step 4: Start Joern server with randomly assigned port (13371-13399)
302302
joern_port = None
303303
if joern_server_manager:
304304
try:

0 commit comments

Comments
 (0)