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

How to change port number of php java bridge? #61

Closed
oanqa opened this issue Jan 25, 2019 · 6 comments
Closed

How to change port number of php java bridge? #61

oanqa opened this issue Jan 25, 2019 · 6 comments
Labels

Comments

@oanqa
Copy link

oanqa commented Jan 25, 2019

Can we change the default port number 9267 to something else?

@belgattitude
Copy link
Owner

I don't think so, at least without recompiling

static int TCP_PORT_BASE = 9267; //try to find a free port in the range 9267, ..., 9366

It's a starting port for each context (you generally have only one)... I won't explain in too much details.

Personally I would not do it... docker is cool for that.

See an old projet https://github.com/belgattitude/jasper-bridge-docker I did. Don't know if it works but can be a base if you want to translate ports....

@belgattitude
Copy link
Owner

I must add I don't really master docker ;)

@oanqa
Copy link
Author

oanqa commented Jan 29, 2019

i'm aware of docker ports mapping, i also using docker for serving java bridge. But in soluble-japha port 9267 is the redirect port from the java-bridge side. So we cannot use port mapping for this use case unless we can change the redirect port from the php client

@belgattitude
Copy link
Owner

Yes indeed, then I don't really know. If you have an idea, I can have a look but for now I'm not using the bridge anymore.

@oanqa
Copy link
Author

oanqa commented Jan 29, 2019

For quick fix, now i'm "force" changing the $headers['redirect'] to the port that we are mapping for the host container

@belgattitude
Copy link
Owner

belgattitude commented Jan 29, 2019

Yes it's possible,

Be aware that in the case you deploy multiple javabridge instances on Tomcat or the port is already in use, that number will vary (increment....). From docker/spring boot that should not be an issue.

If you feel the need to have this feature, open a P/R. It's not always easy to get in the code (was refactored) but it should possible to set this at configuration time.

i.e: https://docs.soluble.io/soluble-japha/bridge_connection/#connection-params

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

No branches or pull requests

2 participants