Deploying to tc Server in Idea - spring

I'm trying to run my application in Idea using tc Server Idea plugin and receive the following log
Connected to server
wrapper | Starting the VMware vFabric tc Runtime instance - tcruntime-C-STS-vfabric-tc-server-developer-2.8.2.RELEASE-insight service...
wrapper | VMware vFabric tc Runtime instance - tcruntime-C-STS-vfabric-tc-server-developer-2.8.2.RELEASE-insight started.
[11:53:08.709] Not allowed to connect. Check role and password.
[11:53:08.709] There is an application at /bps. Starting redeploy...
[11:53:08.714] Not allowed to connect. Check role and password.
[11:53:08.715] Starting undeployment of /bps ...
[11:53:08.720] Not allowed to connect. Check role and password.
[11:53:08.721] Starting deployment of 'bps:war exploded' to /bps ...
[11:53:08.725] Not allowed to connect. Check role and password.
Can anybody describe what's the problem? I cann't fully understand how to config users and roles in tc Server.
UPDATE
The above problem is solved by enabling jmx. But now there is another problem
16-Apr-2013 14:36:36.023 SEVERE [RMI TCP Connection(4)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method deployApplication
java.lang.RuntimeException: Unable to find host
at com.springsource.tcserver.serviceability.deploy.TcContainerDeployer.deployApplication(TcContainerDeployer.java:409)
at com.springsource.tcserver.serviceability.deploy.TcContainerDeployer.deployApplication(TcContainerDeployer.java:399)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1486)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:96)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1327)
at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1426)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:847)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)

Rewriten CrazyCoders comment as answer:
I needed to check Run/Debug Configuration|Server tab|JMX authentification enabled.
Password and role could be found in: CATALINA_BASE/conf/jmxremote.password

I have a suggestion what host it's all about.
Part of tc Server deployment API is notion of service and host. There are some services, and each service contain some number of hosts. IDEA plugin provides by default Catalina service and localhost host. They are configured in Run/Debug Configuration | Deployment tab | Server service name and Server host name(you need to have something to deploy to see these settings).
Now how to get proper values. They are available via JMX. Connect with jconsole.exe from your JDK to service:jmx:rmi:///jndi/rmi://<your host>:<your port>/jmxrmi. It may need login and password you use for server's JMX. Then open tc server | Deployer | Operations in the tree in left panel. Operation getServices will list you available services, and getHosts will list you all hosts for selected service.

Related

Glue does not work from the Docker Container

I am trying to run a simple Glue Job that takes the content from AWS S3 and dumps it into AWS Aurora Postgresql. While the job runs fine from the AWS Console, it just refuses to work while trying to run it out of a Docker Container on an EC2 instance. I have unchecked the "Require SSL" option while creating the Glue Connection. Despite that it is looking for some SSL certificate. I have kept the Aurora instance publicly accessible. Does anyone know what the problem is? Has anyone faced a similar issue?
20/10/24 10:20:17 ERROR Driver: Connection error:
org.postgresql.util.PSQLException: Could not open SSL root certificate file .
at org.postgresql.Driver$ConnectThread.getResult(Driver.java:401)
at org.postgresql.Driver.connect(Driver.java:259)
at com.amazonaws.services.glue.util.JDBCWrapper$$anonfun$8.apply(JDBCUtils.scala:895)
at com.amazonaws.services.glue.util.JDBCWrapper$$anonfun$8.apply(JDBCUtils.scala:891)
at com.amazonaws.services.glue.util.JDBCWrapper$.com$amazonaws$services$glue$util$JDBCWrapper$$catchSSLException(JDBCUtils.scala:852)
at com.amazonaws.services.glue.util.JDBCWrapper$.connectWithSSLAttempt(JDBCUtils.scala:847)
at com.amazonaws.services.glue.util.JDBCWrapper$.connectionProperties(JDBCUtils.scala:890)
at com.amazonaws.services.glue.util.JDBCWrapper.connectionProperties$lzycompute(JDBCUtils.scala:670)
at com.amazonaws.services.glue.util.JDBCWrapper.connectionProperties(JDBCUtils.scala:670)
at com.amazonaws.services.glue.util.JDBCWrapper.writeDF(JDBCUtils.scala:814)
at com.amazonaws.services.glue.sinks.PostgresDataSink.writeDynamicFrame(PostgresDataSink.scala:40)
at com.amazonaws.services.glue.DataSink.pyWriteDynamicFrame(DataSink.scala:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:282)
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
at py4j.commands.CallCommand.execute(CallCommand.java:79)
at py4j.GatewayConnection.run(GatewayConnection.java:238)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.FileNotFoundException: (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at org.postgresql.ssl.jdbc4.LibPQFactory.<init>(LibPQFactory.java:124)
at org.postgresql.ssl.MakeSSL.convert(MakeSSL.java:42)
at org.postgresql.core.v3.ConnectionFactoryImpl.enableSSL(ConnectionFactoryImpl.java:359)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:148)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194)
at org.postgresql.Driver.makeConnection(Driver.java:450)
at org.postgresql.Driver.access$100(Driver.java:60)
at org.postgresql.Driver$ConnectThread.run(Driver.java:360)
... 1 more
20/10/24 10:20:20 INFO JDBCWrapper$: INFO: using ssl properties: Map(loginTimeout -> 10, sslmode -> require)

