I am trying to add a user to WildFly server but get an error:
./add-user.sh: 1: eval: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java/bin/java: not found
I suppose I need to change the JAVA_HOME location in a .conf file but have done so in the .conf files of the wildfly/bin directory. How can I solve this issue?
The add-user.sh script doesn't source any configuration file, so you have to provide the Java binary through your environment.
You can do this in multiple ways :
through a JAVA variable pointing to the java executable :
export JAVA=/path/to/jdk_install/bin/java
./add-user.sh [...]
through a JAVA_HOME variable pointing to the Java installation directory :
export JAVA_HOME=/path/to/jdk_install/
./add-user.sh [...]
by including the Java's installation bin directory to your PATH :
export PATH="/path/to/jdk_install/bin:$PATH"
./add-user.sh [...]
Note that these may vary depending on the WildFly or JBoss EAP version ; I gathered these from reading the script of a wildfly-8.1.0.Final installation.
If you're not sure this applies to your own version and if you have even the most basic understanding of shell scripts you should check your own : they're only a few dozens lines long and are well commented.
Your java path is wrong.
You can observe that in below line there is extra '/bin/java'. You should remove that.
./add-user.sh: 1: eval: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java/bin/java: not found
To do so, in your adduser.sh/.bat file replace
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
if [ "x$JAVA_HOME" != "x" ]; then
JAVA="$JAVA_HOME/bin/java"
else
JAVA="java"
fi
fi
To
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
if [ "x$JAVA_HOME" != "x" ]; then
JAVA="$JAVA_HOME"
else
JAVA="java"
fi
fi
This does the magic for me.
Related
So I checked my spam folder today and had 122 messages send through the server stating:
PHP Warning: Module 'imagick' already loaded in Unknown on line 0
Non stop it keeps sending me this.
Googled it and still have no clue on how to fix it as I need a step by step answer.
Found a similar question on stack but it's too complicated for me to understand.
I'm on the latest Plesk Onyx and OS=Ubuntu 16.04.6 LTS‬.
As I'm running php 7.3 I hoped when I uninstalled php 7.0 in plesk it would go away but unfortunately it didn't.
It's send from here
Cron <root#server> [ -x /usr/lib/php/sessionclean ] && /usr/lib/php/sessionclean
And after php --ini (read about it on a forum) this was the result:
PHP Warning: Module 'imagick' already loaded in Unknown on line 0
Configuration File (php.ini) Path: /etc/php/7.0/cli
Loaded Configuration File: /etc/php/7.0/cli/php.ini
Scan for additional .ini files in: /etc/php/7.0/cli/conf.d
Additional .ini files parsed: /etc/php/7.0/cli/conf.d/00-ioncube-loader-7.0.ini,
/etc/php/7.0/cli/conf.d/10-mysqlnd.ini,
/etc/php/7.0/cli/conf.d/10-opcache.ini,
/etc/php/7.0/cli/conf.d/10-pdo.ini,
/etc/php/7.0/cli/conf.d/15-xml.ini,
/etc/php/7.0/cli/conf.d/20-calendar.ini,
/etc/php/7.0/cli/conf.d/20-ctype.ini,
/etc/php/7.0/cli/conf.d/20-curl.ini,
/etc/php/7.0/cli/conf.d/20-dom.ini,
/etc/php/7.0/cli/conf.d/20-exif.ini,
/etc/php/7.0/cli/conf.d/20-fileinfo.ini,
/etc/php/7.0/cli/conf.d/20-ftp.ini,
/etc/php/7.0/cli/conf.d/20-gd.ini,
/etc/php/7.0/cli/conf.d/20-gettext.ini,
/etc/php/7.0/cli/conf.d/20-iconv.ini,
/etc/php/7.0/cli/conf.d/20-imagick.ini,
/etc/php/7.0/cli/conf.d/20-imap.ini,
/etc/php/7.0/cli/conf.d/20-json.ini,
/etc/php/7.0/cli/conf.d/20-mbstring.ini,
/etc/php/7.0/cli/conf.d/20-mysqli.ini,
/etc/php/7.0/cli/conf.d/20-pdo_mysql.ini,
/etc/php/7.0/cli/conf.d/20-pdo_sqlite.ini,
/etc/php/7.0/cli/conf.d/20-phar.ini,
/etc/php/7.0/cli/conf.d/20-posix.ini,
/etc/php/7.0/cli/conf.d/20-readline.ini,
/etc/php/7.0/cli/conf.d/20-shmop.ini,
/etc/php/7.0/cli/conf.d/20-simplexml.ini,
/etc/php/7.0/cli/conf.d/20-sockets.ini,
/etc/php/7.0/cli/conf.d/20-sqlite3.ini,
/etc/php/7.0/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.0/cli/conf.d/20-sysvsem.ini,
/etc/php/7.0/cli/conf.d/20-sysvshm.ini,
/etc/php/7.0/cli/conf.d/20-tokenizer.ini,
/etc/php/7.0/cli/conf.d/20-wddx.ini,
/etc/php/7.0/cli/conf.d/20-xmlreader.ini,
/etc/php/7.0/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.0/cli/conf.d/20-xsl.ini,
/etc/php/7.0/cli/conf.d/20-zip.ini,
/etc/php/7.0/cli/conf.d/zend_extensions_psa.ini
I already know it's probably easily fixed when you know linux but I'm learning on the go and posses very little knowledge yet.
Could anyone assist me with the right commands?
Cheers
Locate where is your php.ini file by:
php -i | grep Configuration
Configuration File (php.ini) Path => /usr/local/etc/php/7.4
Loaded Configuration File => /usr/local/etc/php/7.4/php.ini
Open the php.ini file and remove the line:
extension=imagick.so
or change the line to a comment:
; extension=imagick.so
So this seems to be a really common problem with this setup, but I can't find any solutions that work on SO. I've setup a very new Ubuntu 15.04 server, then installed nginx, virtualenv (and -wrapper), and uWSGI (via apt-get, so globally, not inside the virtualenv).
My virtualenv is located at /root/Env/example. Inside of the virtualenv, I installed Django, then at /srv/www/example/app ran Django's startproject command with the project name example, so I have vaguely this structure:
-root
-Env
-example
-bin
-lib
-srv
-www
-example
-app
-example
manage.py
-example
wsgi.py
...
My example.ini file for uWSGI looks like this:
[uwsgi]
project = example
plugin = python
chdir = /srv/www/example/app/example
home = /root/Env/example
module = example.wsgi:application
master = true
processes = 5
socket = /run/uwsgi/app/example/example.socket
chmod-socket = 664
uid = www-data
gid = www-data
vacuum = true
But no matter whether I run this via uwsgi --ini /etc/uwsgi/apps-enabled/example.ini or via daemon, I get the exact same error:
Python version: 2.7.9 (default, Apr 2 2015, 15:37:21) [GCC 4.9.2]
Set PythonHome to /root/Env/example
ImportError: No module named site
I should note that the Django project works via the built-in development server ./manage.py runserver, and that when I remove home = /root/Env/example the thing works (but is obviously using the global Python and Django rather than the virtualenv versions, which means it's useless for a proper virtualenv setup).
Can anyone see some obvious path error that I'm not seeing? As far as I can tell, home is entirely correct based on my directory structure, and everything else in the ini too, so why is it not working with this ImportError?
In my case, I was seeing this issue because the django app I was trying to run was written in python 3 whereas uwsgi was configured for python 2. I fixed the problem by:
recompiling uwsgi to support both python 2 and python 3 apps
(I followed this guide)
adding this to my mydjangoproject_uwsgi.ini:
plugins = python35 # or whatever you specified while compiling uwsgi
For other folks using Django, you should also make sure you are correctly specifying the following:
# Django dir that contains manage.py
chdir = /var/www/project/myprojectname
# Django wsgi (myprojectname is the name of your top-level project)
module = myprojectname.wsgi:application
# the virtualenv you are using (full path)
home = /home/ubuntu/Env/mydjangovenv
plugins = python35
As #Freek said, site refers to a python module.
The error claims that python cannot find that package, which is because you have specified python_home to the wrong location.
I've encountered with the same problem and my uwsgi.ini is like below:
[uwsgi]
# variable
base = /home/xx/
# project settings
chdir = %(base)/
module = botservice.uwsgi:application
home = %(base)/env/bin
For this configuration uwsgi can find python executable in /env/bin but no packages could be found under this folder. So I changed home to
home = %(base)/env/
and it worked for me.
In your case, I suggest digging into home directive and point it to a location which contains both python executable and packages.
The site module is in the root of django.
First check is to activate the virtualenv manually (source /root/Env/example/bin/activate, start python and import site). If that fails, pip install django.
Assuming that django is correctly installed in the virtualenv, make sure that uWSGI activates the virtualenv. Relevant uWSGI configuration directives:
plugins = python
virtualenv = /root/Env/example
and in case you have error importing example.wsgi:
pythonpath = /srv/www/example/app/example
Hello all i am a student of bioinformatics and working on gromacs , while preparing for a simulation , i am getting this error
[root#compute-0-3 bin]# pdb2gmx -f model-317.pdb -water spce
pdb2gmx: error while loading shared libraries: libmpi.so.0: cannot open shared object file: No such file or directory**
How to solve this problem ??
You have to set the LD_LIBRARY_PATH you can check more on MPI - error loading shared libraries
Thanks & Regards,
Alok Thaker
I have found it useful to use strace -eopen COMMAND to see which files are actually searched for, and what return code open gives for each of them. For instance:
$ strace -eopen echo foo
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
foo
Use this trick to verify if it is just the path that is set wrong.
Also libmpi.so.0 may not be properly installed. You might have the file libmpi.so.0.1.2.3, and you need to either run ldconfig or manually make a symlink from libmpi.so.0 to libmpi.so.0.1.2.3. See more about why shared libraries might have different numbers appended to them here: http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
My application generates some reports to it's clients. But there's an error when generating the reports here's the exception:-
java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer.<init>(Lorg/eclipse/jdt/internal/compiler/env/IBinaryType;)V
net.sf.jasperreports.engine.design.JRJdtCompiler$1.findType(JRJdtCompiler.java:235)
net.sf.jasperreports.engine.design.JRJdtCompiler$1.findType(JRJdtCompiler.java:204)
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:119)
org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getType(PackageBinding.java:126)
org.eclipse.jdt.internal.compiler.lookup.Scope.findType(Scope.java:1355)
org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:2472)
org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:2194)
org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:39)
org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:141)
org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveSuperType(TypeReference.java:104)
org.eclipse.jdt.internal.compiler.lookup.ClassScope.findSupertype(ClassScope.java:1107)
org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectSuperclass(ClassScope.java:767)
org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierarchy(ClassScope.java:947)
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.connectTypeHierarchy(CompilationUnitScope.java:266)
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnvironment.java:195)
org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:301)
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:315)
net.sf.jasperreports.engine.design.JRJdtCompiler.compileClass(JRJdtCompiler.java:392)
net.sf.jasperreports.engine.design.JRJdtCompiler.compileReport(JRJdtCompiler.java:109)
net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:106)
net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:128)
net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:110)
Recently I moved this application to JBOSS 4.0.5.GA. This application was running fine and there's no errors in generating reports in Tomcat 5
Thanks.
I believe there is a conflicting JAR file:
jdt-compiler-3.1.1.jar
I created a script to set the CLASSPATH before Tomcat runs:
#!/bin/bash
IREPORT_HOME=$HOME/bin/ireport
CLASSPATH=$IREPORT_HOME/platform9/modules/org-netbeans-core.jar:
for j in \
$IREPORT_HOME/ireport/modules/ext/*.jar \
$IREPORT_HOME/ide10/modules/ext/*.jar; do
BASENAME=$(basename $j)
# Append file names to the CLASSPATH, except those with Tomcat conflicts.
if [ "$BASENAME" != "jdt-compiler-3.1.1.jar" ]; then
CLASSPATH=$j:$CLASSPATH
fi
done
export CLASSPATH=$CLASSPATH.
Save it as setenv.sh and place it in $CATALINA_HOME/bin. You will have to change the IREPORT_HOME variable accordingly.
I have Windows 7 with the latest XAMPP installation. I configured BASE to work, for the most part. My problem is that in BASE, when I click on the graph alerts button, I get this error:
Error loading the Graphing library:
Check your Pear::Image_Graph installation!
* Image_Graph can be found here:at http://pear.veggerby.dk/. Without this library no graphing operations can be performed.
* Make sure PEAR libraries can be found by php at all:
pear config-show | grep "PEAR directory"
PEAR directory php_dir /usr/share/pear
This path must be part of the include path of php (cf. /etc/php.ini):
php -i | grep "include_path"
include_path => .:/usr/share/pear:/usr/share/php => .:/usr/share/pear:/usr/share/php</code>
I think it may have to do with the include path of the php.ini so here is what it currently says:
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
;
; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path
include_path = ".;C:\xampp\php\PEAR"
I am really at a loss as to how to resolve this. I searched for a while for some documentation but most referred to installing on ubuntu.
I don't know any pear or php, so if you know how to fix this please explain thoroughly. I am willing to supply as much information as needed.
Have you tried reading this?
pear.php.net
I solved my problem on Debian with that.