I am unable to update an already created google-cloud-composer environment. This happens if I am working with an already created environment but not when I am creating a new one. Seems like I am missing some default settings here. Has anyone else faced a similar issue?
gcloud composer environments list --locations us-east1
┌───────────────┬──────────┬─────────┬──────────────────────────┐
│ NAME │ LOCATION │ STATE │ CREATE_TIME │
├───────────────┼──────────┼─────────┼──────────────────────────┤
│ dummy-airflow │ us-east1 │ RUNNING │ 2018-11-21T09:50:19.793Z │
└───────────────┴──────────┴─────────┴──────────────────────────┘
cloud composer environments update dummy-airflow
--location us-east1 --update-env-variables gcp_project=data-rubrics
Waiting for [projects/data-rubrics/locations/us-east1/environments/dummy-airflow] to be updated with [projects/data-rubrics/locations/us-
east1/operations/b6746709-1529-4d67-a08c-453de1a0063a]...failed.
ERROR: (gcloud.composer.environments.update) Error updating [projects/data-rubrics/locations/us-east1/environments/dummy-airflow]: Operation [projects/data-rubrics/locations/us-east1/operations/b6746709-1529-4d67-a08c-453de1a0063a] failed: Composer Backend timed out. Currently running tasks are [stage: CP_COMPOSER_AGENT_RUNNING
description: "Composer Agent Running. Latest Agent Stage: stage: PATCH_CREATED\n ."
response_timestamp {
seconds: 1543236373
nanos: 570000000
}
].
The issue was resolved by performing the two steps below:
Disable and then Enable the Cloud Composer API; and
Set the AIRFLOW_GPL_UNIDECODE to yes.
Related
Google Cloud Skills Boost
(Quest) Secure Workloads in Google Kubernetes Engine
(Lab) Securing Applications on Kubernetes Engine - Three Examples
On the section "Provisioning the Kubernetes Engine cluster", run the command
make create
I got into an error:
enter code here
│ Error: Error resolving image name 'debian-cloud/debian-9': Could not find image or family debian-cloud/debian-9
│
│ with module.bastion.google_compute_instance.instance,
│ on modules/instance/main.tf line 54, in resource "google_compute_instance" "instance":
│ 54: resource "google_compute_instance" "instance" {
Step 1: Run the command to see the available images
gcloud compute images list | grep debian
Step 2: At the project root, run the below command
vi ./terraform/modules/instance/main.tf
Step 3: At VIM normal mode, search for the debian-9 by type /debian-9, hit enter
// Specify the Operating System Family and version.
boot_disk {
initialize_params {
image = "debian-cloud/debian-9"
}
}
Step 4: As my case, the debian-10 is available. So I change the above block code into
// Specify the Operating System Family and version.
boot_disk {
initialize_params {
image = "debian-cloud/debian-10"
}
}
Step 5: Change directory to the project root, then re-run the command make create.
We are seeing special characters in Jenkins console logs:
What we expect:
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 9.7.0 │
│ Browser: Chrome 104 (headless) │
│ Node Version: v14.20.0 (/usr/bin/node)
└────────────────────────────────────────────────────────────────────────────────────────────────┘
What we see in Jenkins:
[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m[90m─[39m
Running: [90mwfo/speech-iq/configuration/synonyms/synonyms.spec.js[39m
Is there any configs to be twaeaked in Jenkins to get rid of the special characters?
We tried some suggestings as per Jenkins console output has these strange characters from grunt command [31m[[39m... , buut no luck
Please advise!
Setting the NO_COLOR environment variable to 1 should fix the problem in the case of Cypress. https://docs.cypress.io/guides/continuous-integration/introduction#Colors
https://stackoverflow.com/a/15146516/4213184
The only option I found is to append the command with --no--color, Answer is in above link.
I'm trying to rename a folder in the destination directory. The directory structure inside my templates folder looks like this:
root/
├── generators
│ └── app
│ ├── templates
│ │ └── app
│ │ └── widget
│ │ ├── widget.controller.ts
│ │ ├── widget.service.ts
│ │ └── widget.module.ts
│ └── index.js
└── .yo-rc.json
I'm trying to rename the widget directory (in destinationPath) to a name that the user enters during the prompting stage. Here's how I'm attempting this:
module.exports = generators.Base.extend({
copyAppTemplate: function () {
this.fs.copyTpl(this.templatePath('**/*'), this.destinationPath('.'), this.props);
this.fs.move(
this.destinationPath('app/widget'),
this.destinationPath('app/' + this.props.widgetName)
);
}
})
The call to copyTpl is correctly scaffolding and templating the app from the templatePath to the destinationPath. However, when the fs.move operation is called, I get the following error message:
PS C:\Users\username\code\generator-dashboard-widget-test> yo dashboard-widget
? Your widget's name: (generator-dashboard-widget-test)
? Your widget's name: generator-dashboard-widget-test
events.js:154
throw er; // Unhandled 'error' event
^
AssertionError: Trying to copy from a source that does not exist: C:\Users\username\code\generator-dashboard-widget-test\app\widget
at EditionInterface.exports._copySingle (C:\Users\username\code\generator-dashboard-widget\node_modules\mem-fs-editor\lib\actions\copy.js:45:3)
at EditionInterface.exports.copy (C:\Users\username\code\generator-dashboard-widget\node_modules\mem-fs-editor\lib\actions\copy.js:23:17)
at EditionInterface.module.exports [as move] (C:\Users\username\code\generator-dashboard-widget\node_modules\mem-fs-editor\lib\actions\move.js:4:8)
at module.exports.generators.Base.extend.copyAppTemplate (C:\Users\username\code\generator-dashboard-widget\generators\app\index.js:54:17)
at Object.<anonymous> (C:\Users\username\code\generator-dashboard-widget\node_modules\yeoman-generator\lib\base.js:431:23)
at C:\Users\username\code\generator-dashboard-widget\node_modules\run-async\index.js:26:25
at C:\Users\username\code\generator-dashboard-widget\node_modules\run-async\index.js:25:19
at C:\Users\username\code\generator-dashboard-widget\node_modules\yeoman-generator\lib\base.js:432:9
at processImmediate [as _immediateCallback] (timers.js:383:17)
From what I understand from the Yeoman file system documenation, all actions on the virtual file system are synchronous, so the app/widget directory should exist before the mem-fs-editor instance attempts to move it.
Is there a different way I should be renaming the directory?
I'm using Yeoman 1.8.4 on Windows 8.1 with node 5.6.0.
I didn't figure out this specific issue, but I was able to accomplish what I was after by using the gulp-rename plugin as a transform stream:
copyAppTemplate: function () {
var _this = this;
// move a file like "app/widget/widget.controller.ts" to
// "app/my-widget-name/my-widget-name.controller.ts"
this.registerTransformStream(rename(function (path) {
path.dirname = path.dirname.replace('widget', _this.props.widgetName);
path.basename = path.basename.replace('widget', _this.props.widgetName);
return path;
}));
this.fs.copyTpl(this.templatePath('**/*'), this.destinationPath('.'), this.props);
},
I've also opened up a GitHub issue to follow up with this behavior here: https://github.com/yeoman/yo/issues/455
I'm trying to use PM2 for deployment purposes, and so at the end of my deployment process I do
pm2 startOrReload staging.json --env preprod
and I get this :
16:26:12 ‘staging/current’ -> ‘/srv/pb/dev/v0.0.6-85-g755a611’
16:26:12 [PM2] Applying action reloadProcessId on app [pb1](ids: 0)
16:26:13 [PM2] [pb1](0) ✓
16:26:13 ┌──────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────────────┬──────────┐
16:26:13 │ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
16:26:13 ├──────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────────────┼──────────┤
16:26:13 │ pb1 │ 0 │ fork │ 30180 │ online │ 111 │ 0s │ 19.805 MB │ enabled │
16:26:13 └──────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────────────┴──────────┘
as you can notice the status is online regardless of the deploy being sucessfull or not;
And is marking the Jenkins build as success when is not. immediately afterward if you do a
pm2 list
you get the correct status offline
So is there a way to get the correct status via API or something so that I can mark the build as failure
1) You can get the current status in the JSON format from CLI:
pm2 jlist
pm2 prettylist
2) Or you can connect to pm2 instance programmatically:
var pm2 = require('pm2');
pm2.connect( function(err) {
if (err) process.exit();
pm2.list( function(err,list) {
list.forEach( function(e) {
console.log( e.name, e.pm2_env.status );
});
pm2.disconnect();
});
});
3) Or you can use keymetrics monitoring.
I try to deploy my app to EC2 son Amazon via nginx and passenger. I did what the passenger installation comments say. But when I run my nginx and try to enter my site it does not respond even withan error message. It loops forever. I looked the pstree output for my non-workign nginx:
init─┬─PassengerWatchd─┬─PassengerHelper─┬─ruby─┬─ruby─┬─ruby─┬─ruby───{ruby}
│ │ │ │ │ └─{ruby}
│ │ │ │ └─{ruby}
│ │ │ └─2*[{ruby}]
│ │ └─27*[{PassengerHelper}]
│ ├─PassengerLoggin───{PassengerLoggin}
│ └─3*[{PassengerWatchd}]
├─acpid
├─atd
├─avahi-daemon───avahi-daemon
├─cron
├─dbus-daemon
├─dhclient3
├─6*[getty]
├─mysqld───17*[{mysqld}]
├─nginx───nginx
├─rsyslogd───3*[{rsyslogd}]
├─sshd───sshd───sshd───bash───pstree
├─udevd───2*[udevd]
├─upstart-socket-
├─upstart-udev-br
└─whoopsie───{whoopsie}
also I have nginx in my laptop and it is working fine and it gives this pstree output (partially)just after it is got an request:
├─PassengerWatchd─┬─PassengerHelper─┬─ruby
│ │ └─27*[{PassengerHelper}]
│ ├─PassengerLoggin───{PassengerLoggin}
│ └─3*[{PassengerWatchd}]
I see that there are some zombie processes on my EC2 instance after an request:
What you think about the problem and any suggestion to solve it?
After a wait it gives Gateway Timeout 504