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

Deploy on multiple Managed Servers #368

Open
augeivv opened this issue Dec 8, 2023 · 23 comments
Open

Deploy on multiple Managed Servers #368

augeivv opened this issue Dec 8, 2023 · 23 comments

Comments

@augeivv
Copy link

augeivv commented Dec 8, 2023

I think the moitoring exporter is great. However, we have a fundamental problem.
However, we would like to deploy it in a classic weblogic domain in which the administration port is activated.
According to the documentation, the REST port must then be specified.
The whole thing also works for a single managed server.
However, if I want to deploy the whole thing on all managed servers, the administration port differs per server.
This means that I would have to adjust the configuration several times per server and then also deploy the application several times.
Is there an easier way to do this, where the port can be determined dynamically or something like that?

Thank you very much

@russgold
Copy link
Member

russgold commented Dec 8, 2023

The REST port only needs to be specified if it is different from the port on which you are contacting the exporter. Under most conditions, it would be the same, so you don't need to specify it.

The most common in which it is not the same is when you have a load balancer in the middle, which will redirect requests to different ports that the one on the load balancer.

@augeivv
Copy link
Author

augeivv commented Dec 12, 2023

@russgold I already understood that at this point. However, we use the administration port in our Weblgic domain. This means that we have the following structure as an example:

  • Managed-Server-1 with port 10001 and the administration port 30001
  • Managed-Server-2 with port 10002 and the administration port 30002
  • ....

The application is accessible under the 10001 port. However, the rest of the API is under 30001.
If I now also want to deploy the exporter on the Managed-Server-2, I have to adjust the configuration and make it available as a second deployment in the domain. And for the Managed-Server-3 as well. And for the fourth ...
I find this situation very unfortunate.
That's why I'm looking for a better solution.

@augeivv
Copy link
Author

augeivv commented Jan 11, 2024

Hello @russgold,
is there any news on this topic yet?

@russgold
Copy link
Member

russgold commented Feb 2, 2024

@augeivv That sounds as though it would need an enhancement to the syntax. Do you have some ideas on what would work? A single configuration would need some way to tell which port is used where.

Do you have an Oracle support person who could look at your application? I don't understand why each server would need its own port numbers.

@augeivv
Copy link
Author

augeivv commented Feb 5, 2024

@russgold
To the first question:
I could imagine that a query of the ServerRuntime could be built into the Monitoring Exporter.
The Monitoring Exporter should use the Administration URL for the query.

This is available in the ServerRuntime under 'getAdministrationURL()'.
https://docs.oracle.com/middleware/12212/wls/WLAPI/weblogic/management/runtime/ServerRuntimeMBean.html#getAdministrationURL--

When the administration port is activated, the operation returns the URL that the server and its clients use for administrative connections.
If this is not active, it returns the default channel URl.

To the second question:
We would like to use the monitoring exporter for our classic WLS installations as well. So not in the Kubernetes world.
There is a weblogic domain with several managed servers installed on a Linux VM.
Each managed server provides its services on its own port. As two managed servers cannot work on the same port.
In addition, the administration port is active in the domain. This means that the rest api of the weblogic is accessible on an administration channel and not on the default channel.

Furthermore, what exactly do you mean by "your application"?

@russgold
Copy link
Member

russgold commented Feb 5, 2024

I meant, how you have set up your servers so that each one needs its own port numbers. My understanding was that one usually used the same port numbers on different servers.

@augeivv
Copy link
Author

augeivv commented Feb 6, 2024

Multiple weblogic server instances can also be run on the same server. Nowhere is it defined that each instance must be run on different servers.
It must only be ensured that they work on different ports so that they can start at all.
I'll look for the exact description in the documentation again. And add it here...

In the domain, a separate listen port can be set for each weblogic instance.
The setting can be found in the Administration Console as follows.
expand Environment and select Servers.
On the Servers page, click the name of the server.
Select Configuration > General.

@augeivv
Copy link
Author

augeivv commented Jun 18, 2024

hello @russgold ,

I noticed last week that Weblogic 14.1.2 has the secure production mode as default.
This means that the administration port will soon be active.
For this reason I wanted to ask again if there is any news about this?

@mriccell
Copy link
Member

mriccell commented Sep 4, 2024

hello @augeivv
Is your domain running in Kubernetes with the WebLogic Kubernetes Operator or are the WL servers running in VMs? Could you run one or more servers in the same VM?

