I extracted the jprofiler tar.gz on a remote linux server. After trying the bin/jpenable command I got:
'No unprofiled JVMs found.'
So I went looking for the PID of the running tomcat server and I think I found it in the var/run directory. A file called tomcat7.pid
So I went back to the source folder of jprofiler and tried: jpenable --pid=[the id that was in the pid file I mentioned earlier]
as specified on page 277 of the following document: http://resources.ej-technologies.com/jprofiler/help/doc/help.pdf and got:
No JVM with PID [the pid] found that is running as the same user.
So since the user I'm logged in as is ubuntu I tried to log in with user tomcat7 but even after giving up the correct password (which we changed with sudo) I remain logged in as ubuntu (as confirmed by whoami command) and the problem above persists.
How do I get this jprofiler to find the jvm I need it to??
Fixed.
We run tomcat as a service so we needed to add agentpath on startup of the jvm. Added the following to /usr/share/tomcat7/bin/setenv.sh :
-agentpath:/opt/jprofiler/jprofiler7/bin/linux-x64/libjprofilerti.so=port={port we want}
Then enabled that port on aws.
Related
Trying to configure linux node to my windows master Jenkins, throwing below error after authentication is succesful
SSH connection reports a garbage before a command execution.
Check your .bashrc, .profile, and so on to make sure it is quiet.
The received junk text is as follows:
/usr/bin/id: cannot find name for group ID ******
null
Looking at the error it looks SSH is failing because the group doesn't exist in the destination Linux node.
Verify that the groups of the SSH user on the Jenkins Windows master using which SSH is happening to Linux node
Ensure that the SSH user exists on the Linux node and it is a member of the groups that appeared in Windows.
If there are any missing groups in Linux node as compare to Windows Master then you need to create them.
Do let me know the result for next step of troubleshooting.
I have a wildfly 10 install running on CentOS Linux 7.3.1611 with kernel3.10.0-514.16.1.el7.x86_64.
Initially when I started running wildfly I was doing so as root in a domain configuration. I have decided to change this practice and configure it as a service. After configuring it as a service, and letting it run for a while I decided to create a user "wildfly", and make the appropriate changes to the systemd service config and directory permissions. Wildfly starts up properly and the application runs fine.
My issue starts when I try and create another server instance from the management console. The console records the server but its never able to start. After some checking I found wildfly is unable to create server directories. This occurs even when having permissions to do so.
The only error I get is this one from /var/log/audit/audit.log;
type=ANOM_ABEND msg=audit(1507241312.223:19650): auid=4294967295 uid=994 gid=994 ses=4294967295 subj=system_u:system_r:unconfined_service_t:s0 pid=8570 comm="java" reason="memory violation" sig=6
I have disabled SELinux, and checked the ACL's on all files in the directory structure. Any help would be greatly appreciated. Thanks in advance.
I'm running ejabberd-14.12 on a Debian 7.6 server, single node.
I've installed ejabberd with the interactive .run package.
I've started ejabberd (logged as root) with:
# /opt/ejabberd-14.12/bin/ejabberdctl start
The log tells that:
ejabberd_app:start:69 ejabberd 14.12 is started in the node ejabberd#localhost
Then, I can see the erlang cookie in my /root directory:
-r-------- 1 root root 20 ago 9 00:00 .erlang.cookie
If I try to create a user in command line mode, everything is ok:
# /opt/ejabberd-14.12/bin/ejabberdctl register foo myhost.lchat.local foopwd
And the user is created (I can see it on the web gui).
If the same command is embedded inside a .sh script (with the full command path), and launched by a daemon (owned by root), it generates an error in the ejabberd error.log:
[error] <0.435.0> ** Connection attempt from disallowed node 'ctl-ejabberd#localhost' **
I believe that it's a security issue, in order to avoid commands from unauthorized users.
What can I do to have the command accepted also from script ?
The error means the environment is not using the same cookie for connecting from the command Erlang node to the primary ejabberd node.
I guess the script run as another user (despite being own by root). The user that will run the script need to have the same .erlang.cookie file in its home directory.
Note: you should not run a server as root, ejabberd or any other type of network server. This is against security best practices.
Lately, every time I restart the server, Ubuntu always gives me a warning message of Apache 2 PID not match. I have to manually kill it and restart Apache 2.
I then follow the guide to check if the PID file in /var/run/apache2 is same as the one in /etc/init.d/apache2/apache2.conf, but I found that there's no file in /var/run/apache2.
I also try to follow the steps in this website
Which says "Check if pid file path set in /etc/init.d/apache2/apache2.conf equals APACHE_PID_FILE variable exported in /etc/init.d/apache2/envvars." But there's no such directory of /etc/init.d/apache2/envvars
How can I fix this? Thanks!
When trying to deploy an Tomcat application in Netbeans I get the following message:
FAIL - Deployed application at context path /Webapp but context failed to start
/some/dir/Webapp/nbproject/build-impl.xml:593: The module has not been deployed.
Looking at catalina.out I found this:
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base /some/dir/Webapp/build/web does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4086)
(...)
But I can do cd /some/dir/Webapp/build/web without a problem!
So far:
The deployed(?) application appears
listed on Tomcat's manager, but I
can't start it.
Tried to remove Webapp.xml in /usr/share/tomcat6/conf/Catalina/localhost, but the problem persists.
/usr/share/tomcat6/work/Catalina/localhost/Webapp is empty.
I'm using Tomcat 6, Netbeans 6.8, Ubuntu 10.04.
Edit:
I have no trouble deploying the application using Tomcat's manager.
Tomcat was running under tomcat6 user. Doing su tomcat6 I can't cd /some/dir/Webapp/build/web (permission denied).
So finally I had to change permissions, allowing tomcat user to access the directory.
I'm guessing that you're looking at some permission issues. Tomcat is probably trying to deploy that app directly from it's location on your disk. See what user id tomcat is running under with: ps -aux | grep -i tomcat then su <user id> to that user and see if you can get to the application's directory.
Also you can see if the app will deploy via Tomcat's manager app, which is usually found here: http://localhost:8080/manager/html