Install Jasmin SMS Gateway at Linux Centos 7 - linux

I am trying to install jasmin sms gatway,
I tried from that website https://docs.jasminsms.com/en/latest/installation/index.html
And tried all of these linux commands
curl -s https://setup.jasminsms.com/rpm | sudo bash
sudo yum install epel-release
sudo yum install jasmin-sms-gateway
With the last command :sudo yum install jasmin-sms-gateway
i got these
Loaded plugins: fastestmirror, tsflags, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 63.247.64.58
* cpanel-addons-production-feed: 63.247.64.58
* cpanel-plugins: 63.247.64.58
* base: forksystems.mm.fcix.net
* epel: d2lzkl7pfhq30w.cloudfront.net
* extras: mirror.centos.iad1.serverforge.org
* updates: mirror.cogentco.com
jookies_jasmin-sms-gateway/x86_64/signature | 833 B 00:00:00
jookies_jasmin-sms-gateway/x86_64/signature | 951 B 00:00:00 !!!
jookies_jasmin-sms-gateway-source/signature | 833 B 00:00:00
jookies_jasmin-sms-gateway-source/signature | 951 B 00:00:00 !!!
jookies_python-jasmin/x86_64/signature | 833 B 00:00:00
jookies_python-jasmin/x86_64/signature | 1.0 kB 00:00:00 !!!
jookies_python-jasmin-source/signature | 819 B 00:00:00
jookies_python-jasmin-source/signature | 1.0 kB 00:00:00 !!!
No package jasmin-sms-gateway available.
I am not sure how resolve this No package jasmin-sms-gateway available.
Kindly help i am new in linux

Related

How is ssh2 installed for PHP 7.4 on Rocky Linux?

I recently upgraded to Rocky. I am getting an error on a PHP SSH command that has worked for years. Everything I try fails for various reasons. I need to ssh from PHP. At this point I am not particular about the method used. This is the code used for ssh connections:
$ssh = ssh2_connect($ssh_domain);
if( ssh2_auth_password($ssh_user, $ssh_password) )
{
// send the command
}
but I get this error on the connect line:
Call to undefined function ssh2_connect()
I installed with
yum install libssh2-devel
Last metadata expiration check: 0:02:00 ago on Wed 03 Aug 2022 12:50:28 PM EDT.
Dependencies resolved.
====================================================================================================================================================
Package Architecture Version Repository Size
====================================================================================================================================================
Installing:
libssh2-devel x86_64 1.9.0-5.el8 epel 68 k
Transaction Summary
====================================================================================================================================================
Install 1 Package
Total download size: 68 k
Installed size: 288 k
Is this ok [y/N]: y
Downloading Packages:
libssh2-devel-1.9.0-5.el8.x86_64.rpm 309 kB/s | 68 kB 00:00
----------------------------------------------------------------------------------------------------------------------------------------------------
Total 141 kB/s | 68 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : libssh2-devel-1.9.0-5.el8.x86_64 1/1
Running scriptlet: libssh2-devel-1.9.0-5.el8.x86_64 1/1
Verifying : libssh2-devel-1.9.0-5.el8.x86_64 1/1
Installed:
libssh2-devel-1.9.0-5.el8.x86_64
Complete!
and then I restarted apache.
What am I doing wrong? Did I install the wrong package? Maybe I need to install something else?
Thanks for the help.

Pytorch Cuda for ubuntu 20.04

