unable to start terracota - centos

I'm having issue when starting terracota, I did grep on 37.139.24.150 ip in whole system but couldn't find any file containing this IP, any other places to look for? Also i couldn't find tc-config.xml in terracota its actually an old system I'm just starting terracota its not installed/configured by me.
2015-03-12 13:02:09,737 [main] INFO com.terracottatech.dso - Statistics store: '/root/terracotta/server-statistics'.
2015-03-12 13:02:09,750 [main] INFO com.terracottatech.console - Available Max Runtime Memory: 490MB
2015-03-12 13:02:09,958 [main] INFO com.terracottatech.dso - Standard DSO Server created
2015-03-12 13:02:09,962 [main] INFO com.terracottatech.dso - Creating server nodeID: NodeID[37.139.24.150:9510]
2015-03-12 13:02:09,973 [main] ERROR com.terracottatech.console - Unable to find local network interface for 37.139.24.150
2015-03-12 13:02:09,975 [main] ERROR com.terracottatech.dso - Unable to find local network interface for 37.139.24.150
com.tc.exception.TCRuntimeException: Unable to find local network interface for 37.139.24.150
at com.tc.objectserver.impl.DistributedObjectServer.start(DistributedObjectServer.java:502)
at com.tc.server.TCServerImpl.startDSOServer(TCServerImpl.java:531)
at com.tc.server.TCServerImpl.access$600(TCServerImpl.java:92)
at com.tc.server.TCServerImpl$StartAction.execute(TCServerImpl.java:479)
at com.tc.lang.StartupHelper.startUp(StartupHelper.java:39)
at com.tc.server.TCServerImpl.startServer(TCServerImpl.java:510)
at com.tc.server.TCServerImpl.start(TCServerImpl.java:271)
at com.tc.server.TCServerMain.main(TCServerMain.java:30)

I made it work, I've created new tc-config.xml and started server with ./start-tc-server.sh -f /home/tomcat/terracotta/latest/terracotta/bin/tc-config.xml &
<?xml version="1.0" encoding="UTF-8"?>
<!-- All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. -->
<tc:tc-config xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-5.xsd"
xmlns:tc="http://www.terracotta.org/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<!-- Sets where the Terracotta server can be found. Replace the value of host with the server's IP address. -->
<server host="<my-server-ip>" name="localhost">
<data>/home/tomcat/terracotta/server-data</data>
<logs>/home/tomcat/terracotta/server-logs</logs>
<statistics>/home/tomcat/terracotta/server-statistics</statistics>
</server>
<!-- If using more than one server, add an <ha> section. -->
<ha>
<mode>networked-active-passive</mode>
<networked-active-passive>
<election-time>5</election-time>
</networked-active-passive>
</ha>
</servers>
<!-- Sets where the generated client logs are saved on clients. Note that the exact location of Terracotta logs on client machines may vary based on the value of user.home and the local disk layout. -->
<clients>
<logs>/opt/terracotta/client-logs</logs>
</clients>
</tc:tc-config>

Related

NameNotFoundException: Name "openejb/PersistenceUnit/fwtool-jpa -963118576localhost" not found

