Error downloading the services file -- /%0D/ carriage return character?

aaronmax

Verified User
Joined
Mar 25, 2019
Messages
15
==== at a fresh CentOS 7.6 from minimal; system updated, vasics set up (eg. ssh, firewalld) and devtoolset-8

Code:
# yum install wget gcc gcc-c++ flex bison make bind bind-libs bind-utils openssl openssl-devel perl quota libaio \
libcom_err-devel libcurl-devel gd zlib-devel zip unzip libcap-devel cronie bzip2 cyrus-sasl-devel perl-ExtUtils-Embed \
autoconf automake libtool which patch mailx bzip2-devel lsof glibc-headers kernel-devel expat-devel db4-devel psmisc \
net-tools systemd-devel libdb-devel perl-DBI xfsprogs rsyslog logrotate crontabs file

Code:
# mkdir -p /usr/local/directadmin/custombuild && wget -O /usr/local/directadmin/custombuild/options.conf https://wp.network/options.conf
# cd /root && echo "[email protected]" > /root/.email.txt && echo "ns1.wp.network" > /root/.ns1.txt && echo "ns2.wp.network" > /root/.ns2.txt && echo "2.0" > /root/.custombuild
# wget -O setup.sh http://www.directadmin.com/setup.sh && chmod 755 setup.sh
# ./setup.sh xxxxx xxxxxx a.b.com eth0 num.num.num.num

==== ERROR:

Code:
2019-03-26 10:49:22 (92.6 MB/s) - ‘/usr/local/directadmin/scripts/packages/services.tar.gz’ saved [542/542]

--2019-03-26 10:49:22--  http://%0D/services/services_es70_64.tar.gz
Resolving \r (\r)... failed: Name or service not known.
wget: unable to resolve host address ‘\r’
FINISHED --2019-03-26 10:49:22--
Total wall clock time: 0.08s
Downloaded: 1 files, 542 in 0s (92.6 MB/s)
Error downloading the services file

==== so says: https://stackoverflow.com/a/11156387

%0D which supposed to be a carrige return character

Your script file apparently has DOS-style lines, and the carriage return character is interpreted as just another character in the command line. If you have no space after the URL, it is interpreted as the last character of the URL; if you have a space, it is interpreted as a separate one-character parameter.

You should save your script file with UNIX-style lines. How you do that depends on your editor.

====

Thoughts?

====

Cheers, A
 
workaround (issue persists?)

note: ...well, perhaps I should mention: this is a kvm VPS (at UpCloud) that is running the elrepo mainline kernel (currently: 5.0.3-1.el7.elrepo.x86_64) -- a few other seemingly insignificant things (eg. use BBR).
The setup is documented; if you want more info pls advise :)Aaron Max
++++
16:05 pm
3/26/2019
update: ...so, I tried:
====
Code:
# vi /root/setup.sh
:1,$s/^M//g
:wq

Code:
# vi /usr/local/directadmin/scripts/setup.sh
:1,$s/^M//g
:wq

...and it found and removed some carriage return character
...however, seemed to make no difference: same error :(
====
...so, I tried
Code:
# cd /usr/local/directadmin/scripts
# sed -i -e 's/\r\+$//' **/*.sh
...and this seemed to make no difference: same error :(
====
...so, I tried
Code:
# cd /usr/local/directadmin
# sed -i -e 's/\r\+$//' *.sh
...and this seemed to make no difference: same error :(
====
...so, for the heck of it, I tried
Code:
# cd /usr/local/directadmin
# sed -i -e 's/\r\+$//' **/*.*
...and this seemed to make a difference: different error :|

Code:
2019-03-26 12:27:07 (80.9 MB/s) - ‘/usr/local/directadmin/scripts/packages/services.tar.gz.md5’ saved [542/542]

/services/services_es70_64.tar.gz.md5: Scheme missing.
FINISHED --2019-03-26 12:27:07--
Total wall clock time: 0.05s
Downloaded: 1 files, 542 in 0s (80.9 MB/s)
--2019-03-26 12:27:07--  http://files2.directadmin.com/
Resolving files2.directadmin.com (files2.directadmin.com)... 208.167.226.3
Connecting to files2.directadmin.com (files2.directadmin.com)|208.167.226.3|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 542 [text/html]
Saving to: ‘/usr/local/directadmin/scripts/packages/services.tar.gz’

100%[=====================================================================================================================>] 542         --.-K/s   in 0s

2019-03-26 12:27:07 (89.0 MB/s) - ‘/usr/local/directadmin/scripts/packages/services.tar.gz’ saved [542/542]

/services/services_es70_64.tar.gz: Scheme missing.
FINISHED --2019-03-26 12:27:07--
Total wall clock time: 0.05s
Downloaded: 1 files, 542 in 0s (89.0 MB/s)
Error downloading the services file
=====

++++
16:51 pm
3/26/2019
note: at /usr/local/directadmin/scripts/install.sh
Line 255
Code:
DL_SERVER=files.directadmin.com
there is what appears as an extra space after the 'm' in '.com'

++++
17:33 pm
3/26/2019
update: ...so, I kept poking at this to no real avail -- instead I just worked around it by adding to options.conf
Code:
downloadserver=files2.directadmin.com

...this does seem like something that ought to be investigated, possibly as part of a larger workflow related thing re. windows \r --> unix

would be interested in any follow up insight anyone can offer :)

cheers, aaron
 
Back
Top