I downloaded and unzipped the package on redhat.
ls
bin conf lib LICENSE.txt plugins system
CHANGES.txt data LICENSES.txt NOTICE.txt README.txt UPGRADE.txt
bin ls -lt
drwxr-xr-x. 2 root root 4096 Jan 25 00:04 lib
-rwxr-xr-x. 1 root root 10521 Jul 24 2014 neo4j
-rwxr-xr-x. 1 root root 4404 Jul 24 2014 neo4j-installer
-rwxr-xr-x. 1 root root 3443 Jul 24 2014 neo4j-shell
-rwxr-xr-x. 1 root root 478 Jul 24 2014 org.neo4j.server.plist
-rw-r--r--. 1 root root 138 Jul 24 2014 README.txt
-rwxr-xr-x. 1 root root 10263 Jul 24 2014 utils
bin ./neo4j-installer install
WARNING: this installer is deprecated and may not be the optimal way to install Neo4j on your system.
Please see the Neo4j Manual for up to date information on installing Neo4j.
Any suggestions?
Instead of using the install script you can simply start the Neo4j server by running path/to/neo4j/bin/neo4j start.
There is also an experimental YUM package here
Related
/ # which chasquid-util
/usr/local/bin/chasquid-util
/ # chasquid-util
/bin/sh: chasquid-util: not found
/ # /usr/local/bin/chasquid-util
/bin/sh: /usr/local/bin/chasquid-util: not found
/ # ls -al /usr/local/bin/
total 27432
drwxr-xr-x 1 root root 4096 Jul 26 16:18 .
drwxr-xr-x 1 root root 4096 Jul 26 16:18 ..
-rwxr-xr-x 1 root root 11721005 Jul 26 16:18 chasquid
-rwxr-xr-x 1 root root 5510494 Jul 26 16:18 chasquid-util
-rwxr-xr-x 1 root root 2910713 Jul 26 16:18 mda-lmtp
-rwxr-xr-x 1 root root 4767277 Jul 26 16:18 smtp-check
-rwxr-xr-x 1 root root 3164845 Jul 26 16:18 spf-check
/ #
Given your context, this typically means you are missing a shared library. With alpine, it's typically glibc since they ship with libmusl. You can check this with:
ldd chasquid-util
I've got several other reasons for this listed in my DC 2018 slidedeck:
Did you run the intended command? (e.g. docker run --rm my_image -it echo hello world will run the command -it)
Is docker trying to run a json string? (any json paring errors will show up as executing the json as a string)
Does the file exist... in the path and inside the container? (can't run stuff from the host inside a container without building it into the image or mounting a volume)
If it is a shell script, check the first line (e.g. #!/bin/bash)
Check for windows linefeeds on linux shell scripts (look for ^M or \r with different editors)
If it is a binary, there is likely a missing library (use ldd to check)
I am trying to copy file from docker to host using the below command,
docker cp <container_name>:<file FQN> ./
But getting the below error,
Error response from daemon: not a directory
As verified, the file name and container name are valid.
Note: Using Docker in Mac
Thanks for all the answers. After a bit of struggle found out that the error message was not actually directly related to the docker cp command.
The scenario was, I ran the docker with the link to a local file. When the docker was running I deleted it. Then the file got created as a folder somehow (Probably, when I restarted the docker).
And whenever I am executing some command, the docker was giving me that error. Then once I created the file the error disappeared.
It seems your command is correct. You please try like the below from your local machine not from inside the container. sometimes unfortunately if we run this command with in the container we will get this kind of errors.
docker cp [container_name]:[docker dir abs path] [host dir path]
Hope it will help you.
Here is a full example on how to copy a file:
$ docker run -it ubuntu /bin/bash
root#9fc8a1af7f23:/#
root#9fc8a1af7f23:/# ll
total 72
drwxr-xr-x 34 root root 4096 Jul 13 21:51 ./
drwxr-xr-x 34 root root 4096 Jul 13 21:51 ../
-rwxr-xr-x 1 root root 0 Jul 13 21:51 .dockerenv*
drwxr-xr-x 2 root root 4096 Feb 14 23:29 bin/
drwxr-xr-x 2 root root 4096 Apr 12 2016 boot/
drwxr-xr-x 5 root root 360 Jul 13 21:51 dev/
drwxr-xr-x 45 root root 4096 Jul 13 21:51 etc/
drwxr-xr-x 2 root root 4096 Apr 12 2016 home/
drwxr-xr-x 8 root root 4096 Sep 13 2015 lib/
drwxr-xr-x 2 root root 4096 Feb 14 23:29 lib64/
drwxr-xr-x 2 root root 4096 Feb 14 23:28 media/
drwxr-xr-x 2 root root 4096 Feb 14 23:28 mnt/
drwxr-xr-x 2 root root 4096 Feb 14 23:28 opt/
dr-xr-xr-x 288 root root 0 Jul 13 21:51 proc/
drwx------ 2 root root 4096 Feb 14 23:29 root/
drwxr-xr-x 6 root root 4096 Feb 27 19:41 run/
drwxr-xr-x 2 root root 4096 Feb 27 19:41 sbin/
drwxr-xr-x 2 root root 4096 Feb 14 23:28 srv/
dr-xr-xr-x 13 root root 0 Jul 13 21:51 sys/
drwxrwxrwt 2 root root 4096 Feb 14 23:29 tmp/
drwxr-xr-x 11 root root 4096 Feb 27 19:41 usr/
drwxr-xr-x 13 root root 4096 Feb 27 19:41 var/
root#9fc8a1af7f23:/# cd tmp/
root#9fc8a1af7f23:/tmp# ls
root#9fc8a1af7f23:/tmp# echo "hello docker" > docker_test.txt
root#9fc8a1af7f23:/tmp# cat docker_test.txt
hello docker
root#9fc8a1af7f23:/tmp#
Then, in another terminal
dali#dali-X550JK:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9fc8a1af7f23 ubuntu "/bin/bash" 2 minutes ago Up 2 minutes fervent_hodgkin
dali#dali-X550JK:~$ docker cp fervent_hodgkin:/tmp/docker_test.txt /tmp/
dali#dali-X550JK:~$ cat /tmp/docker_test.txt
hello docker
dali#dali-X550JK:~$
Please follow these instruction, make sure your don't have typo in the file paths, otherwise share a reproducible error.
This error also appears when trying to copy a file that is actually a volume in the container, but the file has been deleted on the host.
This is simply an error in the path you want to copy.
You may not believe it, but that it is.
I have a docker image https://github.com/carnellj/spmia-chapter1 which does not find its CMD ./run.sh executable although it is there in the file system.
I was able to run /bin/sh in the container, and I can ls -l:
D:\Dokumente\ws\spring-microservices\spmia-chapter1 (master)
λ docker run -i -t johncarnell/tmx-simple-service:chapter1 /bin/sh
/ # ls -l
total 56
drwxr-xr-x 2 root root 4096 Mar 3 11:20 bin
drwxr-xr-x 5 root root 360 Apr 22 07:10 dev
drwxr-xr-x 1 root root 4096 Apr 22 07:10 etc
drwxr-xr-x 2 root root 4096 Mar 3 11:20 home
drwxr-xr-x 1 root root 4096 Apr 22 06:01 lib
drwxr-xr-x 5 root root 4096 Mar 3 11:20 media
drwxr-xr-x 2 root root 4096 Mar 3 11:20 mnt
dr-xr-xr-x 123 root root 0 Apr 22 07:10 proc
drwx------ 1 root root 4096 Apr 22 07:10 root
drwxr-xr-x 2 root root 4096 Mar 3 11:20 run
-rwxr-xr-x 1 root root 245 Apr 22 06:50 run.sh
drwxr-xr-x 2 root root 4096 Mar 3 11:20 sbin
drwxr-xr-x 2 root root 4096 Mar 3 11:20 srv
dr-xr-xr-x 13 root root 0 Apr 22 07:10 sys
drwxrwxrwt 2 root root 4096 Mar 3 11:20 tmp
drwxr-xr-x 1 root root 4096 Mar 7 01:04 usr
drwxr-xr-x 1 root root 4096 Mar 7 01:04 var
/ # ./run.sh
/bin/sh: ./run.sh: not found
/ # ls run.sh
run.sh
/bin/sh does not find ./run.sh although it is there in the file system, as proven by ls run.sh. Also, cat shows the content of run.sh:
/ # cat run.sh
#!/bin/sh
echo "********************************************************"
echo "Starting simple-service "
echo "********************************************************"
java -jar /usr/local/simple-service/simple-service-0.0.1-SNAPSHOT.jar
When I run vi from sh and copy the content of run.sh into a new file myrun.sh and make myrun.sh executable, I can execute ./myrun.sh and the spring service starts.
What is going on here? Why would sh not see an executable which is there in the filesystem? Executables from PATH or executables which I add manually run fine.
I am running Docker on Windows 10.
OK the reason is, run.sh is created with Windows line endings in the docker image if you check out with automatic lf->crlf conversion. One possible solution is to tell git not to convert line endings.
I have a recent version of GVM - in fact, my entire machine is very recent as I wiped off Windows and installed Linux Mint 17 at the end of May or beginning of June. GVM does not install software, doesn't even create the directory (in the example, no 2.4.2 directory - as you can see, the mv fails for this reason). I have had to install the products manually. The "current" points to a non-existent instance if I fail to do so. This has been true of Grails, Groovy and Gradle.
Here is an example:
worldwidewilly#hal9000 ~ $ gvm install grails 2.4.2
Downloading: grails 2.4.2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
100 131M 100 131M 0 0 1208k 0 0:01:51 0:01:51 --:--:-- 2092k
Installing: grails 2.4.2
mv: target ‘/home/worldwidewilly/.gvm/grails/2.4.2’ is not a directory
Done installing!
Do you want grails 2.4.2 to be set as default? (Y/n): y
Setting grails 2.4.2 as default.
What need I do to not fail on the install? Are there dependencies in Linux that I need install?
EDIT #1 - adding requested ls
worldwidewilly#hal9000 ~ $ \ls -la ~/.gvm
total 64
drwxr-xr-x 16 worldwidewilly worldwidewilly 4096 Jun 15 12:27 .
drwxr-xr-x 53 worldwidewilly worldwidewilly 4096 Jul 9 22:11 ..
drwxr-xr-x 2 worldwidewilly worldwidewilly 4096 Jul 9 07:58 archives
drwxr-xr-x 2 worldwidewilly worldwidewilly 4096 Jun 15 12:26 bin
drwxr-xr-x 2 worldwidewilly worldwidewilly 4096 Jun 15 12:26 crash
drwxr-xr-x 2 worldwidewilly worldwidewilly 4096 Jun 15 12:26 etc
drwxr-xr-x 2 worldwidewilly worldwidewilly 4096 Jun 15 12:26 ext
drwxr-xr-x 2 worldwidewilly worldwidewilly 4096 Jun 15 12:26 gaiden
drwxr-xr-x 2 worldwidewilly worldwidewilly 4096 Jun 15 12:26 glide
drwxr-xr-x 3 worldwidewilly worldwidewilly 4096 Jun 28 20:54 gradle
drwxr-xr-x 3 worldwidewilly worldwidewilly 4096 Jul 9 08:11 grails
drwxr-xr-x 2 worldwidewilly worldwidewilly 4096 Jun 15 12:26 griffon
drwxr-xr-x 3 worldwidewilly worldwidewilly 4096 Jun 15 12:27 groovy
drwxr-xr-x 2 worldwidewilly worldwidewilly 4096 Jun 15 12:26 src
drwxr-xr-x 6 worldwidewilly worldwidewilly 4096 Jul 9 08:00 tmp
drwxr-xr-x 2 worldwidewilly worldwidewilly 4096 Jun 15 12:27 var
EDIT #2 - adding second second ls
worldwidewilly#hal9000 ~ $ ls -la ~/.gvm/grails
total 12K
524305 drwxr-xr-x 3 worldwidewilly worldwidewilly 4.0K Jul 9 08:11 .
59776162 drwxr-xr-x 16 worldwidewilly worldwidewilly 4.0K Jun 15 12:27 ..
19138378 drwxr-xr-x 10 worldwidewilly worldwidewilly 4.0K Jun 17 10:09 2.4.1
524458 lrwxrwxrwx 1 worldwidewilly worldwidewilly 38 Jul 9 08:11 current -> /home/worldwidewilly/.gvm/grails/2.4.2
EDIT #3 - showing contents of 2.4.1 directory
worldwidewilly#hal9000 ~ $ ls -la ~/.gvm/grails/2.4.1
total 284K
19138378 drwxr-xr-x 10 worldwidewilly worldwidewilly 4.0K Jun 17 10:09 .
524305 drwxr-xr-x 3 worldwidewilly worldwidewilly 4.0K Jul 9 08:11 ..
19267975 drwxr-xr-x 2 worldwidewilly worldwidewilly 4.0K Jun 17 10:10 bin
19138379 -rw-r--r-- 1 worldwidewilly worldwidewilly 22 Jun 17 09:30 build.properties
19267980 drwxr-xr-x 2 worldwidewilly worldwidewilly 4.0K Jun 17 10:10 conf
19267984 drwxr-xr-x 2 worldwidewilly worldwidewilly 64K Jun 17 10:10 dist
19138380 -rw-r--r-- 1 worldwidewilly worldwidewilly 117 Jun 17 09:20 INSTALL
19138382 drwxr-xr-x 62 worldwidewilly worldwidewilly 4.0K Jun 17 10:09 lib
19138381 -rw-r--r-- 1 worldwidewilly worldwidewilly 171K Jun 17 09:20 LICENSE
19267653 drwxr-xr-x 4 worldwidewilly worldwidewilly 4.0K Jun 17 09:20 media
19267952 drwxr-xr-x 2 worldwidewilly worldwidewilly 4.0K Jun 17 10:10 plugins
19138931 -rw-r--r-- 1 worldwidewilly worldwidewilly 2.5K Jun 17 09:20 README
19267876 drwxr-xr-x 2 worldwidewilly worldwidewilly 4.0K Jun 17 10:10 scripts
19267676 drwxr-xr-x 5 worldwidewilly worldwidewilly 4.0K Jun 17 10:09 src
EDIT #4 - adding zip info
worldwidewilly#hal9000 ~ $ which zip
/usr/bin/zip
worldwidewilly#hal9000 ~ $ zip -h
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
Zip 3.0 (July 5th 2008). Usage:
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]
The default action is to add or replace zipfile entries from list, which
can include the special name - to compress standard input.
If zipfile and list are omitted, zip compresses stdin to stdout.
-f freshen: only changed files -u update: only changed or new files
-d delete entries in zipfile -m move into zipfile (delete OS files)
-r recurse into directories -j junk (don't record) directory names
-0 store only -l convert LF to CR LF (-ll CR LF to LF)
-1 compress faster -9 compress better
-q quiet operation -v verbose operation/print version info
-c add one-line comments -z add zipfile comment
-# read names from stdin -o make zipfile as old as latest entry
-x exclude the following names -i include only the following names
-F fix zipfile (-FF try harder) -D do not add directory entries
-A adjust self-extracting exe -J junk zipfile prefix (unzipsfx)
-T test zipfile integrity -X eXclude eXtra file attributes
-y store symbolic links as the link instead of the referenced file
-e encrypt -n don't compress these suffixes
-h2 show more help
The problem was that I had improperly aliased my mv command, which caused mv to break. See http://forums.linuxmint.com/viewtopic.php?f=90&t=174548 for a deeper explanation.
I have a strange problem in jenkins, I cannot copy files in a job, however, with the user jenkins on the command line, I can do that without problem.
I am using jenkins on debian running under the user "jenkins".
I added the user "jenkins" to the group "www-data", so that I can copy files to the www-folder of apache.
The folder rights of the target folder look like this:
drwxrwxr-x 9 www-data www-data 4096 Jun 23 16:19 .
drwxrwxr-x 4 www-data www-data 4096 Jun 23 12:45 ..
-rw-rw-r-- 1 volker www-data 368 Jun 23 17:10 about.php
-rw-rw-r-- 1 volker www-data 366 Jun 23 17:10 bio.php
-rw-rw-r-- 1 volker www-data 370 Jun 23 17:10 contact.php
drwxrwxr-x 3 volker www-data 4096 Jun 23 16:19 content
drwxrwxr-x 3 volker www-data 4096 Jun 23 16:19 css
drwxrwxr-x 8 volker www-data 4096 Jun 23 16:19 default
drwxrwxr-x 3 volker www-data 4096 Jun 23 16:19 fonts
drwxrwxr-x 2 volker www-data 4096 Jun 23 13:40 image
drwxrwxr-x 3 volker www-data 4096 Jun 23 16:19 images
-rw-rw-r-- 1 volker www-data 372 Jun 23 17:10 impressum.php
-rw-rw-r-- 1 volker www-data 367 Jun 23 17:10 index.php
-rw-rw-r-- 1 volker www-data 296 Jun 23 13:52 kontakt.php
drwxrwxr-x 3 volker www-data 4096 Jun 23 16:19 layout
-rw-rw-r-- 1 volker www-data 367 Jun 23 17:10 news.php
-rw-rw-r-- 1 volker www-data 370 Jun 23 17:10 termine.php
-rw-rw-r-- 1 volker www-data 369 Jun 23 17:10 videos.php
So everything is writable for group www-data.
If I am using the jenkins user to copy the files in the shell, I get no error:
jenkins#rootserver:~/jobs/deploy_notundellende/workspace$ whoami
jenkins
jenkins#rootserver:~/jobs/deploy_notundellende/workspace$ cp -R * /var/www/nue
jenkins#rootserver:~/jobs/deploy_notundellende/workspace$
But if I use the same command in jenkins itself, it fails with permission error:
pwd
/var/lib/jenkins/jobs/deploy_notundellende/workspace
whoami
jenkins
cp -R about.php bio.php contact.php content css fonts images impressum.php index.php layout news.php termine.php videos.php /var/www/nue
cp: cannot create regular file `/var/www/nue/about.php': Permission denied
cp: cannot create regular file `/var/www/nue/bio.php': Permission denied
cp: cannot create regular file `/var/www/nue/contact.php': Permission denied
cp: cannot create regular file `/var/www/nue/content/videos.php': Permission denied
How is that possible? Does anyone have an idea?
OK, I got it to work, I restarted the jenkins server and it worked. I assume it did not work before, because the jenkins server was already running when I changed its permissions. Makes sense to me now, come to think of it :) Anyway, thanks for anybody reading and thinking about this!
Solution 1: Restart Jenkins
(jenkins_url)/safeRestart - Allows all running jobs to complete. New jobs will remain in the queue to run after the restart is complete.
(jenkins_url)/restart - Forces a restart without waiting for builds to complete.
Solution 2: Check the user and permission for the same user
Check user: whoami
change permission: sudo chmod -R 777 /var/www/html/* or sudo chmod a+rwx /var/szDirectoryName
Solution 3:
If you get error/warning like Linux: 'Username' is not in the sudoers file. This incident will be reported ref the link