@russgold
Copy link
Member

russgold commented Sep 4, 2024

The most obvious solution is not to use the REST_PORT setting and simply access the exporters on the admin ports. Then you would not need a different configuration for each server. Did you try that? If so, what happened?

@augeivv
Copy link
Author

augeivv commented Sep 5, 2024

hello @mriccell & @russgold
our domain is running in VMs. We usually run multiple servers in the same VM.

If I do not specify the rest port, I get a "Not authorized" back.

In my opinion, the port from the current request is used for the internal call of the rest-api to determine the metrics.

If the administration port is active on the domain, the exporter is accessible on a different port than the rest-api.

Is there a way to simply access the exporter via the admin ports? In my case, the exporter cannot be accessed via the admin port.

@russgold
Copy link
Member

russgold commented Sep 5, 2024

In the usual setup, you would indeed access the exporter via the admin port, if that is enabled.

But I have only worked with two setups - the normal WLS system, in which each server is on a different host, or in Kubernetes with the Weblogic Kubernetes Operator (the easiest choice).

Can you describe your environment? The JVM is a VM, but I am guessing that's not what you mean, here - and you're not using Kubernetes, either?

@kemalunel
Copy link

Also I'm having an issue like that. I deployed exporter to one of my cluster in wl server but it could not call api to get metrics. it causes, can't see metrics page. I see 404

@mriccell
Copy link
Member

mriccell commented Sep 5, 2024

We will open an enhancement on the monitoring exporter so that the exporter can be accessed via the admin port when serverhave have different admin ports configured (and of course enabled) because the servers are running on the same VM.

@russgold
Copy link
Member

russgold commented Sep 5, 2024

@kemalunel To be clear, you can reach the main page of the exporter app, but when you hit the metrics link, you get a 404? There is also a messages link; what happens when you try that?

@kemalunel
Copy link

kemalunel commented Sep 6, 2024

@kemalunel To be clear, you can reach the main page of the exporter app, but when you hit the metrics link, you get a 404? There is also a messages link; what happens when you try that?

Yes I'm able to connect to main page but when I try to upload config file over browser or try to reach metrics and message path, I'm getting the same error 404.

Those clusters are running on different ports if you compare with admin server. I'm suspecting that wls-exporter cannot use api feature of weblogic.

@augeivv
Copy link
Author

augeivv commented Sep 6, 2024

@russgold
our environment looks as follows. we have a weblogic domain on a host (vm) with several managed servers (jvm).
each managed server use different ports for listen, ssl listen and admin port.
we do not use kubernetes here. because we also want metrics for our classic installation.

@kemalunel
Copy link

Ok I've fixed 404 error when I try to reach /metrics path with enabling Restful services features on Domain > Advance configuration. but now, when I try to reach metrics page, it asks me username and password.How to deal with that because I'll add this endpoint to prometheus config

@russgold
Copy link
Member

russgold commented Sep 6, 2024

@kemalunel you can add username / password to your Prometheus configuration. WLS requires them to report internal data.

@russgold
Copy link
Member

russgold commented Sep 6, 2024

@augeivv We didn't consider such a configuration when creating the exporter. We're going to look at an enhancement to handle that more easily.

@augeivv
Copy link
Author

augeivv commented Sep 10, 2024

@russgold It would be great if there was a solution for this. Thank you very much.

@russgold
Copy link
Member

@augeivv I want to make sure I understand your case well. I take it that you have the admin port enabled across the cluster, so that is the REST port, right? Is there any reason that you cannot simply invoke the exporter on that port on each server?

@augeivv
Copy link
Author

augeivv commented Sep 18, 2024

@russgold Yes that is correct. The admin port is active in the entire domain. The REST API is only accessible on the admin ports on all managed servers.
Meanwhile the monitoring exporter is only accessible on the standard SSL and non SSL port of the managed-server. However, it is not accessible on the admin port of the managed-server.

If you activate the administration port, the administration traffic is separated from the application traffic in your domain. So I cannot call the application (monitoring exporter) on the admin port. I am not aware that there are any options for setting this.
This is also described here in the documentation: "It enables you to separate administration traffic from application traffic in your domain."
https://docs.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/wlach/taskhelp/domainconfig/EnableTheDomainwideAdministrationPort.html

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

No branches or pull requests

4 participants