localhost

Selenium 3.7 : geckodriver : WebDriverException: org.apache.http.conn.HttpHostConnectException Connection Refused

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Recently I upgraded to Selenium 3.7. Code: import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public static void main (String args[]){ System.setProperty("webdriver.gecko.driver", "/usr/local/bin/geckodriver"); WebDriver driver = new FirefoxDriver(); driver.get("http://www.google.com"); driver.quit(); } Included Library: selenium-java-3.7.1/selenium-server-standalone-3.7.1.jar selenium-java-3.7.1/libs/httpcore-4.4.6.jar selenium-java-3.7.1/libs/httpclient-4.5.3.jar selenium-java-3.7.1/libs/guava-23.0.jar

Angular 2 HTTP GET 404 Not Found for URL

匿名 (未验证) 提交于 2019-12-03 01:59:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to integrate Angular 2 application with Java Spring Boot backend. For the moment, I place my Angular 2 files under src/main/resources/static (meaning both Angular and Spring apps run witin the same app on the same port). I am trying to do HTTP GET like this: import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import { Language } from '../model/language'; import { Observable } from 'rxjs/Rx'; import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/map'; @Injectable() export class LanguageService {

Error when accessing localhost api in chrome net::ERR_INSECURE_RESPONSE

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was trying to access api running in localhost using angular $resourses, chrome console gives me error saying ERR_INSECURE_RESPONSE. I tried disabling web security in chrome. still same error. here is the angular factory that i used. How can I bypass this error and test my app. ImpactPortal.factory('apiFactory', function ($resource) { return $resource('https://localhost:8443/mifosng-provider/api/v1/client_impact_portal', {}, { query: { method: 'GET', params: {}, isArray: true } }) }); 回答1: You must authenticate first and then send each

Setting a custom header using BrowserMob-Proxy REST api

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a browsermob proxy running on port 9091. I am trying to use browsermob-proxy REST API to set a custom header. When I make a request to my app using Selenium via the proxy, I don't see the header printed in my apps console. Below is my code. The request body is based on documentation here . My requirement is to use BrowserMob proxy API and not its Java library for this particular use case. Anything I am doing wrong in the code below? Proxy proxy = new java . net . Proxy ( java . net . Proxy . Type . HTTP , new

PG::ConnectionBad: fe_sendauth: no password supplied

匿名 (未验证) 提交于 2019-12-03 01:55:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I attempt to run "rake test" on a local postgres database, it throws the above exception. Here is my pg_hba.conf file: # Database administrative login by Unix domain socket local all postgres peer # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all username peer local myapp_dev myapp md5 local myapp_test myapp md5 local myapp_prod myapp md5 #local all all peer # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5 # Allow replication

Postgresql : Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections [duplicate]

匿名 (未验证) 提交于 2019-12-03 01:49:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This question already has an answer here: Connection refused (PGError) (postgresql and rails) 4 answers I am trying to connect postgresql but I am getting this error. org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. My pg_hba.conf file is like this. TYPE DATABASE USER CIDR-ADDRESS METHOD # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5 I would be much obliged if anyone please be

Kafka bootstrap-servers vs zookeeper in kafka-console-consumer

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to test run a single Kafka node with 3 brokers & zookeeper. I wish to test using the console tools. I run the producer as such: kafka-console-producer --broker-list localhost:9092,localhost:9093,localhost:9094 --topic testTopic Then I run the consumer as such: kafka-console-consumer --zookeeper localhost:2181 --topic testTopic --from-beginning And I can enter messages in the producer and see them in the consumer, as expected. However , when I run the updated version of the consumer using bootstrap-server, I get nothing. E.g kafka

NGINX 'Access-Control-Allow-Origin' header contains multiple values

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an NGINX server with PHP (let's assume a hostname of http://myserver.com ). I have a PHP script that I'm accessing via XHR from a web page on my localhost. I'm using it as a GeoIP server similar to freegeoip.net. I'm trying to lock down XHR to specific domains. Here's my config setup: location ~ \.php$ { try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_param GEOIP_COUNTRY_CODE $geoip2_data_country_code; fastcgi

运维规范整理

空扰寡人 提交于 2019-12-03 01:45:50
服务器管理规范 1、对于没有经过验证的命令绝不允许在服务器上运行,必须完全理解该命令执行后的结果 方可执行。执行命令时必须确定当前的工作目录。 2、在服务器尽量少使用rm -rf命令,遇到确实不用的文件可以使用mv filename /tmp 的方式,将文件放入/tmp 目录下,由系统10天后自动删除。 3、修改配置文件必须备份,如 cp filename filename.20160504,然后进行修改。 4、项目发布时 必须先备份 原文件以日期格式如tar zcvf filename20160504.zip filename 打包。 主机名 命令规则 主机名只允许包含ascii字符里的数字0-9,字母a-zA-Z,连字符-。其他都不允许。例如,不允许出现其他标点符号,不允许空格,不允许下划线,不允许中文字符。 主机名的开头和结尾字符不允许是连字符。 主机名强烈建议不要用数字开头,尽管这一条不是强制的。甚至不要使用只包含可解释为16进制字符的字符串,例如"beef"。 建议不要使用计算机领域的特殊的词汇,例如,up。 给主机命名通常不考虑字母大小写问题。 给主机命名,建议使用合法的单词,这样方便记忆。 通常项目部署时根据部署文档定义主机名,但目前仍有大量主机使用默认localhost,需要修改成有意义的主机名。 命名示例: 山东项目济南数据库命名: JNPORTALDB1