Cannot configure to deploy serverless stack to localstack - aws-sdk

I am using serverless for deploying AWS serverless stack. (i.e: lambda, sqs, sns). I want to run before in local before trying to deploy to AWS. I have searched and see localstack suitable for my use case. Here is my step to deploy the system:
Clone project and run whole stack using docker. (command: docker-compose up)
Install library serverless-localstack and update serverless.yml in my project
Here is my config:
plugins:
- serverless-localstack
custom:
localstack:
host: http://localhost
debug: false
endpoints:
stages:
- local
- dev
lambda:
mountCode: False # Enable this flag to improve performance
After that, I deploy this stack using command: serverless deploy --stage local. But I always meet exception.
Serverless: Updating Stack...
Serverless: Recoverable error occurred (502), sleeping for 5 seconds. Try 1 of 4
Serverless: Recoverable error occurred (502), sleeping for 5 seconds. Try 2 of 4
Serverless: Recoverable error occurred (502), sleeping for 5 seconds. Try 3 of 4
Serverless: Recoverable error occurred (502), sleeping for 5 seconds. Try 4 of 4
Serverless Error ---------------------------------------
502
Here is my full deployment log:
Serverless: Generated requirements from /Users/hqt/Documents/avex/requirements.txt in /Users/hqt/Documents/avex/.serverless/requirements.txt...
Serverless: Installing requirements from /Users/hqt/Documents/avex/.serverless/requirements/requirements.txt ...
Serverless: Docker Image: lambci/lambda:build-python2.7
Serverless: Running docker run --rm -v /Users/hqt/Documents/avex/.serverless/requirements\:/var/task\:z -u 0 lambci/lambda\:build-python2.7 python2.7 -m pip install -t /var/task/ -r /var/task/requirements.txt...
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Injecting required Python packages to package...
Serverless: WARNING: Function crawl_twitter_accounts_api has timeout of 900 seconds, however, it's attached to API Gateway so it's automatically limited to 30 seconds.
Serverless: Using serverless-localstack
Serverless: Creating Stack...
Serverless: Checking Stack create progress...
..
Serverless: Stack create finished...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service avex.zip file to S3 (25.08 MB)...
Serverless: Validating template...
Serverless: Skipping template validation: Unsupported in Localstack
Serverless: Updating Stack...
Serverless: Recoverable error occurred (502), sleeping for 5 seconds. Try 1 of 4
Serverless: Recoverable error occurred (502), sleeping for 5 seconds. Try 2 of 4
Serverless: Recoverable error occurred (502), sleeping for 5 seconds. Try 3 of 4
Serverless: Recoverable error occurred (502), sleeping for 5 seconds. Try 4 of 4
Serverless Error ---------------------------------------
502
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information -----------------------------
OS: darwin
Node Version: 11.6.0
Serverless Version: 1.38.0
Serverless: Generated requirements from /Users/hqt/Documents/avex/requirements.txt in /Users/hqt/Documents/avex/.serverless/requirements.txt...
Serverless: Installing requirements from /Users/hqt/Documents/avex/.serverless/requirements/requirements.txt ...
Serverless: Docker Image: lambci/lambda:build-python2.7
Serverless: Running docker run --rm -v /Users/hqt/Documents/avex/.serverless/requirements\:/var/task\:z -u 0 lambci/lambda\:build-python2.7 python2.7 -m pip install -t /var/task/ -r /var/task/requirements.txt...
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Injecting required Python packages to package...
Serverless: WARNING: Function crawl_twitter_accounts_api has timeout of 900 seconds, however, it's attached to API Gateway so it's automatically limited to 30 seconds.
Serverless: Using serverless-localstack
Serverless: Creating Stack...
Serverless: Checking Stack create progress...
..
Serverless: Stack create finished...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service avex.zip file to S3 (25.08 MB)...
Serverless: Validating template...
Serverless: Skipping template validation: Unsupported in Localstack
Serverless: Updating Stack...
Serverless: Recoverable error occurred (502), sleeping for 5 seconds. Try 1 of 4
Serverless: Recoverable error occurred (502), sleeping for 5 seconds. Try 2 of 4
Serverless: Recoverable error occurred (502), sleeping for 5 seconds. Try 3 of 4
Serverless: Recoverable error occurred (502), sleeping for 5 seconds. Try 4 of 4
Serverless Error ---------------------------------------
502
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information -----------------------------
OS: darwin
Node Version: 11.6.0
Serverless Version: 1.38.0
Please tell me how to fix this.