I'm trying to run TomEE in Docker. It works with tomee:8-jre-7.1.0-plume image but not with 11-jre-8.0.0-M3-plume.
Problem seems to be related to JPA/PersistenceUnit. This is my WebContent/META-INF/persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="fwtool-jpa">
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<class>com.nnn.OneClass</class>
<class>com.nnn.SecondClass</class>
<class>com.nnn.AnotherClass</class>
</persistence-unit>
</persistence>
I build the application to war with maven having:
<source>11</source>
<target>11</target>
tomee.xml:
<?xml version="1.0" encoding="UTF-8"?>
<tomee>
<Resource id="jtaFWTool" type="DataSource">
jdbcDriver com.mysql.jdbc.Driver
jdbcUrl jdbc:mysql://localhost:3306/FWTool
connectionProperties retainStatementAfterResultSetClose=true;autoReconnectForPools=true;useSSL=false
userName xxxx
password yyyy
maxActive 500
maxIdle 50
maxWaitMillis 50000
removeAbandoned true
maxConnLifetimeMillis 6000000
maxAge 6000000
testWhileIdle true
TimeBetweenEvictionRunsMillis 20000
validationQuery SELECT 1
</Resource>
</tomee>
Dockerfile:
FROM tomee:11-jre-8.0.0-M3-plume
COPY target/fwtool.war /usr/local/tomee/webapps/
COPY tomee.xml /usr/local/tomee/conf/
COPY mysql-connector-java-5.1.40.jar /usr/local/tomee/lib/
Docker build and run
docker build -t fwtool:tomee8-java11 .
docker run --net=host -d --name fwtool fwtool:tomee8-java11
When TomEE is starting and deploying the war, something goes wrong:
15-Feb-2020 17:46:15.843 INFO [main] org.apache.openejb.config.AutoConfig.deploy Configuring PersistenceUnit(name=fwtool-jpa)
15-Feb-2020 17:46:15.844 INFO [main] org.apache.openejb.config.AutoConfig.logAutoCreateResource Auto-creating a Resource with id 'jtaFWToolNonJta' of type 'DataSource for 'fwtool-jpa'.
15-Feb-2020 17:46:15.844 INFO [main] org.apache.openejb.config.AutoConfig.deploy Configuring Service(id=jtaFWToolNonJta, type=Resource, provider-id=jtaFWTool)
15-Feb-2020 17:46:15.844 INFO [main] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Resource(id=jtaFWToolNonJta)
15-Feb-2020 17:46:16.082 WARNING [main] org.apache.openejb.assembler.classic.Assembler.unusedProperty unused property 'maxWaitMillis' for resource 'jtaFWToolNonJta'
15-Feb-2020 17:46:16.083 WARNING [main] org.apache.openejb.assembler.classic.Assembler.unusedProperty unused property 'maxConnLifetimeMillis' for resource 'jtaFWToolNonJta'
15-Feb-2020 17:46:16.089 INFO [main] org.apache.openejb.config.AutoConfig.setJtaDataSource Adjusting PersistenceUnit fwtool-jpa <jta-data-source> to Resource ID 'jtaFWTool' from 'null'
15-Feb-2020 17:46:16.089 INFO [main] org.apache.openejb.config.AutoConfig.setNonJtaDataSource Adjusting PersistenceUnit fwtool-jpa <non-jta-data-source> to Resource ID 'jtaFWToolNonJta' from 'null'
15-Feb-2020 17:46:16.160 INFO [main] org.apache.openejb.config.AppInfoBuilder.build Enterprise application "/usr/local/tomee/webapps/fwtool" loaded.
15-Feb-2020 17:46:16.172 INFO [main] org.apache.openejb.assembler.classic.Assembler.createApplication Assembling app: /usr/local/tomee/webapps/fwtool
15-Feb-2020 17:46:16.491 INFO [main] org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate PersistenceUnit(name=fwtool-jpa, provider=org.eclipse.persistence.jpa.PersistenceProvider) - provider time 273ms
15-Feb-2020 17:46:16.491 INFO [main] org.apache.openejb.assembler.classic.Assembler.destroyApplication Undeploying app: /usr/local/tomee/webapps/fwtool
15-Feb-2020 17:46:16.493 SEVERE [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke Error destroying child
org.apache.catalina.LifecycleException: An invalid Lifecycle transition was attempted ([before_destroy]) for component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/fwtool]] in state [STARTING_PREP]
at org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:430)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:316)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:814)
at org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1656)
...
...
Caused by: javax.naming.NameNotFoundException: Name "openejb/PersistenceUnit/fwtool-jpa -963118576localhost" not found.
at org.apache.openejb.core.ivm.naming.IvmContext.federate(IvmContext.java:211)
at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:159)
at org.apache.openejb.assembler.classic.Assembler.destroyApplication(Assembler.java:2508)
Any idea what is the problem here with TomEE 8?
The final image 8.0.1-plume is now out and my application is deployed and starts normally with that.
https://hub.docker.com/_/tomee
It was just a problem with M3 beta image 11-jre-8.0.0-M3-plume.

How to append kubernetes container id/name to log file in log4j.xml

but the problem is my application is running before my server started (WebLogic server).
Your question seems to be in reference to Log4j 1. Log4j 1 has been end-of-life since August of 2015.
Upgrading to Log4j 2.13.0 would allow you to use the Kubernetes Lookup which would allow you to configure your log file name as:
<File name="MyFile" filename="${path}/app_${k8s:containerName}.${date:MM-dd-yyyy}.log>
<PatternLayout>
<Pattern>%d %p %c{1.} [%t] %m%n</Pattern>
</PatternLayout>
</File>

dropbox connector, no callback uri, Could not find connector with name 'connector.http.mule.default'

