我通过 Azure 中的订阅有一个名为“matanwebserver”的工作应用程序服务。这是我正在开发的一个网站。我使用 Visual Studio。
现在,我在同一订阅上创建了另一个 Web 应用程序,我将其用作集成站点,以便我可以在发布到生产站点之前测试我的代码。新 Web 应用程序的名称是“matanwebservertest”。将我的项目从 Visual Studio 发布到新的 Web 应用程序后,当我输入它的 URL 时,似乎什么也没发生,但它写着“您的应用程序服务应用程序已启动并正在运行”。
我究竟做错了什么?
添加了一些屏幕截图以更好地理解该问题
azure azure-deployment azure-app-service-plans azure-web-app-service
自从我将 EKS 集群升级到 后v1.21
,手动触发 Cronjobs 时出现以下错误:
\xe2\x9e\x9c ~ kubectl create job --from=cronjob/elt-dim-customer-new test-1 -n dwh-dev\nerror: from must be an existing cronjob: no kind "CronJob" is registered for version "batch/v1" in scheme "k8s.io/kubectl/pkg/scheme/scheme.go:28"\n\n\xe2\x9e\x9c ~ kubectl version\nClient Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", \nGitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", \nBuildDate:"2021-01-13T13:28:09Z", GoVersion:"go1.15.5", Compiler:"gc", \nPlatform:"darwin/amd64"}\nServer Version: version.Info{Major:"1", Minor:"21+", GitVersion:"v1.21.2-eks-0389ca3", GitCommit:"8a4e27b9d88142bbdd21b997b532eb6d493df6d2", GitTreeState:"clean", \nBuildDate:"2021-07-31T01:34:46Z", GoVersion:"go1.16.5", Compiler:"gc", \nPlatform:"linux/amd64"}\n
Run Code Online (Sandbox Code Playgroud)\n这是 Cronjob 结构(你可以看到apiVersion
):
apiVersion: batch/v1\nkind: CronJob \nmetadata:\n name: elt-dim-customer-new\nspec:\n schedule: {{ .Values.cron }}\n successfulJobsHistoryLimit: 1\n failedJobsHistoryLimit: 1\n jobTemplate:\n …
Run Code Online (Sandbox Code Playgroud) 我已经开始了一个新的 Web App React 项目。我想从简单的开始,向给定的反应代码添加一个文本框,但我不知道这样做很热。我应该创建一个新组件然后将它添加到另一个组件吗?或者我怎样才能给给定的组件添加一个简单的文本框?
import React, { Component } from 'react';
export class Home extends Component {
displayName = Home.name
render() {
return (
<div>
<h1>Hello world! This is Itay's new Web App</h1>
<p>Welcome to your new single-page application, built with:</p>
<ul>
<li><a href='https://get.asp.net/'>ASP.NET Core</a> and <a href='https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx'>C#</a> for cross-platform server-side code</li>
<li><a href='https://facebook.github.io/react/'>React</a> for client-side code</li>
<li><a href='http://getbootstrap.com/'>Bootstrap</a> for layout and styling</li>
</ul>
<p>To help you get started, we've also set up:</p>
<ul>
<li><strong>Client-side navigation</strong>. For example, click …
Run Code Online (Sandbox Code Playgroud) 我写了一个带有状态的组件,chosenGenre
在它里面,有一个函数可以根据点击的按钮改变状态。
我想采用更新的状态(即string
)并在另一个组件中使用它。
这是声明状态的组件:
import React, { Component } from 'react';
import Genre from './Genre';
import './GenreSelectPage.css';
import Blues from '../Blues.png';
import Classical from '../Classical.png';
import Country from '../Country.png';
export default class GenreSelectPage extends Component{
state = {
chosenGenre: ""
}
handleClick = (genreName) => {
this.setState({ chosenGenre: genreName });
}
render() {
return(
<div className = "GenreSelectPage">
<h3>Select your desired Kollab Room Genre</h3>
<Genre genrePicture= {Blues} genreClicked = {()=>this.handleClick("Blues")}/>
<Genre genrePicture= {Classical} genreClicked = {()=>this.handleClick("Classical")}/>
<Genre …
Run Code Online (Sandbox Code Playgroud) 我有一个运行 nginx 的 docker,端口转发到 8080
我想要的只是在点击时查看 nginx 中的日志
curl http://localhost:8080
Run Code Online (Sandbox Code Playgroud)
(我得到答案,但我想查看日志)
access.log 和 error.log 均从 /etc/nginx/nginx.conf 启用
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
Run Code Online (Sandbox Code Playgroud)
tail -f access.log 和 cat access.log 都不起作用。我得到的只是一个空行:
root@fe0f47477548:/var/log/nginx# cat access.log
^C
root@fe0f47477548:/var/log/nginx#
Run Code Online (Sandbox Code Playgroud) 我想知道 PodDisruptionBudget 能带来什么附加值。
据我了解,PodDisruptionBudget 承诺一定数量的节点将始终保留在集群中,同时有 2 个选项来决定如何保留:minAvailable / maxUnavailable。
现在,当我定义 ReplicaSet 时,我定义了我想要的副本数量。因此,如果我定义 2 个,则副本数不会少于 2 个。那么 PodDisruptionBudget 是由什么给出的呢?
我一直在更新 js 程序中的所有依赖项,但没有对我的任何组件进行任何更改。然而现在当我跑步时
npm run build
Run Code Online (Sandbox Code Playgroud)
我的一个组件出现错误,其中显示:
Failed to compile.
./src/components/DonationSummaryComponent.js
Line 14: '_' is not defined no-undef
Search for the keywords to learn more about each error.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of …
Run Code Online (Sandbox Code Playgroud) I want to write a function which takes a list of integers and returns a list where every element is negative.
negate :: [Int] -> [Int]
negate xs = foldl (\x xs -> (abs x * (-1)) : xs) [] xs
Run Code Online (Sandbox Code Playgroud)
This function negate all the array objects but also reverse the locations of all variables in the array. What make this function reverse the locations?
使用镜像firesh/nginx-lua。运行 docker Image 后,我想安装一些东西,但它没有 apt / apt-get 或任何其他包管理器。
我尝试在docker上安装apt,但它需要curl,而curl也不存在。
有什么解决办法吗?我无法在此 docker 上手动安装任何内容
谢谢..
我正在尝试部署我的第一个 cron 作业。
\n从一个非常简单的开始,如 k8s教程中所述:
\napiVersion: batch/v1\nkind: CronJob\nmetadata:\n name: hello\nspec:\n schedule: "*/1 * * * *"\n jobTemplate:\n spec:\n template:\n spec:\n containers:\n - name: hello\n image: busybox\n imagePullPolicy: IfNotPresent\n command:\n - /bin/sh\n - -c\n - date; echo Hello from the Kubernetes cluster\n restartPolicy: OnFailure\n
Run Code Online (Sandbox Code Playgroud)\n我已连接到我的 EKS 集群。这是命令和输出:
\n\xe2\x9e\x9c Dev kubectl apply -f cronjob.yaml \nerror: unable to recognize "cronjob.yaml": no matches for kind "CronJob" in version "batch/v1" \n
Run Code Online (Sandbox Code Playgroud)\n并且 batch/v1 确实存在于我的 apiVersion 列表中。
\n无法理解出了什么问题.. …
javascript ×3
kubernetes ×3
reactjs ×3
amazon-eks ×2
docker ×2
apt ×1
azure ×1
cron ×1
curl ×1
fold ×1
haskell ×1
logging ×1
nginx ×1
node.js ×1
npm ×1
recursion ×1
replicaset ×1
yaml ×1