I'm trying to get pytorch with cuda 10 compatibility via :
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
from(https://discuss.pytorch.org/t/pytorch-with-cuda-11-compatibility/89254)
but there is timeout error:
Proceed ([y]/n)? y
Downloading and Extracting Packages
pytorch-mutex-1.0 | 3 KB | | 0%
torchvision-0.12.0 | 8.8 MB | | 0%
ffmpeg-4.3 | 9.9 MB | | 0%
pytorch-1.11.0 | 622.9 MB | | 0%
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/pytorch/noarch/pytorch-mutex-1.0-cuda.tar.bz2>
Elapsed: -
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/pytorch/noarch/pytorch-mutex-1.0-cuda.tar.bz2>
Elapsed: -
So I was running WSL2 and didn't shut down for many days. A reboot fixed the issue.

Understand Redhat Yum mirrors issues

I'm using RHVH to manage my infrastructure VMs.
I've two bare metal servers in two different network subnets with same release version of RHVH.
I use an automated script to deploy VMs on both, and provision a docker repository file there on VMs.
The issue I'm facing is when I'm trying to query container-selinux package. It works on VMs from one of my bare metal servers, and not from the other.
first sever's VM:
[root#cpu-node0 ~]# /bin/repoquery --show-duplicates --plugins --disablerepo '' --enablerepo '' --qf '%{name}|%{epoch}|%{version}|%{release}|%{arch}|%{repoid}' container-selinux
container-selinux|2|2.107|1.el7_6|noarch|extras
container-selinux|2|2.107|3.el7|noarch|extras
[root#cpu-node0 ~]#
Second server's VM :
[root#cpu-node0 ~]# /bin/repoquery --show-duplicates --plugins --disablerepo '' --enablerepo '' --qf '%{name}|%{epoch}|%{version}|%{release}|%{arch}|%{repoid}' container-selinux
Could not match packages: failure: repodata/repomd.xml from docker-engine: [Errno 256] No more mirrors to try.
https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
[root#cpu-node0 ~]#
The yum repo configuration on both VMs running on each bare metal server:
[root#cpu-node0 ~]# ll /etc/yum.repos.d/
total 44
-rw-r--r--. 1 root root 1664 5 sept. 13:05 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 5 sept. 13:05 CentOS-CR.repo
-rw-r--r--. 1 root root 649 5 sept. 13:05 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 314 5 sept. 13:05 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 630 5 sept. 13:05 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 5 sept. 13:05 CentOS-Sources.repo
-rw-r--r--. 1 root root 6639 5 sept. 13:05 CentOS-Vault.repo
-rw-r--r--. 1 root root 369 2 mars 23:31 docker.repo
-rw-r--r--. 1 root root 1050 17 sept. 23:25 epel.repo
-rw-r--r--. 1 root root 1149 17 sept. 23:25 epel-testing.repo
[root#cpu-node0 ~]#
docker.repo file content on both VMs :
[root#cpu-node0 ~]# cat /etc/yum.repos.d/docker.repo
[docker-ce]
name=Docker-CE Repository
baseurl=https://download.docker.com/linux/centos/7/$basearch/stable
enabled=1
gpgcheck=1
keepcache=1
gpgkey=https://download.docker.com/linux/centos/gpg
[docker-engine]
name=Docker-Engine Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7
enabled=1
gpgcheck=1
keepcache=1
gpgkey=https://yum.dockerproject.org/gpg
[root#cpu-node0 ~]#
Repo list on the first VM :
[root#cpu-node0 ~]# yum repolist
id du dépôt nom du dépôt statut
base/7/x86_64 CentOS-7 - Base 10 097
docker-ce/x86_64 Docker-CE Repository 68
!docker-engine Docker-Engine Repository 110
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13 199
extras/7/x86_64 CentOS-7 - Extras 323
updates/7/x86_64 CentOS-7 - Updates 1 478
repolist: 25 275
[root#cpu-node0 ~]#
Yum repo list on the second VM:
[root#cpu-node0 ~]# yum repolist
https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Essai d'un autre miroir.
To address this issue please refer to the below wiki article
https://wiki.centos.org/yum-errors
If above article doesn't help to resolve this issue please use https://bugs.centos.org/.
docker-ce/x86_64/primary_db | 40 kB 00:00:05
https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Essai d'un autre miroir.
id du dépôt nom du dépôt statut
base/7/x86_64 CentOS-7 - Base 10 097
docker-ce/x86_64 Docker-CE Repository 68
docker-engine Docker-Engine Repository 0
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13 199
extras/7/x86_64 CentOS-7 - Extras 323
updates/7/x86_64 CentOS-7 - Updates 1 478
repolist: 25 165
[root#cpu-node0 ~]#
I also get the message below when trying to curl the repository URL :
[root#cpu-node0 ~]#curl https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml
<!doctype html>
<html lang="en">
<head></head>
<body>
<h1>Notice: Shutting down dockerproject.org APT and YUM repos 2020-03-31</h1>
<p>Docker will be shutting down the deprecated APT and YUM repositories hosted at "dockerproject.org" and "dockerproject.com" on the 31st of March 2020.</p>
<p>We noticed that this project is referencing one of these repositories, and recommend updating to use the "download.docker.com" repository to prevent disruption.</p>
<p>More info: https://www.docker.com/blog/changes-dockerproject-org-apt-yum-repositories/ </p>
</body>
</html>
Looks like docker does not want anyone to use this repo anymore. Probably they started issuing the error from today I guess.
Of course the two VMs do not have subscription-manager package installed, neither subscription attached, they don't need actually in our context, but why is there a mirror issue on one VM and not on the other, whose OS and system configuration is the same on both, except that they are locate in two different networks?
Looks like yum docker-engine querying came back to a normal state
Even docker project url curling is working without the warning message seen in my first post
Looks like the deployment process hit a bad state in the public repo and hence caused these errors.

Falcon sensor fails to start the agent

I am trying to install falcon-sensor(version:4.16.0) on a Debian machine. When I try to start the agent it doesn't start up.
I checked the logs of falcon-sensor and here is what it says :
2019 unable to initialize dynamic libraries. (2309) [144]
I checked the log of falconctl and here is what it says :
Invalid file /opt/CrowdStrike/falconstore length: 0 (2277) [568]
I tried finding answers through googling but I could not find any.
Any help on this would be really helpful
Thanks in advance.
falcon-sensor has libssl.so.1.0.0 as dependency, but that version is missing on Debian Stretch (there is version 1.0.2).
I just created a symlink to the existing version:
ln -s libssl.so.1.0.2 /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0
and now it works.
Make sure you performed the basic steps correctly:
1 ) Download falcon-sensor.rpm to your machine.
2 ) sudo yum install -y falcon-sensor.rpm .
3 ) sudo /opt/CrowdStrike/falconctl -s --cid=<Your-CID> .
4 ) service falcon-sensor start.
Check status:
[ec2-user#ip-172-21-80-18 ~]$ service falcon-sensor status
Redirecting to /bin/systemctl status falcon-sensor.service
● falcon-sensor.service - CrowdStrike Falcon Sensor
Loaded: loaded (/usr/lib/systemd/system/falcon-sensor.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2020-09-05 13:48:34 UTC; 1min 6s ago
Process: 2746 ExecStart=/opt/CrowdStrike/falcond (code=exited, status=0/SUCCESS)
Process: 2729 ExecStartPre=/opt/CrowdStrike/falconctl -g --cid (code=exited, status=0/SUCCESS)
Main PID: 2747 (falcond)
Tasks: 19
Memory: 4.5M
CGroup: /system.slice/falcon-sensor.service
├─2747 /opt/CrowdStrike/falcond
└─2749 falcon-sensor
systemd[1]: Starting CrowdStrike Falcon Sensor...
falconctl[2729]: cid="<Your-CID>".
falcond[2747]: starting
Started CrowdStrike Falcon Sensor.
falcon-sensor[2749]: No traceLevel set via falconctl defaulting to none
falcon-sensor[2749]: LogLevelUpdate: none = trace level 0.
View process:
ps -e | grep falcon-sensor
2749 ? 00:00:00 falcon-sensor
Notice that all commands should be executed with sudo Or else you see the error below:
$ service falcon-sensor restart #< --- No root permission
Redirecting to /bin/systemctl restart falcon-sensor.service
Failed to restart falcon-sensor.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status falcon-sensor.service' for details.
I follow install steps 1~3 below without issue, but have not get a CID, please let met know how to get it
1 ) Download falcon-sensor.rpm to your machine.
2 ) sudo yum install -y falcon-sensor.rpm .
3 ) sudo /opt/CrowdStrike/falconctl -s --cid=<Your-CID>
4 ) service falcon-sensor start.

user data is not running at launch aws ec2

I am trying to launch an ec2 linux instance (linux 2 ami) and while doing that in the user data, I am trying to
get node js installed, and at the same time install git.
Then I am trying to get clone my github repo and then start the node js server, all this done in the userdata.
I am trying to check everywhere, in the cloudlog init file to find some error why my user data is not working.
Here are the codes.
#!/bin/bash
sudo yum update -y
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 4.4.5
sudo yum upgrade
sudo yum install git -y
git clone https://github.com/myname/one_user.git
cd one_user
dnsaddress=$(curl -s http://169.254.169.254/latest/meta-data/public-hostname)
export dns_name=${dnsaddress}
npm install -y
node server.js
The code below is from the cloud init log file.
Cloud-init v. 18.2-72.amzn2.0.6 running 'init-local' at Sun, 10 Feb 2019 15:49:35 +0000. Up 4.93 seconds.
Cloud-init v. 18.2-72.amzn2.0.6 running 'init' at Sun, 10 Feb 2019 15:49:38 +0000. Up 7.42 seconds.
ci-info: ++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++
ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
ci-info: | eth0 | True | 10.0.1.72 | 255.255.255.0 | global | 0e:1f:76:6a:3c:6c |
ci-info: | eth0 | True | fe80::c1f:76ff:fe6a:3c6c/64 | . | link | 0e:1f:76:6a:3c:6c |
ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | host | . |
ci-info: | lo | True | ::1/128 | . | host | . |
ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
ci-info: ++++++++++++++++++++++++++++++Route IPv4 info+++++++++++++++++++++++++++++++
ci-info: +-------+-----------------+----------+-----------------+-----------+-------+
ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags |
ci-info: +-------+-----------------+----------+-----------------+-----------+-------+
ci-info: | 0 | 0.0.0.0 | 10.0.1.1 | 0.0.0.0 | eth0 | UG |
ci-info: | 1 | 10.0.1.0 | 0.0.0.0 | 255.255.255.0 | eth0 | U |
ci-info: | 2 | 169.254.169.254 | 0.0.0.0 | 255.255.255.255 | eth0 | UH |
ci-info: +-------+-----------------+----------+-----------------+-----------+-------+
ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
ci-info: +-------+-------------+---------+-----------+-------+
ci-info: | Route | Destination | Gateway | Interface | Flags |
ci-info: +-------+-------------+---------+-----------+-------+
ci-info: | 9 | fe80::/64 | :: | eth0 | U |
ci-info: | 11 | local | :: | eth0 | U |
ci-info: | 12 | ff00::/8 | :: | eth0 | U |
ci-info: +-------+-------------+---------+-----------+-------+
Cloud-init v. 18.2-72.amzn2.0.6 running 'modules:config' at Sun, 10 Feb 2019 15:49:39 +0000. Up 8.99 seconds.
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Existing lock /var/run/yum.pid: another copy is running as pid 3265.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 31 M RSS (321 MB VSZ)
Started: Sun Feb 10 15:49:38 2019 - 00:02 ago
State : Sleeping, pid: 3265
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 70 M RSS (361 MB VSZ)
Started: Sun Feb 10 15:49:38 2019 - 00:04 ago
State : Running, pid: 3265
--> 1:openssl-libs-1.0.2k-16.amzn2.0.1.x86_64 from installed removed (updateinfo)
--> 1:openssl-1.0.2k-16.amzn2.0.1.x86_64 from installed removed (updateinfo)
--> 1:openssl-libs-1.0.2k-16.amzn2.0.2.x86_64 from amzn2-core removed (updateinfo)
--> 1:openssl-1.0.2k-16.amzn2.0.2.x86_64 from amzn2-core removed (updateinfo)
1 package(s) needed (+0 related) for security, out of 3 available
Resolving Dependencies
--> Running transaction check
---> Package kernel-tools.x86_64 0:4.14.88-88.76.amzn2 will be updated
---> Package kernel-tools.x86_64 0:4.14.94-89.73.amzn2 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
kernel-tools x86_64 4.14.94-89.73.amzn2 amzn2-core 111 k
Transaction Summary
================================================================================
Upgrade 1 Package
Total download size: 111 k
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : kernel-tools-4.14.94-89.73.amzn2.x86_64 1/2
Cleanup : kernel-tools-4.14.88-88.76.amzn2.x86_64 2/2
Verifying : kernel-tools-4.14.94-89.73.amzn2.x86_64 1/2
Verifying : kernel-tools-4.14.88-88.76.amzn2.x86_64 2/2
Updated:
kernel-tools.x86_64 0:4.14.94-89.73.amzn2
Complete!
Cloud-init v. 18.2-72.amzn2.0.6 running 'modules:final' at Sun, 10 Feb 2019 15:49:47 +0000. Up 16.22 seconds.
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Existing lock /var/run/yum.pid: another copy is running as pid 3324.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 54 M RSS (270 MB VSZ)
Started: Sun Feb 10 15:49:45 2019 - 00:03 ago
State : Running, pid: 3324
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:4.14.94-89.73.amzn2 will be installed
---> Package openssl.x86_64 1:1.0.2k-16.amzn2.0.1 will be updated
---> Package openssl.x86_64 1:1.0.2k-16.amzn2.0.2 will be an update
---> Package openssl-libs.x86_64 1:1.0.2k-16.amzn2.0.1 will be updated
---> Package openssl-libs.x86_64 1:1.0.2k-16.amzn2.0.2 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
kernel x86_64 4.14.94-89.73.amzn2 amzn2-core 19 M
Updating:
openssl x86_64 1:1.0.2k-16.amzn2.0.2 amzn2-core 496 k
openssl-libs x86_64 1:1.0.2k-16.amzn2.0.2 amzn2-core 1.2 M
Transaction Summary
================================================================================
Install 1 Package
Upgrade 2 Packages
Total download size: 21 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
--------------------------------------------------------------------------------
Total 33 MB/s | 21 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : 1:openssl-libs-1.0.2k-16.amzn2.0.2.x86_64 1/5
Updating : 1:openssl-1.0.2k-16.amzn2.0.2.x86_64 2/5
Installing : kernel-4.14.94-89.73.amzn2.x86_64 3/5
Cleanup : 1:openssl-1.0.2k-16.amzn2.0.1.x86_64 4/5
Cleanup : 1:openssl-libs-1.0.2k-16.amzn2.0.1.x86_64 5/5
Verifying : 1:openssl-libs-1.0.2k-16.amzn2.0.2.x86_64 1/5
Verifying : kernel-4.14.94-89.73.amzn2.x86_64 2/5
Verifying : 1:openssl-1.0.2k-16.amzn2.0.2.x86_64 3/5
Verifying : 1:openssl-libs-1.0.2k-16.amzn2.0.1.x86_64 4/5
Verifying : 1:openssl-1.0.2k-16.amzn2.0.1.x86_64 5/5
Installed:
kernel.x86_64 0:4.14.94-89.73.amzn2
Updated:
openssl.x86_64 1:1.0.2k-16.amzn2.0.2
openssl-libs.x86_64 1:1.0.2k-16.amzn2.0.2
Complete!
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10007 100 10007 0 0 10007 0 0:00:01 --:--:-- 0:00:01 99079
=> Downloading nvm as script to '/.nvm'
=> Profile not found. Tried (as defined in $PROFILE), ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.
=> Create one of them and run this script again
=> Create it (touch ) and run this script again
OR
=> Append the following lines to the correct file yourself:
export NVM_DIR="/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
/var/lib/cloud/instance/scripts/part-001: line 4: /root/.nvm/nvm.sh: No such file or directory
/var/lib/cloud/instance/scripts/part-001: line 5: nvm: command not found
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Existing lock /var/run/yum.pid: another copy is running as pid 11772.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 52 M RSS (268 MB VSZ)
Started: Sun Feb 10 15:50:08 2019 - 00:02 ago
State : Running, pid: 11772
No packages marked for update
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:2.17.2-2.amzn2 will be installed
--> Processing Dependency: perl-Git = 2.17.2-2.amzn2 for package: git-2.17.2-2.amzn2.x86_64
--> Processing Dependency: git-core-doc = 2.17.2-2.amzn2 for package: git-2.17.2-2.amzn2.x86_64
--> Processing Dependency: git-core = 2.17.2-2.amzn2 for package: git-2.17.2-2.amzn2.x86_64
--> Processing Dependency: emacs-filesystem >= 25.3 for package: git-2.17.2-2.amzn2.x86_64
--> Processing Dependency: perl(Term::ReadKey) for package: git-2.17.2-2.amzn2.x86_64
--> Processing Dependency: perl(Git::I18N) for package: git-2.17.2-2.amzn2.x86_64
--> Processing Dependency: perl(Git) for package: git-2.17.2-2.amzn2.x86_64
--> Processing Dependency: libsecret-1.so.0()(64bit) for package: git-2.17.2-2.amzn2.x86_64
--> Running transaction check
---> Package emacs-filesystem.noarch 1:25.3-3.amzn2.0.1 will be installed
---> Package git-core.x86_64 0:2.17.2-2.amzn2 will be installed
---> Package git-core-doc.noarch 0:2.17.2-2.amzn2 will be installed
---> Package libsecret.x86_64 0:0.18.5-2.amzn2.0.2 will be installed
---> Package perl-Git.noarch 0:2.17.2-2.amzn2 will be installed
--> Processing Dependency: perl(Error) for package: perl-Git-2.17.2-2.amzn2.noarch
---> Package perl-TermReadKey.x86_64 0:2.30-20.amzn2.0.2 will be installed
--> Running transaction check
---> Package perl-Error.noarch 1:0.17020-2.amzn2 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
git x86_64 2.17.2-2.amzn2 amzn2-core 217 k
Installing for dependencies:
emacs-filesystem noarch 1:25.3-3.amzn2.0.1 amzn2-core 64 k
git-core x86_64 2.17.2-2.amzn2 amzn2-core 4.0 M
git-core-doc noarch 2.17.2-2.amzn2 amzn2-core 2.3 M
libsecret x86_64 0.18.5-2.amzn2.0.2 amzn2-core 153 k
perl-Error noarch 1:0.17020-2.amzn2 amzn2-core 32 k
perl-Git noarch 2.17.2-2.amzn2 amzn2-core 70 k
perl-TermReadKey x86_64 2.30-20.amzn2.0.2 amzn2-core 31 k
Transaction Summary
================================================================================
Install 1 Package (+7 Dependent packages)
Total download size: 6.8 M
Installed size: 36 M
Downloading packages:
--------------------------------------------------------------------------------
Total 18 MB/s | 6.8 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : git-core-2.17.2-2.amzn2.x86_64 1/8
Installing : git-core-doc-2.17.2-2.amzn2.noarch 2/8
Installing : libsecret-0.18.5-2.amzn2.0.2.x86_64 3/8
Installing : 1:perl-Error-0.17020-2.amzn2.noarch 4/8
Installing : perl-TermReadKey-2.30-20.amzn2.0.2.x86_64 5/8
Installing : 1:emacs-filesystem-25.3-3.amzn2.0.1.noarch 6/8
Installing : perl-Git-2.17.2-2.amzn2.noarch 7/8
Installing : git-2.17.2-2.amzn2.x86_64 8/8
Verifying : 1:emacs-filesystem-25.3-3.amzn2.0.1.noarch 1/8
Verifying : perl-TermReadKey-2.30-20.amzn2.0.2.x86_64 2/8
Verifying : 1:perl-Error-0.17020-2.amzn2.noarch 3/8
Verifying : libsecret-0.18.5-2.amzn2.0.2.x86_64 4/8
Verifying : git-core-2.17.2-2.amzn2.x86_64 5/8
Verifying : git-2.17.2-2.amzn2.x86_64 6/8
Verifying : perl-Git-2.17.2-2.amzn2.noarch 7/8
Verifying : git-core-doc-2.17.2-2.amzn2.noarch 8/8
Installed:
git.x86_64 0:2.17.2-2.amzn2
Dependency Installed:
emacs-filesystem.noarch 1:25.3-3.amzn2.0.1
git-core.x86_64 0:2.17.2-2.amzn2
git-core-doc.noarch 0:2.17.2-2.amzn2
libsecret.x86_64 0:0.18.5-2.amzn2.0.2
perl-Error.noarch 1:0.17020-2.amzn2
perl-Git.noarch 0:2.17.2-2.amzn2
perl-TermReadKey.x86_64 0:2.30-20.amzn2.0.2
Complete!
Cloning into 'zero2architect'...
/var/lib/cloud/instance/scripts/part-001: line 16: npm: command not found
/var/lib/cloud/instance/scripts/part-001: line 17: node: command not found
Feb 10 15:50:16 cloud-init[3314]: util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/part-001 [127]
Feb 10 15:50:16 cloud-init[3314]: cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
Feb 10 15:50:16 cloud-init[3314]: util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_scripts_user.pyc'>) failed
Cloud-init v. 18.2-72.amzn2.0.6 finished at Sun, 10 Feb 2019 15:50:16 +0000. Datasource DataSourceEc2. Up 45.55 seconds
Have you checked your SGs and NACL configurations? You need to allow port 80 (HTTP) and port 443 (HTTPS) in outbound SG rules - destination 0.0.0.0/0. You also need to allow the same on outbound NACL's rules and ephemeral ports on inbound rules. Makes sure that your instance is sitting in a public subnet (with route to IGW) and it has public/Elastic IPv4 attached to it.
If any one of those conditions is not met, your user data scrip will fail, since it need connection to the Internet (in your case).
If your instance is sitting in a private subnet, make sure that you are running NAT Gateway or NAT instance and that your route tables are properly configured, as well as SGs and NACLs. Also make sure that source/destination check is disabled on NAT instance if you are using it.
UPDATE
You log clearly says that you don't have npm and node installed so you need to pass installation instruction to the script as well.
npm install -y
is not the right way to install npm. You can follow these steps to install both node and npm.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 4.4.5
This will install node version 4.4.5. If you want some other version of node to be installed, then change the number for whatever supported version.

Resources