xCode 7 Cocoapod Archive error - cocoapods

I have used cocoa pod and try to archive. After that, I got this error.
I looked solution from here but it doesn't work too. How shall I do?
how to fix the issue "Command /bin/sh failed with exit code 1" in iphone
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
building file list ... done
rsync: push_dir#3 "/Users/khantthulinn/Library/Developer/Xcode/DerivedData/SMRTConnect-emozrftvltrpagajdyydwrdgnacg/Build/Intermediates/ArchiveIntermediates/SMRTConnect/InstallationBuildProductsLocation" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-47/rsync/main.c(580) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-47/rsync/io.c(453) [sender=2.6.9]
Command /bin/sh failed with exit code 12

Related

ClamAV scan errors and warnings

I ran a ClamAV scan on Mac OS (on Terminal) using this command:
clamscan -r --bell -i /
When it ran, this error appeared about 300 times:
LibClamAV Error: hfsplus_walk_catalog: failed to convert UTF-16BE to UTF-8
It also found these errors:
LibClamAV Warning: SWF: declared input length != compressed stream size, 894266992 != 9089007
LibClamAV Error: scanzws: LzmaInit() failed
LibClamAV Warning: cli_scanxz: decompress file size exceeds limits - only scanning 27262976 bytes
LibClamAV Error: cli_scanxz: premature end of compressed stream
LibClamAV Error: cli_scanxz: decompress error: 1
LibClamAV Warning: PNG: Unexpected early end-of-file.
I don't know what these errors mean. Why are all these errors appearing? Is the scan skipping over files? If so, then it might have skipped over infected files. Also, how serious are these errors, and what can be done to fix them?

fatal error: An error occurred (404) when calling the HeadObject operation: Key " " does not exist

This is my setup:
I use AWS Batch that is running a custom Docker image
The startup.sh file is an entrypoint script that is reading the nth line of a text file and copying it from s3 into the docker.
For example, if the first line of the .txt file is 'Startup_00001/ Startup_000018 Startup_000019', the bash script reads this line, and uses a for loop to copy them over.
This is part of my bash script:
STARTUP_FILE_S3_URL=s3://cmtestbucke/Config/
Startup_FileNames=$(sed -n ${LINE}p file.txt)
for i in ${Startup_FileNames}
do
Startup_FileURL=${STARTUP_FILE_S3_URL}$i
echo $Startup_FileURL
aws s3 cp ${Startup_FileURL} /home/CM_Projects/ &
done
Here is the log output from aws:
s3://cmtestbucke/Config/Startup_000017
s3://cmtestbucke/Config/Startup_000018
s3://cmtestbucke/Config/Startup_000019
Completed 727 Bytes/727 Bytes (7.1 KiB/s) with 1 file(s) remaining download: s3://cmtestbucke/Config/Startup_000018 to Data/Config/Startup_000018
Completed 731 Bytes/731 Bytes (10.1 KiB/s) with 1 file(s) remaining download: s3://cmtestbucke/Config/Startup_000017 to Data/Config/Startup_000017
fatal error: *An error occurred (404) when calling the HeadObject operation: Key
"Config/Startup_000019 " does not exist.*
My s3 bucket certainly contains the object s3://cmtestbucke/Config/Startup_000019
I noticed this happens regardless of filenames. The last iteration always gives this error.
I tested this bash logic locally with the same aws commands. It copies all 3 files.
Can someone please help me figure out what is wrong here?
The problem was with EOL of the text file. It was set to Windows(CR LF). The docker image is running Ubuntu which caused the error. I changed the EOL to Unix(LF). The problem was solved.

Using Rsync with Makefile

