[root#localhost local]# ll
lrwxrwxrwx. 1 root root 11 Sep 12 21:34 hbase -> hbase-1.1.2
drwxr-xr-x. 30 root root 4096 Sep 12 21:34 hbase-1.1.2
[root#localhost local]# ./hbase/bin/start-hbase.sh
Error: Could not find or load main class。 org.apache.hadoop.hbase.util.HBaseConfTool
Error: Could not find or load main class org.apache.hadoop.hbase.zookeeper.ZKServerTool
starting master, logging to /usr/local/hbase/logs/hbase-root-master-localhost.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Error: Could not find or load main class org.apache.hadoop.hbase.master.HMaster
starting regionserver, logging to /usr/local/hbase/logs/hbase-root-1-regionserver-localhost.out
Error: Could not find or load main class org.apache.hadoop.hbase.regionserver.HRegionServer
Why does it show this error? The class file exists.
[root#localhost local]# find ./ -name HBaseConfTool.class
./hbase-1.1.2/hbase-server/target/classes/org/apache/hadoop/hbase/util/HBaseConfTool.class
The /etc/profile:
export JAVA_HOME=/usr/local/jdk1.8.0_20
export HBASE_HOME=/usr/local/hbase
export PATH=$JAVA_HOME/bin:$HBASE_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$HBASE_HOME/hbase-server/target/classes
I add $HBASE_HOME/hbase-server/target/classes, but it still does not find the class file。
I am just a newer,getting start follow official docs, but can not run。I am so eggache... sos...
thanks for you asking my quesiton。
I get the src version, and I use "mvn package -Dmaven.test.skip.exec=true -Dtar -e" compile,I hope it makes hbasexx-bin.tar.gz,but get nothing。
Complie hadoop src use 'mvn package -Pdist,native,docs -DskipTests -Dtar' ,then the xx.tar.gz can be found in hadoop-dist/target/ 。
Maybe my hbase compile command is wrong? I copy it from others。what is the right complie commad ? I am not familiar with mvn params 。。。
/usr/local/hbase-1.1.2/bin/hbase --config conf classpath
I find that many main module path is the old compile path,
/root/hbase-1.1.2/hbase-it/target/hbase-it-1.1.2-tests.jar:/root/hbase-1.1.2/hbase-common/target/hbase-common-1.1.2.jar:/root/hbase-1.1.2/hbase-protocol/target/hbase-protocol-1.1.2.jar:/root/hbase-1.1.2/hbase-client/target/hbase-client-1.1.2.jar:
Oh my god,but how to complie in path /root compile /root/hbase-1.1.2 ,then I mv to /usr/local ? or how to modify classpath when I use in path /usr/local/hbase-1.1.2 ?
Maybe you are using source package.
Try binary package (http://apache.mirror.cdnetworks.com/hbase/1.1.2/hbase-1.1.2-bin.tar.gz) or build it first.
not "hbase-1.1.2-src.tar.gz"
but "hbase-1.1.2-bin.tar.gz"
Related
I build my first rpm package. It is the prescriped way to deploy applications to our distributed SuSE Servers.
The application is build with NodeJs and Typescript.
We have a build step that transcribes the Typescript to Javascript into a dist folder. NPM provides the dependencies in a node_modules folder. Then there are some .env config files, a bash script to start the application called myApplication and a init.d script called myDaemon. These are all packed into a tar.gz file. The structure is the following:
myApplication.tar.gz
|
|--dist
| |
| |-index.js
| |-...
|
|--node_modules
| |
| |-dependency_a
| |-dependency_b
| |-...
|
|--.env
|--.env.production
|--.env.development
|--.env.sample
|--myApplication
|--myDaemon
The rpmbuild unpacks the tar.gz file, creates the needed folders in the build root and copies the files to the correct folders. dist and node_modules go the a folder in /opt. The configuration files to folder in /etc/, the daemon to /etc/init.d and the executable bash script to start the application to /usr/bin. The README is treated as documentation and the logfiles are marked as ghost.
This is the spec file:
%define debug_package %{nil}
# Use other payload algorithm to fix the following error on SuSE: Failed dependencies: rpmlib(FileDigests) <= 4.6.0-1 is needed
%define _binary_filedigest_algorithm 1
# automatically generate requires and provides from package.json
%{?nodejs_find_provides_and_requires}
# filter out any false provides created due to dependencies with native components
%{?nodejs_default_filter}
# name of zip file containing source without .zip extension
%define modname myApplication
Summary: The %{modname} is a nodeJs project
Name: %{modname}
Group: Applications/Server
Version: 0.1
Release: 1
License: None
URL: https://private.git/myApplication
Source0: myApplication.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: x86_64
ExclusiveArch: x86_64
BuildRequires: npm
Requires: nodejs10
AutoReq: no
AutoProv: no
%description
%{Summary}
#Unpack the tar.gz file
%prep
%setup -q -n myApplication
%build
#Code is already build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/myApplication
%{__cp} -r $RPM_BUILD_DIR/myApplication/.env* $RPM_BUILD_ROOT/etc/myApplication
mkdir -p $RPM_BUILD_ROOT/opt/myApplication/dist
%{__cp} -r $RPM_BUILD_DIR/myApplication/dist $RPM_BUILD_ROOT/opt/myApplication/
mkdir -p $RPM_BUILD_ROOT/opt/myApplication/node_modules
%{__cp} -r $RPM_BUILD_DIR/myApplication/node_modules $RPM_BUILD_ROOT/opt/myApplication/
mkdir -p $RPM_BUILD_ROOT/usr/bin
%{__cp} -r $RPM_BUILD_DIR/myApplication/myApplication $RPM_BUILD_ROOT/usr/bin/myApplication
mkdir -p $RPM_BUILD_ROOT/etc/init.d/
%{__cp} -r $RPM_BUILD_DIR/myApplication/myDaemon $RPM_BUILD_ROOT/etc/init.d/myDaemon
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(0755, root, root)
%doc README.md
%dir /etc/myApplication
%config /etc/myApplication/.env
%config /etc/myApplication/.env.production
%config /etc/myApplication/.env.development
/etc/myApplication/.env.sample
/opt/myApplication
/usr/bin/myApplication
/etc/init.d/myDaemon
%ghost /var/log/myApplication.log
%ghost /var/log/myDaemon.log
%changelog
* Wed Sep 29 2021 seism0saurus
- Initial spec file for myApplication
The rpm build with -vv runs fine and lists all dependencies from node_modules. I can also open the rpm with a zip utility and can see all needed dependencies inside the /opt/myApplication/node_modules folder.
But only some of the dependencies in that node_modules folder are installed, when I run zypper install myApplication.rpm. For example dependency_b is missing but dependency_a was installed. I can check that with rpm -V -v --nodeps -p myApplication.rpm. The folders are marked as missing. Here is a part from the output:
.......T /opt/myApplication/node_modules/triple-beam/test.js
missing /opt/myApplication/node_modules/url-parse
missing /opt/myApplication/node_modules/url-parse/LICENSE
missing /opt/myApplication/node_modules/url-parse/README.md
missing /opt/myApplication/node_modules/url-parse/dist
missing /opt/myApplication/node_modules/url-parse/dist/url-parse.js
missing /opt/myApplication/node_modules/url-parse/dist/url-parse.min.js
missing /opt/myApplication/node_modules/url-parse/dist/url-parse.min.js.map
missing /opt/myApplication/node_modules/url-parse/index.js
missing /opt/myApplication/node_modules/url-parse/package.json
........ /opt/myApplication/node_modules/util-deprecate
I usually use Debian/GNU Linux and not SuSE, so I don't have any experience with rpm.
Can someone explain, why the folders and files are not installed, although rpm knows, that they should be installed and shows them as missing?
How can I fix that? Is something wrong with my spec or my approach to package a NodeJs application?
--- EDIT ---
The rpm package works fine inside my Leap 15 containers (rpm 4.14.3). The problems is only on a SLES 11 installation (rpm 4.4.2.3).
So the problems seems to be related with the old version of rpm.
--- EDIT 2 ---
I tweaked the spec by configuring the compression algorithm:
%define _source_payload w0.gzdio
%define _binary_payload w0.gzdio
Now i can install the package correctly with rpm but zypper has still the same problem.
Any thoughts on that?
Kind regards,
seism0saurus
The final solution was to use a different compression algorithm in the spec file and to give the package a new version number, so that zypper doesn't use the old version from cache.
%define _source_payload w0.gzdio
%define _binary_payload w0.gzdio
I have built a package from https://github.com/fd00/yacp using cygport; however I just noticed that cygport [packagename.cygport] install command does NOT install in the cygwin filesystem, but in a subdirectory of the source build directory; as such, executables are not in the cygwin path, and you cannot call them by name.
I have seen:
http://cygwin.1069669.n5.nabble.com/Manual-installation-of-cygport-packages-td132812.html
So for most cases, it works just fine just to unpack the archive into the
root file system in order to test it.
https://cygwin-ports-general.narkive.com/RrfmRgr6/how-to-install-a-package-build-with-cygport
you could install yourself or by descending to the build directory and doing 'make
install' or simply run it from the build directory :-)
So, now I have packagename.tar.xz and packaganame.hint - can't I use these with the Cygwin setup-x86_64.exe program (so that I'd have a marked entry, when I look up the package name in setup)?
If I "install" by just unpacking packagename.tar.xz into the Cygwin root filesystem, how do I "uninstall" then?
Does cygport change installation paths in respect to make install of the package? If not, then I guess make install is an option, because then I should have make uninstall too ...
cygport is the tool to build packages that can be installed with Cygwin setup-$ARCH.exe installation.
You can create a local setup structure, and use the calm package to create
the needed setup.ini file.
$ cygcheck -f /usr/bin/mksetupini
calm-20200220-1
Create a website directory similar to the cache you have from downloading, make a ARCH/release directory and copy the content of dist for the packages you are interested.
I am using a script like this to prepare the directory for setup
#!/bin/bash
cd /pub/altervista/
rm x86/setup.ini x86_64/setup.ini
for i in x86 x86_64
do
mksetupini --arch ${i} --inifile=${i}/setup.ini --releasearea=. --disable-check=missing-required-package,missing-depended-package
bzip2 <${i}/setup.ini >${i}/setup.bz2
xz -6e <${i}/setup.ini >${i}/setup.xz
done
In this moment its structure is like this:
$ cd http%3a%2f%2fmatzeri.altervista.org%2f
$ find x86_64/ -type f
x86_64/release/perl-Cairo/perl-Cairo-1.107-1-src.tar.xz
x86_64/release/perl-Cairo/perl-Cairo-1.107-1.hint
x86_64/release/perl-Cairo/perl-Cairo-1.107-1.tar.xz
x86_64/release/perl-Cairo/perl-Cairo-debuginfo/perl-Cairo-debuginfo-1.107-1.hint
x86_64/release/perl-Cairo/perl-Cairo-debuginfo/perl-Cairo-debuginfo-1.107-1.tar.xz
x86_64/release/perl-Glib/perl-Glib-1.3292-1-src.tar.xz
x86_64/release/perl-Glib/perl-Glib-1.3292-1.hint
x86_64/release/perl-Glib/perl-Glib-1.3292-1.tar.xz
x86_64/release/perl-Glib/perl-Glib-debuginfo
x86_64/release/perl-Glib/perl-Glib-debuginfo/perl-Glib-debuginfo-1.3292-1.hint
x86_64/release/perl-Glib/perl-Glib-debuginfo/perl-Glib-debuginfo-1.3292-1.tar.xz
x86_64/setup.bz2
x86_64/setup.ini
x86_64/setup.xz
than you can just install from that Website local directory. A fake Website works fine.
Ok, found and followed the instructions here: https://cygwin.com/package-server.html
First install calm via Cygwin's setup.exe (for me, setup-x86_64.exe):
Install calm 20200220-1
Install python36-setuptools 41.2.0-1 (automatically added)
Then, I have:
$ which mksetupini
/usr/bin/mksetupini
Note, I have already: /cygdrive/d/Downloads/cygwin_packages/http%3a%2f%2fcygwin.mirror.constant.com%2f/x86_64 where Cygwin stores downloaded packages; that directory has release subdir and setup.ini file.
So, now I can create a directory for my custom packages:
$ mkdir /cygdrive/d/Downloads/cygwin_packages/cygwin-custom
$ mkdir -p /cygdrive/d/Downloads/cygwin_packages/cygwin-custom/x86_64/release
Note that in my source build folder, I have a dist subfolder, which contains the packaging:
$ ls -la [packagename]-[version]-1bl1.x86_64/dist/[packagename]/
total 2557
drwxr-xr-x 1 user None 0 Mar 21 18:26 .
drwxr-xr-x 1 user None 0 Mar 21 18:26 ..
-rw-r--r-- 1 user None 373 Mar 21 18:26 [packagename]-[version]-1bl1.hint
-rw-r--r-- 1 user None 177772 Mar 21 18:26 [packagename]-[version]-1bl1.tar.xz
-rw-r--r-- 1 user None 2430900 Mar 21 18:26 [packagename]-[version]-1bl1-src.tar.xz
drwxr-xr-x 1 user None 0 Mar 21 18:26 [packagename]-debuginfo
drwxr-xr-x 1 user None 0 Mar 21 18:26 lib[packagename]0
drwxr-xr-x 1 user None 0 Mar 21 18:26 lib[packagename]-devel
I can just copy this to the arch/release child dir of cygwin-custom, and then change directory to cygwin-custom:
$ cp -a [packagename]-[version]-1bl1.x86_64/dist/[packagename] /cygdrive/d/Downloads/cygwin_packages/cygwin-custom/x86_64/release/
$ pushd /cygdrive/d/Downloads/cygwin_packages/cygwin-custom
Now, note that if I just call mksetupini as in the above webpage, it will fail:
$ mksetupini --arch x86_64 --inifile=x86_64/setup.ini --releasearea=.
mksetupini: package '[packagename]' version '[version]-1bl1' requires nonexistent or errored package 'cygwin'
mksetupini: package '[packagename]' version '[version]-1bl1' requires nonexistent or errored package 'libgcc1'
mksetupini: package '[packagename]' version '[version]-1bl1' requires nonexistent or errored package 'libreadline7'
...
... and the file setup.ini does not get created!
Then I thought I should symlink as in the above webpage:
$ for ARCH in x86_64 noarch ; do
mkdir -p ${ARCH}/release
cd ${ARCH}/release
ln -s /cygdrive/d/Downloads/cygwin_packages/http%3a%2f%2fcygwin.mirror.constant.com%2f/${ARCH}/release/* .
cd ../..
done
$ mksetupini --arch x86_64 --inifile=x86_64/setup.ini --releasearea=.
mksetupini: no .hint files in ./noarch/release/adwaita-icon-theme but has files: adwaita-icon-theme-3.26.1-1.tar.xz
mksetupini: no .hint files in ./noarch/release/base-cygwin but has files: base-cygwin-3.8-1.tar.xz
mksetupini: no .hint files in ./noarch/release/base-files but has files: base-files-4.3-2.tar.xz
...
mksetupini: package '[packagename]' version '[version]-1bl1' requires nonexistent or errored package 'cygwin'
mksetupini: package '[packagename]' version '[version]-1bl1' requires nonexistent or errored package 'libgcc1'
mksetupini: package '[packagename]' version '[version]-1bl1' requires nonexistent or errored package 'libreadline7'
mksetupini: package '[packagename]' version '[version]-1bl1' depends nonexistent or errored package 'cygwin'
...
... and this does not create setup.ini either.
Finally I found https://github.com/cascent/neovim-cygwin/issues/7 that mentioned the switch --okmissing required-package - so, finally this command:
$ mksetupini --arch x86_64 --inifile=x86_64/setup.ini --releasearea=. --okmissing required-package
... will finally create setup.ini - which will only contain our custom built packages, as they are the only ones that have a .hint file ( I don't have any .hint files in the http%3a%2f%2fcygwin.mirror.constant.com%2f directory, where cygwin usually downloads packages ):
$ cat x86_64/setup.ini
# This file was automatically generated at 2020-03-21 19:42:00 CET.
#
# If you edit it, your edits will be discarded next time the file is
# generated.
#
# See https://sourceware.org/cygwin-apps/setup.ini.html for a description
# of the format.
release: cygwin
arch: x86_64
setup-timestamp: 1584816120
# [packagename]
sdesc: "Blah blah ..."
...
Now, start Cygwin setup.exe, and when the choice screen is: "Cygwin Setup - Choose Installation Type"; here switch from "Install from Internet (...)" to "Install from Local Directory"; on Next > keep Root directory the same; on Next > Select Local Package Directory: I chose D:\Downloads\cygwin_packages\cygwin-custom - on Next > : Select Packages: View Full, then [packagename] is listed there ... and can be installed - and dependencies are resolved, too:
Install [packagename] [version]-1bl1
Install lib[packagename]0 [version]-1bl1 (automatically added)
And finally, after installation, I can call [packagename].exe by name directly in the Cygwin bash shell!
Not too bad of a process, but can get a bit involved if you cannot find the right documentation ...
I run ./myprogram and it gives me a warning:
Warning: Your program was compiled with SimGrid version 3.13.90, and then linked against SimGrid 3.13.0. Proceeding anyway.
Tryldd myprogram and it gives following:
libsimgrid.so.3.13.90 => /usr/lib/libsimgrid.so.3.13.90 (0x00007f338ef47000)
Then I go to usr/lib and type ll *sim* in terminal:
lrwxrwxrwx 1 ken ken 21 июл 28 19:29 libsimgrid.so -> libsimgrid.so.3.13.90*
-rwxrwxr-x 1 ken ken 12307480 июл 28 19:29 libsimgrid.so.3.13.90*
In CMakeLists.txt I link library simgrid in such way:
target_link_libraries(CSim2Sim simgrid)
Why myprogram still links against SimGrid 3.13.0 (it doesn't exist in /usr/lib while SimGrid 3.13.90 does)?
UPDATE:
Command locate libsimgrid.so in ternimal gives:
/home/ken/Downloads/simgrid-master/lib/libsimgrid.so
/home/ken/Downloads/simgrid-master/lib/libsimgrid.so.3.13.90
/home/ken/SimGrid/lib/libsimgrid.so
/home/ken/SimGrid/lib/libsimgrid.so.3.13.90
/usr/lib/libsimgrid.so
/usr/lib/libsimgrid.so.3.13.90
The message seems buggy, it looks like your application was actually compiled with 3.13.0, and linked to libsimgrid 3.13.90. The order was inverted in the message, I will fix that.
It could be a problem with your includes when you compile your code, I think. Please check that you don't use old versions of msg.h/simgrid_config.h files when you compile your app (maybe there are still one in /usr/include ?).
To check, you can look for SIMGRID_VERSION_PATCH in simgrid_config.h. it should be 90 in a recent one, not 0.
This doesn't appear to be the usual CLASSPATH issue, but maybe something specific to cygwin.
The following illustrates the issue.
import net.jradius.packet.attribute.AttributeFactory;
public class Test{
static int x = 100;
}
When compiling the following error appears.
$ javac Test.java
Test.java:1: error: package net.jradius.packet.attribute does not exist
import net.jradius.packet.attribute.AttributeFactory;
^
1 error
The file jradius-core-1.1.4.jar is in the CLASSPATH.
When using the command line within Windows it works. Here is the classpath.
set CLASSPATH=c:\Temp\jradius-core-1.1.4.jar
When using cygwin it produces the error. Here is the classpath.
export CLASSPATH=/cygdrive/c/Temp/jradius-core-1.1.4.jar
The location is valid via cygwin as the following shows it is recognized.
ls $CLASSPATH
/cygdrive/c/Temp/jradius-core-1.1.4.jar
The same JDK is used for both scenarios.
Any idea why it may be failing via cygwin???
You are using JDK built for windows, so the environment is for windows.
That's being said, you should be provide windows-style path to javac.
cygpath is what you are looking for here.
Try:
javac Test.java -cp `cygpath.exe -w /cygdrive/c/Temp/jradius-core-1.1.4.jar`
cygpath -w means print in windows style.
Or just put the jar file in the same directory of the java file, and in cygwin:
javac Test.java -cp jradius-core-1.1.4.jar
Refer from this
Added the JAR files into the directory and changed the classpath to include '*' and that appears to have worked.
Im learning to code Android in NDK on WINDOWS Eclipse.... been following a Tutorial Book by Sylvain Ratabouil. So im in Run | External Tools | External Tools Configurations…
creating a new program configuration.
Name: MyProject javah
Location : ${env_var:JAVA_HOME}\bin\javah.exe
Working directory: ${workspace_loc:/MyProject/bin}
The problem comes In arguments...
when i try
Arguments: –d ${workspace_loc:/MyProject/jni} com.myproject.MyActivity
as it says in the book
i get when i click run
Exception in thread "main" java.lang.IllegalArgumentException: Not a valid class name: –d
when i try ${workspace_loc:/MyProject/jni} com.myproject.MyActivity}
i get
Exception in thread "main" java.lang.IllegalArgumentException: Not a valid class name: C:\Paul\Workspace\MyProject\jni
UPDATE:
i put -classpath first and it's running but can not find the class file for com.myproject
after further research....
i did it.
i set arguments to
-d ${workspace_loc:/MyProject/jni} -classpath C:\Paul\android-sdk-windows\platforms\android-17\android.jar;${workspace_loc:/MyProject/bin/classes} com.myproject.MainActivity
I also spend some long time on this problem when working with the the mentioned book about Android NDK.
Please note the following:
The java classname is NOT written in { }, just write something like com.myproject.MyActivity
The -classpath parameter can receive several paths devided by semicolon.
In my case this parameters worked:
Location:
${env_var:JAVA_HOME}\bin\javah.exe
Working Directory:
${workspace_loc:/myproject/bin}
Arguments:
-d ${workspace_loc:/myproject/jni} -classpath ${workspace_loc:/myproject/bin/classes};"C:\Eclipse\sdk\platforms\android-18\android.jar" com.myproject.MyActivity
(BTW.: The correct Adroid.jar file is referenced inside the Eclipse project.)
Me also facing the same problem tonight, i found a less tedious way as following...
as "Location" set the javah from your system
as "Working directory" set the project's bin/classes directory (${workspace_loc:/HelloWorld/bin/classes})
as "Argument" set the jni folder as the output directory and point out the class on which you want to run the javah (-d "${workspace_loc:/HelloWorld/jni}" com.example.helloworld.MainActivity)
NB :: Dont forget the double qoute (") around the output in the third step ("${workspace_loc:/HelloWorld/jni}")
A full picture is also attached following
well in case ...
1-> Goto ( cd C:\Program Files\Java\jdk1.7.0_60\bin)
2-> C:\Program Files\Java\jdk1.7.0_60\bin>javah -jni -classpath
F:\Android_OpenGLES\FibonacciNative\bin\classes
-d F:\Android_OpenGLES\FibonacciNative\jni\ com.example.fibonaccinative.FibLib
without creating/using environment variable ...
Following I tried successfully
javah com.sense.kios.Calculation
Note: Include package name.
In case if javah not found as an command and you getting
The program 'javah' can be found in the following packages:
* gcj-4.6-jdk
* gcj-4.7-jdk
* openjdk-7-jdk
* openjdk-6-jdk
Try: sudo apt-get install <selected package>
use direct path of jdk path, in my case it's /usr/lib/jvm/jdk1.8.0/bin/javah.
YES THAT'S CORRECT
more abstract would be
-d ${workspace_loc:/MyProject/jni} -classpath ${env_var:ANDROID_SDK_HOME}\platforms\android-16\android.jar;${workspace_loc:/MyProject/bin/classes} com.myproject.MyActivity