jmx

Docker那些事儿之镜像创建

跟風遠走 提交于 2019-12-14 02:20:41
之前已经了解了docker的基本使用方式,简单的上手,也能让大部分人了解到这个技术的使用方法,今天继续说明docker如何构建自己所需要的镜像,开发人员掌握使用基础即可,有兴趣的可以自行深入研究 前言 docker的相关操作命令不是本文的重点部分,自行查找资料或去官网学习,另外,docker也有其api接口(类似restful api),需要使用时需要进行设置开启api端口,具体参照官网 本文主要说明创建自己所需要的镜像,由于经常需要根据开发人员或运维人员的需求内置一些组件,而公共的docker镜像不能满足其需要,就需要自行根据需求创建镜像,本文主要说明创建镜像的相关操作,不会过于深入,毕竟笔者也不属于系统运维人员,只进行基础的镜像创建说明 需求说明 由于系统运维人员需要Tomcat开启其JMX功能来监控服务的各个属性,而目前官方镜像上也没有这种定制的镜像,故我们需要自行构建 JMX简介 JMX(Java Management Extensions): JMX是用于管理和监控JAVA应用的接口规范,同时具有以下特点: 通过JMX的”MBeans“来读取数据 可以读取和写入MBean的属性 可以执行MBean的方法 我们都熟悉JAVA中的反射,而JMX的整体实现和作用,和反射有很大的相似性。只是JMX允许执行远程主机上的目标方法。通过JMX,可以轻松获取JVM的各项数据值

Exporting Spring @Bean objects using JMX

自作多情 提交于 2019-12-14 02:05:37
问题 I'm using Spring's @Configuration , and I noticed that a @Bean does not get registered using JMX. The bean is wired as @Bean protected CountingHttpInterceptor countingHttpInterceptor() { return new CountingHttpInterceptor(); } and the class definition is @ManagedResource public class CountingHttpInterceptor implements HttpRequestInterceptor, HttpResponseInterceptor { /* code here*/ } This @Configuration file is processed after the main , XML-based, application context is built, and does not

How to change & verify hostname in windows server 2012 (AWS EC2)

随声附和 提交于 2019-12-13 19:21:06
问题 I am using Windows Server 2012-R2 (amazon ec2) machine. and I want to change and verify hostname in it. I checked on net and found hostname command. But when I run hostname or hostname -i command I get following error.. sethostname: Use the Network Control Panel Applet to set hostname. hostname -s is not supported. I further googled this problem and apparently this command is not usable on windows 2012-r2 servers. Is there any alternative or workaround command that can do the job for me?? 回答1

Creating WebLogic users programmatically from a standalone Java client

百般思念 提交于 2019-12-13 12:14:04
问题 I'm trying to create users in WebLogic (10.3.4) programmatically from a simple standalone Java client (one class --> two methods: createWeblogicUser() & main()). public void createWeblogicUser() { try { Hashtable<String, String> env = new Hashtable<String, String>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); env.put(Context.SECURITY_PRINCIPAL, "weblogic"); env.put(Context.SECURITY_CREDENTIALS, "weblogic"); env.put(Context.PROVIDER_URL, "t3://myserver

IBM Worklight - Can't run an app on WebSphere Application Server

岁酱吖の 提交于 2019-12-13 08:09:15
问题 My app runs well on Worklight Development Server, but not on WebSphere Application Server V8.5 Liberty Profile. I tried both Oracle JDK and IBM JDK, there was no difference. There was no problem connecting to the server with jconsole, although I had to connect without ssl. On Eclipse Console, [2014-07-11 17:18:10] Starting build process: application 'U1', all environments [2014-07-11 17:18:12] Application 'U1' with all environments build finished. [2014-07-11 17:18:12] Deploying application

MBean “jboss.web:type=Manager,path=/,host=localhost” not found

穿精又带淫゛_ 提交于 2019-12-13 07:13:48
问题 I'm trying to access the JBoss v4.2 MBean registered as jboss.web:type=Manager,path=/,host=localhost using the following code: ObjectName name = new ObjectName("jboss.web:type=Manager,path=/,host=localhost"); ManagementFactory.getPlatformMBeanServer().getAttribute(name, "activeSessions"); But this code keeps throwing the following exception: javax.management.InstanceNotFoundException : jboss.web:type=Manager,path=/,host=localhost is not registered. On the other hand I'm able to see and use

Retrieve current server's provider URL at runtime on weblogic (non-deprecated way)

丶灬走出姿态 提交于 2019-12-13 07:11:34
问题 I have an Singleton Service deployed to a Weblogic cluster, i'd like to know the provider url (listen address and port) of the server on which the singleton service is deployed from the singleton itself (server side, not logs). I found this (old) article from Oracle, and wrote this method to construct the provider url. private static String getCurrentServerUrl() throws NamingException { weblogic.management.MBeanHome home = (weblogic.management.MBeanHome) new Environment().getInitialContext()

Run jmx file using java

六眼飞鱼酱① 提交于 2019-12-13 05:25:17
问题 I created a jmx file using java code. But when i tried to execute the jmx file using java, it throws the exception. Pls help me.. I have added all the jars. (Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/home/ksahu/MyScreenshots/k.jmx', conversion error com.thoughtworks.xstream.converters.ConversionException: null : null) import org.apache.jmeter.engine.StandardJMeterEngine; import org.apache.jmeter.protocol.http.sampler.HTTPSampler; import org.apache

Replacing @managed operation from xml itself in spring

巧了我就是萌 提交于 2019-12-13 04:38:54
问题 I am using JMX of spring Version 2.5 in which I am using JMX as shown below.. @ManagedOperation(description = "Mark the Entry corresponding ABC flow") @ManagedOperationParameters(value = { @ManagedOperationParameter(name = "def", description = "Ids of the entries that needs to be STOP"), @ManagedOperationParameter(name = "Comments", description = "Note on why these entries are being marked as stop") }) public void abcstop(String def, String gtr){ StringBuffer gfhtrPresent= jmxService.abcd(Ids

Monitor remote WSO2 ESB using JMX

风流意气都作罢 提交于 2019-12-13 04:24:58
问题 I want to monitor my ESB using Jconsole and JMX. I can connect to JMX server from the localhost but for connecting from remote machine to my esb I can establish the connection. I use WSO2 ESB 4.6 and this my JMX configuration in carbon.xml file. <JMX> <!--The port RMI registry is exposed--> <RMIRegistryPort>9999</RMIRegistryPort> <!--The port RMI server should be exposed--> <RMIServerPort>11111</RMIServerPort> </JMX> 回答1: I found the problem, my rmi service was running on the host ip which