i'm new to Mule and i'm trying to use the dropbox connector with my web application. I'm trying to make a flow to authorize the current user to upload a file, however the flow doesn't even run. All i did was set up an http connector, then placed the dropbox connector and set it up. I used the graphic interface but here is the code:
<?xml version="1.0" encoding="UTF-8"?>
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8081" doc:name="HTTP Listener Configuration"/>
<dropbox:config name="Dropbox" appKey="xxxxxxxxxxx" appSecret="xxxxxxxxxxx" doc:name="Dropbox">
<dropbox:oauth-callback-config domain="http://localhost" localPort="8081" path="callback" remotePort="8081"/>
</dropbox:config>
<dropbox:config name="Dropbox1" appKey="xxxxxxxxxxx" appSecret="xxxxxxxxxxx" doc:name="Dropbox">
<dropbox:oauth-callback-config domain="http://localhost" localPort="8081" remotePort="8081" path="callback"/>
</dropbox:config>
<flow name="dropbxFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/callback/" doc:name="HTTP"/>
<dropbox:authorize config-ref="Dropbox" doc:name="Dropbox"/>
</flow>
i keep getting this error when i run :
INFO 2015-05-05 16:09:53,688 [Mule.app.deployer.monitor.1.thread.1] org.mule.lifecycle.AbstractLifecycleManager: Starting model: _muleSystemModel
INFO 2015-05-05 16:09:53,688 [Mule.app.deployer.monitor.1.thread.1] org.mule.construct.FlowConstructLifecycleManager: Starting flow: dropbxFlow
INFO 2015-05-05 16:09:53,688 [Mule.app.deployer.monitor.1.thread.1] org.mule.processor.SedaStageLifecycleManager: Starting service: dropbxFlow.stage1
ERROR 2015-05-05 16:09:53,694 [Mule.app.deployer.monitor.1.thread.1] org.mule.modules.dropbox.process.DefaultHttpCallback: Could not find connector with name 'connector.http.mule.default'
INFO 2015-05-05 16:09:53,694 [Mule.app.deployer.monitor.1.thread.1] org.mule.processor.SedaStageLifecycleManager: Stopping service: dropbxFlow.stage1
ERROR 2015-05-05 16:09:53,890 [Mule.app.deployer.monitor.1.thread.1] org.mule.module.launcher.application.DefaultMuleApplication: null
org.mule.api.DefaultMuleException: Could not find connector with name 'connector.http.mule.default'
This only happens when i use the Authorize attribute on the dropbox connector, as it needs a callback uri(which i think it the problem here), the callback http endpoint isn't being set up. Any insight would be greatly appreciated.
These are normal version issues with some of the libraries. I had the same issue while using dropbox connector 3.3.0 so after a lot of R&D I figured out where was actually the problem. I went to pom.xml, there I changed version to 3.3.3 and all was fine and running and no more issue at all.
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-dropbox</artifactId>
<version>3.3.3</version>
</dependency>
And regarding that "no callback uri", you should have same redirect uri in dropbox developer account and in dropbox global element Oauth configuration.
Let's say you have provided "http://localhost:8081/callback" as Redirect URI in Dropbox account so your Oauth configuration should be like as following
Domain : localhost
Local Port : 8081
Remote Port : 8081
Path : callback

How to increase the heap size of WebSphere Application Server V8.5 Liberty Profile in Eclipse?

I have a WebSphere Application Server V8.5 Liberty Profile in eclipse. My webapp has been giving java.lang.OutOfMemoryError and thus I need to increase the heap size.
As this and this post suggested I changed the server.xml, by adding jvmEntries tag (It was not previously there):
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>jsp-2.2</feature>
<feature>localConnector-1.0</feature>
<feature>jpa-2.0</feature>
</featureManager>
<!-- To access this server from a remote client add a host attribute to
the following element, e.g. host="*" -->
<httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint" />
<jvmEntries initialHeapSize="1024" maximumHeapSize="2048" />
<applicationMonitor updateTrigger="mbean" />
<webApplication id="app" location="app.war"
name="app" />
</server>
But eclipse shows it as an invalid tag, with following error:
cvc-complex-type.2.4.a: Invalid content was found starting with
element 'jvmEntries'. One of '{include, variable, trustAssociation,
applicationMonitor, application, classloading, basicRegistry,
bundleRepository, osgiApplication, authentication, authCache,
jaasLoginModule, jaasLoginContextEntry, cdiContainer, channelfw,
tcpOptions, library, collectiveMember, hostAuthInfo,
managedExecutorService, connectionManager, contextService,
distributedMap, enterpriseApplication, webApplication, httpDispatcher,
mimeTypes, httpEncoding, virtualHost, httpOptions,
httpAccessLogging, httpEndpoint, authData, dataSource, jdbcDriver,
jndiEntry, jpa, jspEngine, fileset, executor, featureManager, config,
customLdapFilterProperties, edirectoryLdapFilterProperties,
domino50LdapFilterProperties, netscapeLdapFilterProperties,
ldapRegistry, securewayLdapFilterProperties,
iplanetLdapFilterProperties, idsLdapFilterProperties,
activedLdapFilterProperties, logging, ltpa, ejbContainer, monitor,
oauthProvider, oauth-roles, remoteFileAccess, administrator-role,
quickStartSecurity, pluginConfiguration, webContainer, httpSession,
httpSessionDatabase, sslDefault, keyStore, ssl, sslOptions,
timedOperation, transaction, webAppSecurity, federatedRepository,
zosLogging, authorization-roles}' is expected.
How should I increase the heap size then?
Correct way to do it is to create jvm.options file in the server directory with the following content e.g.:
-Xms512m
-Xmx1024m
Check this link Customizing the Liberty profile environment
In Eclipse, in the Servers view you can right-click the server, and select New > Server Environment File > jvm.options
The Liberty profile is a bit different than the regular WebSphere profile. You will need to configure a jvm.options file per these instructions:
IBM Setting generic JVM arguments in the WebSphere Application Server V8.5 Liberty profile
Customizing the Liberty profile environment