I am trying to use a makefile to sync some of my directories that are on my pc with my thumb drive. For this purpose, I am using multiple commands in a single target.
The makefile looks somewhat like this
pend:
rsync -avhzPu /foo/ /bar/
rsync -avhzPu /bob/ /alice/
But, every time I am doing make -f .sync pend only the first command runs and gives some output along with some error
sent 45.78K bytes received 3.32K bytes 98.20K bytes/sec
total size is 4.42G speedup is 89,981.37
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
.sync:14: recipe for target 'pend' failed
make: *** [pend] Error 23
But when I am running the commands separately it works. I am not sure what wrong I am doing here.
From the output...
sent 45.78K bytes received 3.32K bytes 98.20K bytes/sec
total size is 4.42G speedup is 89,981.37
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
.sync:14: recipe for target 'pend' failed
make: *** [pend] Error 23
...the first rsync is failing. If it ends with a non-zero exit code then make will simply bail at that point. If you want make to continue with further commands in the rule then you can explicitly request that it should ignore non-zero exit codes by prefixing a command with a -...
pend:
-rsync -avhzPu /foo/ /bar/
-rsync -avhzPu /bob/ /alice/
This assumes, of course, that simply continuing with the commands is the desired behaviour. Otherwise you need to think more carefully about how to proceed.

rsync script expands variable incorrectly

I have a script that takes in a unique location number from a file. These are formatted like this 7325-05, 5269-09 and 7479-14, for example. The first four numbers are what the folder is called and the second number is the first two characters of the filename unique within each folder.
So I wrote this script to use locate and find to get the full path of the folder and then use a wildcard to download the specific file using rsync. Here's the script that I have right now:
#!/bin/bash
#IFS='
#'
oIFS=$IFS
IFS=$'\n'
while read line;
do
name=$line;
folder=${line:0:4}
track=${line: -2}
folderlocation="$(locate -r '/'$folder'$')"
filelocation="$(find "$folderlocation" -type f -name "$track*")"
rsync -vazhn --progress "$filelocation" /cygdrive/c/
# mkdir /cygdrive/c/test/"$folder"
# cp -rvi "$filelocation" /cygdrive/c/test/"$folder"
echo "";
done < $1
The code using cp that is commented out works just fine. I would just really prefer to use rsync, mainly due to better feedback and more accurate progress reporting, as far as I can tell.
Using the code as pasted above (with rsync) throws this error:
./filelocator classic-locations.txt
sending incremental file list
rsync: change_dir "/home/emil//\\sandrew-nas/SMMUSIC/MMIMUSIC/7001-8000/7201-7300/7252/Unknown Album (29-12-2012 09-52-02)" failed: No such file or directory (2)
sent 20 bytes received 12 bytes 64.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1165) [sender=3.1.1]
sending incremental file list
rsync: change_dir "/home/emil//\\sandrew-nas/SMMUSIC/MMIMUSIC/7001-8000/7201-7300/7252/Unknown Album (29-12-2012 09-52-02)" failed: No such file or directory (2)
sent 20 bytes received 12 bytes 64.00 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1165) [sender=3.1.1]
As you can see, my home folder (where I issue the command) is suddenly included in the script, leading me to believe that a variable or wildcard is being expanded in the local shell, but no amount of escape characters seem to accomplish what I want with rsync.

rsync error: error in rsync protocol data stream (code 12)

I'm trying to do an rsync to transfer 500GB of files from one server to another. I use this command;
rsync -vrPt -e 'ssh -p 2222' uname#server.com:/folder /newfolder
It works and syncs just fine for about 10/15 minutes, then it throws this error every time;
rsync: connection unexpectedly closed (5321016884 bytes received so
far) [receiver] rsync: writefd_unbuffered failed to write 4 bytes to
socket [generator]: Broken pipe (32) rsync error: error in rsync
protocol data stream (code 12) at io.c(1525) [generator=3.0.6] rsync
error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.6]
What could the problem be?
It looks like it is a router timing out the NAT table entry. (I assume one of the servers is on a DSL link.)
Or it could be this: "An idle connection caused a router or remote-shell server to close the connection." from http://rsync.samba.org/issues.html

Resources