脚本录制不上日志报错(NOT PROXIED)解决

突然LoadRunner录不上脚本了而且录制日志报相同的错误

Net An. Error    (  b8: 5e0)] Request Connection: Remote Server @ 192.168.1.160:80   (Service=)  NOT PROXIED! (REASON: Unable to connect to remote server: rc = -1 , le = 0)

网上找了很多,有说和杀毒软件有关……,卸载LR和杀软,然后先装LR再装杀软我折腾了将近一天还是不行。就在一天就要结束之时突然灵光一现,冥冥之中一个国外论坛映入眼帘:

Recording Optiongs ->Network -> Port Mapping
the capture level was changed from 'Socket Level Data' to 'WinINet level data'.

 在端口映射中将 Socket Level Data'  改为  'WinINet level data'.
靠!问题解决了,有点崩溃。
以下是一个简单的ansible批量部署nginx的脚本示例: 1. 创建一个新的ansible playbook文件,例如nginx.yml。 2. 在playbook文件中定义主机组和变量,例如: ``` - hosts: webservers vars: nginx_version: "1.18.0" nginx_conf_file: "/etc/nginx/nginx.conf" nginx_sites_dir: "/etc/nginx/sites-enabled" nginx_service_name: "nginx" ``` 3. 定义任务和角色,用于安装和配置nginx,例如: ``` tasks: - name: Install nginx apt: name: nginx state: present update_cache: yes cache_valid_time: 3600 vars: ansible_python_interpreter: /usr/bin/python3 - name: Configure nginx template: src: nginx.conf.j2 dest: "{{ nginx_conf_file }}" mode: 0644 notify: - restart nginx - name: Enable default site file: src: "{{ nginx_sites_dir }}/default" dest: "{{ nginx_sites_dir }}/default.conf" state: link force: yes notify: - restart nginx handlers: - name: restart nginx service: name: "{{ nginx_service_name }}" state: restarted ``` 4. 创建一个nginx配置模板文件,例如nginx.conf.j2,用于自定义nginx服务器块的配置: ``` user www-data; worker_processes auto; pid /run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; # server_names_hash_bucket_size 64; # server_name_in_redirect off; # access_log /var/log/nginx/access.log; # error_log /var/log/nginx/error.log; gzip on; gzip_disable "msie6"; # gzip_vary on; # gzip_proxied any; # gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; include /etc/nginx/conf.d/*.conf; include {{ nginx_sites_dir }}/*; } ``` 5. 运行ansible playbook来部署nginx: ``` ansible-playbook -i hosts nginx.yml ``` 注意事项: - 确保在运行playbook之前在hosts文件中定义了正确的主机名或IP地址。 - 在运行playbook之前,请确保在远程主机上安装了ansible和python。 - 在运行playbook之前,请确保在远程主机上启用了SSH身份验证。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值