Rename "example" directory in solr

I have installed apache-solr-3.5.0 for my magento enterprise site. I have run the solr by using
/etc/solr/apache-solr-3.5.0/example$ sudo java -jar start.jar and it is perfectly working. So for the live site I have rename the "example" folder to another name say "project1" and I tried with
/etc/solr/apache-solr-3.5.0/project1$ sudo java -jar start.jar but I couldn't access the solar admin.
The execution stops at
2015-08-19 17:30:16.578:WARN::failed SocketConnector#0.0.0.0:8983: java.net.BindException: Address already in use
2015-08-19 17:30:16.579:WARN::failed Server#309db6ff: java.net.BindException: Address already in use
2015-08-19 17:30:16.579:WARN::EXCEPTION
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
at java.net.ServerSocket.bind(ServerSocket.java:376)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at java.net.ServerSocket.<init>(ServerSocket.java:181)
at org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketConnector.java:80)
at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:534)
at org.mortbay.start.Main.start(Main.java:441)
at org.mortbay.start.Main.main(Main.java:119)
Is we have to rename the "example" directory in our production environment? If yes, How can I successfully rename the "example" directory?
Any help would be greatly appreciated.
The error states that port is been used to start up is in use. This can be caused either by another application running on the port, or failed shutdown. Its not because of renaming example. There might be a process which is already running on the same port i.e 8983.
Kill the process running on the same port.

Eclipse- Cannot assign requested address: JVM_Bind

I was trying to configure tomcat6 in eclipse. After configure tomcat in eclipse i have started server. It shows below error messages,
java.net.BindException: Cannot assign requested address: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
at java.net.ServerSocket.bind(ServerSocket.java:328)
at java.net.ServerSocket.<init>(ServerSocket.java:194)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
at org.apache.catalina.startup.Catalina.await(Catalina.java:662)
at org.apache.catalina.startup.Catalina.start(Catalina.java:614)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
After searching Google i checked with ports in command prompt. but none of the applications running in this port as below,
C:\>netstat -an | find "9000"
C:\>netstat -an | find "8005"
C:\>netstat -an | find "8009"
C:\>
Anything am i missed? If anything wrong please correct me.
It means those ports are not available at that time. There might be chance of having tomcat server in your PC, So try to Change the port numbers by double clicking on your apache server in servers tab. then your apache tomcat will run.
If you have changed you ip recently, the entry for localhost in the hosts file is invalid. Update the ip in your hosts file.

Apache ODE on OpenShift calling remote web-service timeout