JBoss EAP 6 configure single server for remote debugging in domain mode

I have Domain controller, one Host controller and one server running in the same machine.
I'm using IDEA to connect to the remote server for debugging but it's not stopping on break points even though it's running the code (i've verified with system outs).
I've enabled HOST_CONTROLLER_JAVA_OPTS and PROCESS_CONTROLLER_JAVA_OPTS for remote debugging in $JBOSS_HOME/bin/domain.conf:
# Sample JPDA settings for remote socket debuging.
PROCESS_CONTROLLER_JAVA_OPTS="$PROCESS_CONTROLLER_JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8788,server=y,suspend=n"
HOST_CONTROLLER_JAVA_OPTS="$HOST_CONTROLLER_JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
When i start JBoss server i can see from netstat that it's properly listening to ports 8787 and 8788. If i list the processes running in the system i can see one for Domain controller, one for Host controller and one for the server (server1). Domain and Host controllers have the debug options specified in their launch properties but they're missing for server1.
I've been looking at the various XML, .conf and .sh files for a while now but i can't figure out how i could specify server1 to use the remote debugging options. Is there a way to remotely debug a single server in domain mode?
JHollanti maybe you are missing some compiler flags (like "lines,vars,source") to allow remote debugging.
For example, is you are using Ant you need to add this lines to your javac:
<!-- Javac lines, vars, source compiler flags -->
<javac srcdir="..." destdir="..." classpathref="..." debug="true" debuglevel="lines,vars,source" />
Then in your execution script you jave to add:
<!-- debug configurations: modify the port you want-->
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4060"/>
On the other hand, if you are using Maven same flags can be added in the , like this:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<!-- Necessary in order for the debug levels to be considered-->
<debug>true</debug>
<debugLevel>lines,vars,source</debugLevel>
</configuration>
</plugin>
</plugins>
</build>
In case of using Jetty, same as before... you need to have the following variable:
export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n"
On the other hand, what you can check is setting the suspend flag in yes, it is "suspend=y". This won't start your app unless you connect a debugger.
Here you can check specific info about jboss:
http://webdev.apl.jhu.edu/~jcs/ejava-javaee/coursedocs/605-784-site/docs/content/html/devenv-jboss-setup.html#enable-jboss-debug
Hope to help
Hey I don't have a solution to this however I was able to set the port for server one along with host and process controllers as well.
How I did it : I added the "-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n" to the JVM arguments on the jboss admin console.
Steps:
1) Login to admin console of jboss => localhost:9990/console
2) go to servers => select server 1 in the table.
3) Then add the debug string into JVM arguments text box.
Once you restart your server you'll see now the server one is listening on this port.
However problem came when I tried to run my eclipse in debug mode. Though on the sever I could see the connection was established through netstat however eclipse is not able to communicate to server 1 and it times out.
Important thing to be noticed is I'm able to run eclipse in debug mode if I do what you did in domain.conf file and use those ports; however then the control never comes to my breakpoint in eclipse.
You can enable remote debugging by adding jvm-options in $JBOSS_HOME$\domain\configuration\hosts.xml
Add the following configuration under <servers> -> <server> -> <jvm>
<jvm-options>
<option value="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"/>
</jvm-options>
your server configuration in hosts.xml should look something similar to this
<servers>
<server name="Server1" group="Group1" auto-start="true">
<jvm name="Server1_JVM" debug-enabled="false">
<heap size="2048m" max-size="4096m"/>
<jvm-options>
<option value="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"/>
</jvm-options>
</jvm>
<socket-bindings socket-binding-group="full-ha-sockets" port-offset="100"/>
</server>
</servers>
Hope this helps!