如果我跑curl google.com,我看不到输出,只有一个空白页.我的Vagrantfile包含:
Vagrant.configure("2") do |config|
config.vm.box = "trumobi"
#config.vm.box_url = "http://192.168.136.129/package.box"
config.ssh.default.username = "trumobi"
config.vm.network :public_network
config.vm.network :forwarded_port, host: 8000, guest: 8000
end
Run Code Online (Sandbox Code Playgroud) 我在流浪者里面创造了e盒子.在Vagrantfile中,我把网络作为
Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network :private_network, ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network :public_network
Run Code Online (Sandbox Code Playgroud)
我无法访问VLAN外的VagrantBox.我需要访问公共网络中的Vagrant Box.如何以我需要在公共网络中访问的方式配置vagrantfile?
我安装了Jenkins(版本2.74)并安装了vagrant插件.创建了一个创建vagrantfile并执行vagrant box add命令的作业
vagrant box add test solaris.box
Run Code Online (Sandbox Code Playgroud)
并且执行的vagrant up命令和VM在jenkins作业中成功运行.
但VM未显示在VirtualBox Manager中.
在命令提示符下,VBoxManage.exe list vms命令也未列出正在运行的VM名称.
Vagrant版本:1.7.4 VirtualBox版本:5.0.12
命令提示输出:
D:\>vagrant global-status
id name provider state directory
------------------------------------------------------------------------
ee544e4 default virtualbox running D:/nBOL_VMS/nbolapp
67df2d1 default virtualbox running D:/nBOL_VMS/nbolapptest
206a5c8 default virtualbox running D:/nBOL_VMS/Jenkins-slave
VBoxManage.exe list runningvms
Run Code Online (Sandbox Code Playgroud)
我执行时,命令提示符输出显示为null VBoxManage.exe list runningvms.
詹金斯输出:
Vagrant global Status :
id name provider state directory
------------------------------------------------------------------------
ee544e4 default virtualbox running D:/nBOL_VMS/nbolapp
67df2d1 default virtualbox running D:/nBOL_VMS/nbolapptest
206a5c8 default virtualbox running D:/nBOL_VMS/Jenkins-slave
VBoxManage …Run Code Online (Sandbox Code Playgroud) 我在Linux Server中安装了Nagios(Nagios®Core™版本4.2.2).我一直在使用JSON查询生成器生成JSON格式的可用性报告.它将提供API.我创建了一个Javascript,它将此URL传递给Ajax调用,并根据成功结果,将在我们自己的仪表板中打印百分比.
JSON URL : http://xx.xx.xx.xx/nagios/cgi-bin/archivejson.cgi?query=availability&availabilityobjecttype=hostgroups&hostgroup=ALM&assumedinitialhoststate=up&assumedinitialservicestate=ok&starttime=1514297016&endtime=1514383416
Run Code Online (Sandbox Code Playgroud)
开始和结束时间包含EPOCH格式的时间.
在Javascript中,我创建了一个函数,它将开始和结束时间作为变量传递给URL.
var time = new Date();
var end = Math.floor((new Date).getTime() / 1000);
//var end = ~~(Date.now() /1000) ;
var start = Math.floor(time.setDate(time.getDate() - 1) / 1000);
Availreport = "http://xx.xx.xx.xx/nagios/cgi-bin/archivejson.cgi?query=availability&availabilityobjecttype=hostgroups&hostgroup=ALM&assumedinitialhoststate=up&assumedinitialservicestate=ok&starttime=" + start + "&endtime=" + end;
$.ajax({
url: Availreport,
timeout: 30000,
beforeSend: function(xhr) {
xhr.setRequestHeader('Authorization',
make_base_auth("nagiosadmin", "nagiosadmin"));
},
dataType: 'json', //data format
success: onOutboundReceived //on receive of reply
});
Run Code Online (Sandbox Code Playgroud)
在浏览器中,当我检查仪表板时,time_upjson键给出了一个不正确的值(值为0).直接在浏览器中执行时,相同的URL会提供正确的输出.
我该如何解决这个问题?
我是Kubernetes的新手.在Kubernetes文档的帮助下,我安装了minikube(v0.24.1)并kubectl在我的Windows机器上.VirtualBox(版本5.1.18)也安装在我的机器上.
在开始之前minikube,我已经执行set HTTP_PROXY=xx.xx.xx:8080并set NO_PROXY=localhost,127.0.0.0/8,192.0.0.0/8在Windows命令提示符下
minikube通过传递代理详细信息开始
C:\minikube>minikube start --memory 4096 --vm-driver=virtualbox --docker-env http_proxy=xx.xx.xx:8080 --docker-env https_proxy=xx.xx.xx:8080 --docker-env no_proxy=localhost,127.0.0.0/8,192.0.0.0/8 --cache-images=false
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.
Run Code Online (Sandbox Code Playgroud)
来自Kubectl的错误:
C:\minikube>kubectl version
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2017-12-15T21:07:38Z", …Run Code Online (Sandbox Code Playgroud) 我是 Kubernetes 的新手,我正在学习。我有安装 Vagrant 的 Windows 8 机器。使用 vagrant 我正在运行 ubuntu VM,在该 VM 中我正在运行 3 个 docker 容器。
流浪文件:
Vagrant.configure(2) do |config|
config.vm.box = "test"
config.vm.network "public_network"
config.vm.network "forwarded_port", guest: 8080, host: 8080
config.vm.network "forwarded_port", guest: 50000, host: 50000
config.vm.network "forwarded_port", guest: 8081, host: 8089
config.vm.network "forwarded_port", guest: 9000, host: 9000
config.vm.network "forwarded_port", guest: 3306, host: 3306
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2
end
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, …Run Code Online (Sandbox Code Playgroud) 在Nginx错误日志文件中,获取错误为
客户端在读取客户端请求标头时发送了无效标题行:"LocalDBUser_CREATE | USERNAME:User1"
如何解决这个问题.
我的Nginx Conf文件是
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
error_log logs/error.log info;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include 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 logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
upstream uic_entry {
server 127.0.0.1:4005;
}
server {
listen 80;
server_name xxx.yyy.com;
underscores_in_headers on;
large_client_header_buffers 4 16k;
proxy_next_upstream error …Run Code Online (Sandbox Code Playgroud) 使用#cd scons-2.3.0#python setup.py install安装SCons
安装后,当我尝试运行scons时,得到以下错误.
scons:*找不到SConstruct文件.文件"/usr/local/lib/scons-2.3.0/SCons/Script/Main.py",第905行,在_main
如何克服这个???
我创建了一个powershell脚本,它将(使用winscp.dll)文件从Jenkins Windows服务器传输到Linux服务器.在Jenkins批处理命令中,我执行了powershell脚本,它工作正常.
但是当我在Jenkins管道工作中尝试相同时,它会调用powershell脚本并进入下一步.它不等待PowerShell脚本响应.
bat 'powershell.exe -ExecutionPolicy Bypass "D:\\Test\\Deploymentscripts\\PowerShellScript\\FileTransfer.ps1 $env:EndMarket $env:Environment"'
Run Code Online (Sandbox Code Playgroud)
我尝试过另一个PowerShell脚本,它将连接到Linux服务器并执行一些命令.它在管道工作中工作正常
请指导我解决这个问题.
我有一个 Jenkins 的工作,它被安排在一个特定的时间。我想以编程方式修改该时间。
我尝试通过安装 Schedule Build 插件来修改构建并使用http://jenkins_url/job/jobname/build?delay=3344sec. 但这会将工作置于包含 Java 线程的静默期。我希望在不将其置于安静期的情况下修改 Schedule 条目。
vagrant ×4
jenkins ×3
kubernetes ×2
minikube ×2
vagrantfile ×2
virtualbox ×2
windows ×2
ajax ×1
batch-file ×1
docker ×1
javascript ×1
jenkins-api ×1
jquery ×1
json ×1
kubectl ×1
nagios ×1
nginx ×1
powershell ×1
python ×1
scons ×1
ubuntu ×1