I have the following configuration:
Tomcat 7 gear running on OpenShift Online. I deployed Apache ODE as a webapp and tested a simple BPEL workflow (Echo test) that worked perfectly. I have 2 more gears on OpenShift both running WildFly8 servers and some web-services. I created a workflow for ODE that calles these services. When I test the workflow on my local PC running Tomcat 7 and Apache ODE it works just fine. However, on OpenShift I have the following issue:
When ODE tries to call a remote web-service it tells its Axis libraries to create a socket. Since binding sockets to "localhost" on OpenShift is not allowed, I get an exception. I modified the org.apache.commons.httpclient.HttpConnection.open() method to bind the socket to the local OpenShift IP of my gear instead of localhost and got rid of the bind exception. However, the remote web-service doesn't seem to respond to my request:
07:11:50,505 ERROR [ExternalService] Error sending message (mex={PartnerRoleMex#hqejbhcnphr9mgvfg5xbh1 [PID {org.neo}btest-2] calling org.apache.ode.bpel.epr.WSAEndpoint#1f51919.getClientData(...) Status ASYNC}): The host did not accept the connection within timeout of 60000 ms
org.apache.axis2.AxisFault: The host did not accept the connection within timeout of 60000 ms
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:203)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:438)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at org.apache.ode.axis2.SoapExternalService$1$1.call(SoapExternalService.java:206)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 60000 ms
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:155)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:125)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:715)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:557)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
... 12 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
... 21 more
This is the article that gave me this idea: https://www.openshift.com/forums/openshift/commons-httpclient-permission-denied
Again, when testing the exact same workflow on my PC with the exact same web-services it works just fine, so the WildFly8 servers and web-services are not the issue.
I am grateful for any tips, I've been at this for almost a week now...
I managed to fix it by creating a DIY cartridge and installing the newest version of Tomcat 7 onto it. I deployed ODE and my workflow, got the same binding error as before, modified the apache-commons library that Axis was using and now it's sailing smoothly.
I don't know why it didn't work with the Tomcat 7 cartridge I get from OpenShift as standard though.

Java RMI error in HP BSAE 2.0 configuration migration log

I'm attempting to track this issue with HP's Enterprise Support as well, but am not familiar with Java's RMI context, and am hoping the community can provide some assistance, too.
Context: recently upgraded the reporting tool for HP's BSA (Business Service Automation) Suite from SAR (Service Automation Reporting) 7.81 to BSAE (BSA Essentials) 2.0.
In the process, one of the steps is to migrate previously-used external user authentication to the new reporting tool. When running that migration script, the following Java error stack is dumped:
14:57:25,316 DEBUG [InvokeCommand] Using params: /var/opt/opsware/omdb/tmp/sar-aaa-migrate-1279033044903.xml
14:57:26,512 ERROR [Twiddle] Exec failed
java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
java.lang.ClassNotFoundException: com.opsware.cmdb.security.data.AAADataImportException (no security manager: RMI class loader disabled)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:227)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:133)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:66)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
at $Proxy0.invoke(Unknown Source)
at org.jboss.console.twiddle.command.InvokeCommand.invoke(InvokeCommand.java:235)
at org.jboss.console.twiddle.command.InvokeCommand.execute(InvokeCommand.java:291)
at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:306)
Caused by: java.lang.ClassNotFoundException: com.opsware.cmdb.security.data.AAADataImportException (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:375)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:225)
... 13 more
Understanding that I have 0 access to the code base, is there a place I can start to look for what may be causing the RMI failures, or will this need to be handled exclusively through the vendor?
Thanks for any assistance/pointers!
Turns out the root cause on this error is related to issues with both the documented upgrade process from SAR to BSAE and the dataminer on the HPSA server attempting to re-mine the same data chunks over and over again.
The fix for this is to do a complete back-out of BSAE to a blank server, then doing a clean install.
Sadly, that means all historical data is lost in the process :-|

Resources