Related

Cannot start minishift on mac Catalina

I tried a couple of time to install uninstall and reinstall openshift on 2 macs with os Catalina 10.15.7 but it never starts.
I read Minishift cannot start in macOS and installed the var as described. but I still get the error below. Did anybody manage to install it on Catalyna and managed to resolve these errors?
kind regards
Markus
-- Starting Minishift VM ........ FAIL E0423 15:57:02.814314 21785 start.go:499] Error starting the VM: Error creating the VM. Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: /usr/local/bin/VBoxManage hostonlyif ipconfig vboxnet1 --ip 192.168.99.1 --netmask 255.255.255.0 failed:
VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp
. Retrying.
Error starting the VM: Error creating the VM. Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: /usr/local/bin/VBoxManage hostonlyif ipconfig vboxnet1 --ip 192.168.99.1 --netmask 255.255.255.0 failed:
VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp
It seens a virtualbox configuration error about network access deniying. Try this:
Access or create file /etc/vbox/networks.conf (or where your vbox configuration file is located)
Change the content to: *0.0.0.0/0 ::/0

Cannot install MYSQL on Fedora - Curl error TIMEOUT on repo.mysql.com

I am trying to install MySQL 8.0 Community Edition on Fedora 34. I installed the repo rom from https://dev.mysql.com/downloads/repo/yum/
After running sudo dnf install mysql-community-server I am getting the below error output:
MySQL 8.0 Community Server 0.0 B/s | 0 B 12:42
Errors during downloading metadata for repository 'mysql80-community':
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-8.0-community/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30020 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-8.0-community/fc/34/x86_64/repodata/c55e90c7ab0dc694323139988d5868a381c441ff-primary.xml.gz [Resolving timed out after 30096 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-8.0-community/fc/34/x86_64/repodata/c55e90c7ab0dc694323139988d5868a381c441ff-primary.xml.gz [Resolving timed out after 30000 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-8.0-community/fc/34/x86_64/repodata/c55e90c7ab0dc694323139988d5868a381c441ff-primary.xml.gz [Resolving timed out after 30001 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-8.0-community/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30001 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-8.0-community/fc/34/x86_64/repodata/5920395724110a6f03637c4f6187bfa801f8a70b-filelists.xml.gz [Resolving timed out after 30096 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-8.0-community/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30004 milliseconds]
Error: Failed to download metadata for repo 'mysql80-community': Yum repo downloading error: Downloading error(s): repodata/c55e90c7ab0dc694323139988d5868a381c441ff-primary.xml.gz - Cannot download, all mirrors were already tried without success; repodata/5920395724110a6f03637c4f6187bfa801f8a70b-filelists.xml.gz - Cannot download, all mirrors were already tried without success
MySQL Connectors Community 0.0 B/s | 0 B 08:39
Errors during downloading metadata for repository 'mysql-connectors-community':
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-connectors-community/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30026 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-connectors-community/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30001 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-connectors-community/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30023 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-connectors-community/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30006 milliseconds]
Error: Failed to download metadata for repo 'mysql-connectors-community': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
MySQL Tools Community 0.0 B/s | 0 B 08:38
Errors during downloading metadata for repository 'mysql-tools-community':
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-community/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30053 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-community/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30007 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-community/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30000 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-community/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30101 milliseconds]
Error: Failed to download metadata for repo 'mysql-tools-community': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
MySQL Tools Preview 0.0 B/s | 0 B 08:17
Errors during downloading metadata for repository 'mysql-tools-preview':
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-preview/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30004 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-preview/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30000 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-preview/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30027 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-preview/fc/34/x86_64/repodata/repomd.xml [Resolving timed out after 30031 milliseconds]
Error: Failed to download metadata for repo 'mysql-tools-preview': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
MySQL 8.0 Community Server - Source 0.0 B/s | 0 B 08:28
Errors during downloading metadata for repository 'mysql80-community-source':
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-8.0-community/fc/34/SRPMS/repodata/repomd.xml [Resolving timed out after 30125 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-8.0-community/fc/34/SRPMS/repodata/repomd.xml [Resolving timed out after 30000 milliseconds]
Error: Failed to download metadata for repo 'mysql80-community-source': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
MySQL Connectors Community - Source 0.0 B/s | 0 B 08:44
Errors during downloading metadata for repository 'mysql-connectors-community-source':
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-connectors-community/fc/34/SRPMS/repodata/repomd.xml [Resolving timed out after 30000 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-connectors-community/fc/34/SRPMS/repodata/repomd.xml [Resolving timed out after 30002 milliseconds]
Error: Failed to download metadata for repo 'mysql-connectors-community-source': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
MySQL Tools Community - Source 0.0 B/s | 0 B 08:45
Errors during downloading metadata for repository 'mysql-tools-community-source':
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-community/fc/34/SRPMS/repodata/repomd.xml [Resolving timed out after 30029 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-community/fc/34/SRPMS/repodata/repomd.xml [Resolving timed out after 30084 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-community/fc/34/SRPMS/repodata/repomd.xml [Resolving timed out after 30000 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-community/fc/34/SRPMS/repodata/repomd.xml [Resolving timed out after 30001 milliseconds]
Error: Failed to download metadata for repo 'mysql-tools-community-source': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
MySQL Tools Preview - Source 0.0 B/s | 0 B 08:36
Errors during downloading metadata for repository 'mysql-tools-preview-source':
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-preview/fc/34/SRPMS/repodata/repomd.xml [Resolving timed out after 30007 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-preview/fc/34/SRPMS/repodata/repomd.xml [Resolving timed out after 32320 milliseconds]
- Curl error (28): Timeout was reached for http://repo.mysql.com/yum/mysql-tools-preview/fc/34/SRPMS/repodata/repomd.xml [Resolving timed out after 30001 milliseconds]
Error: Failed to download metadata for repo 'mysql-tools-preview-source': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Ignoring repositories: mysql80-community, mysql-connectors-community, mysql-tools-community, mysql-tools-preview, mysql80-community-source, mysql-connectors-community-source, mysql-tools-community-source, mysql-tools-preview-source
Last metadata expiration check: 0:31:20 ago on Sunday 11 July 2021 10:46:17 AM.
No match for argument: mysql-community-server
Error: Unable to find a match: mysql-community-server
[root#fedora ~]#
Installed Repo Package:
[rajiv#fedora yum.repos.d]$ dnf list installed | grep mysql
mysql80-community-release.noarch fc34-1 ##commandline
[rajiv#fedora yum.repos.d]$
RepoList:
[rajiv#fedora ~]$ sudo dnf repolist
[sudo] password for rajiv:
repo id repo name
fedora Fedora 34 - x86_64
fedora-cisco-openh264 Fedora 34 openh264 (From Cisco) - x86_64
fedora-modular Fedora Modular 34 - x86_64
google-chrome google-chrome
mysql-connectors-community MySQL Connectors Community
mysql-connectors-community-source MySQL Connectors Community - Source
mysql-tools-community MySQL Tools Community
mysql-tools-community-source MySQL Tools Community - Source
mysql-tools-preview MySQL Tools Preview
mysql-tools-preview-source MySQL Tools Preview - Source
mysql80-community MySQL 8.0 Community Server
mysql80-community-source MySQL 8.0 Community Server - Source
updates Fedora 34 - x86_64 - Updates
updates-modular Fedora Modular 34 - x86_64 - Updates
Contents of Repo:
[rajiv#fedora yum.repos.d]$ pwd
/etc/yum.repos.d
[rajiv#fedora yum.repos.d]$ ls
_copr_phracek-PyCharm.repo fedora.repo fedora-updates-testing-modular.repo mysql-community.repo rpmfusion-nonfree-steam.repo
fedora-cisco-openh264.repo fedora-updates-modular.repo fedora-updates-testing.repo mysql-community-source.repo
fedora-modular.repo fedora-updates.repo google-chrome.repo rpmfusion-nonfree-nvidia-driver.repo
[rajiv#fedora yum.repos.d]$ tac mysql-community.repo
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
gpgcheck=1
enabled=1
baseurl=http://repo.mysql.com/yum/mysql-tools-preview/fc/$releasever/$basearch/
name=MySQL Tools Preview
[mysql-tools-preview]
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
gpgcheck=1
enabled=1
baseurl=http://repo.mysql.com/yum/mysql-tools-community/fc/$releasever/$basearch/
name=MySQL Tools Community
[mysql-tools-community]
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
gpgcheck=1
enabled=1
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/fc/$releasever/$basearch/
name=MySQL Connectors Community
[mysql-connectors-community]
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
gpgcheck=1
enabled=1
baseurl=http://repo.mysql.com/yum/mysql-8.0-community/fc/$releasever/$basearch/
name=MySQL 8.0 Community Server
[mysql80-community]
[rajiv#fedora yum.repos.d]$ tac mysql-community-source.repo
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
gpgcheck=1
enabled=1
baseurl=http://repo.mysql.com/yum/mysql-tools-preview/fc/$releasever/SRPMS
name=MySQL Tools Preview - Source
[mysql-tools-preview-source]
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
gpgcheck=1
enabled=1
baseurl=http://repo.mysql.com/yum/mysql-tools-community/fc/$releasever/SRPMS
name=MySQL Tools Community - Source
[mysql-tools-community-source]
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
gpgcheck=1
enabled=1
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/fc/$releasever/SRPMS
name=MySQL Connectors Community - Source
[mysql-connectors-community-source]
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
gpgcheck=1
enabled=1
baseurl=http://repo.mysql.com/yum/mysql-8.0-community/fc/$releasever/SRPMS
name=MySQL 8.0 Community Server - Source
[mysql80-community-source]
[rajiv#fedora yum.repos.d]$
I tried reinstalling the repo package, but it still the same issue. Please advice. Thanks!
After a bit of troubleshooting, following steps has enabled to get the installation right: -
Installation Steps: [Component]-[FileNameReference]
Configuration - mysql-community-common
Client Plugins - mysql-community-client
Shared Library - mysql-community-libs
Development Libraries - mysql-community-devel
Client Utilties - mysql-community-client
MySQL Server - mysql-community-server
Workbench - mysql-community-workbench

Getting a git error when trying to install mysql with brew

I'm installing mysql on OS Mojave with brew. I got this error:
Stack:
0 __exceptionPreprocess (in CoreFoundation)
1 objc_exception_throw (in libobjc.A.dylib)
2 -[DVTExtension valueForKey:error:] (in DVTFoundation)
3 _IDEInitializeOnePlugInAndPrerequisites (in IDEFoundation)
4 _IDEInitializePlugIns (in IDEFoundation)
5 IDEInitialize (in IDEFoundation)
6 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
7 0x0000000103785202 (in xcodebuild)
8 start (in libdyld.dylib)
sh: line 1: 10700 Abort trap: 6
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk macosx -find git 2> /dev/null
git: error: unable to find utility "git", not a developer tool or in PATH
Error: Failure while executing; `git config --local --replace-all homebrew.private true` exited with 72.
Does anyone know why this is happening?

Openshift can't rsh to pod with status of Crash Loop Back-off

When I try to deploy I see...
Error: Cannot find module 'express'
I am assuming this is because it isn't running npm install so I try to connect and do it manually but I get...
oc get pods
...
personal-ui-17-blah 0/1 CrashLoopBackOff 6 8m
oc rsh personal-ui-17-blah
error: unable to upgrade connection: container not found ("personal-ui")
How do I remote into a pod that is busted to fix it?

Unable to set endpoint using the Azure CLI

I used docker-machine with Azure as the driver to spin up a VM. I then deployed a simple nginx test container on to the host. My issue is that when I try to set and endpoint I am getting the following error:
azure vm endpoint create huldra 80 32769
info: Executing command vm endpoint create
+ Getting virtual machines
+ Reading network configuration
+ Updating network configuration
error: Parameter 'ConsoleScreenshotBlobUri' should not be set.
info: Error information has been recorded to /Users/ryan/.azure/azure.err
error: vm endpoint create command failed
When I look at the error log it pretty much repeats what the console said Parameter 'ConsoleScreenshotBlobUri' should not be set.
Here are my docker and azure environment details:
❯ docker info
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 3
Server Version: 1.10.2
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 21
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: bridge null host
Kernel Version: 4.2.0-18-generic
Operating System: Ubuntu 15.10
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.636 GiB
Name: huldra
ID: PHUY:JRE3:DOJO:NNWO:JBBH:42H2:56ZO:HVSB:MZDE:QLOI:GO6F:SCC5
WARNING: No swap limit support
Labels:
provider=azure
~/Projects/dockerswarm master*
❯ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ce51127b2bb8 nginx "nginx -g 'daemon off" 11 minutes ago Up 11 minutes 0.0.0.0:32769->80/tcp, 0.0.0.0:32768->443/tcp machinenginx
❯ azure --version
0.9.17 (node: 5.8.0)
❯ azure vm list
info: Executing command vm list
+ Getting virtual machines
data: Name Status Location DNS Name IP Address
data: ------ --------- -------- ------------------- -------------
data: huldra ReadyRole West US huldra.cloudapp.net x.x.x.x
info: vm list command OK