weblogic-monitoring-exporter
weblogic-monitoring-exporter copied to clipboard
Configuration of sidecar not working
Hello,
I deployed the sidecar as a docker container using docker compose, the container is up and I can acccess its interface, but when I try to upload a configuration it gives an error.
From docker-compose :
wls-exporter: image: container-registry.oracle.com/middleware/weblogic-monitoring-exporter:2.0.4 container_name: wls-exporter ports: - "9010:8080" environment: - DOMAIN_NAME=myDomain - EXPORTER_PORT=8080 - WLS_HOST=admin-server - WLS_PORT=7001 - WLS_SECURE=false depends_on: - admin-server
When I try to push the configuration I receive:
[vagrant@master extra]$ curl -X PUT -i -u admin_user:admin_pass \ -H "content-type: application/yaml" \ --data-binary "@./config.yml" \ http://slave:9010/configuration
HTTP/1.1 100 Continue connection: close
HTTP/1.1 500 Internal Server Error Date: Wed, 23 Mar 2022 08:30:46 GMT transfer-encoding: chunked connection: keep-alive
# Unable to contact the REST API at http://172.25.0.4:7001. May be using the wrong port. # # This most commonly occurs when the exporter is accessed via a load balancer # configured on a different port than the managed server. # # You can correct this by giving the exporter WAR an initial configuration with the # restPort field set to the managed server's plain text port.
I confirm that both wls-exporter and admin-server are reacheble on ip:ports that are mentioned.
Could you please help me identify where is the problem?
Regards, Iulian
Is WLS deployed inside Docker on port 7001 at that host name? If it is only accessible on your local machine, the exporter will not be able to reach it. For such applications, you're probably better off using the webapp.
Yes, WLS is deployed inside Docker on port 7001 with the name admin-server, this is an evaluation setup, in production we are not using docker. But in production we can't install wls-exporter in the same domain/cluster with the main application so we evaluate the stand alone /separate process deployment. Now, regarding the access from exporter container to admin-server container, they are both in the default docker network so they can reach each other on all ports and container names are rezolved to the ip of the container.
I've just noticed that you're using the url http://slave:9010/configuration, but you say that WLS is available at a different name. You need to use a name that both your curl command and the sidecar can recognize and which points to the WLS instance.
Closing question has been answered