localhost

curl Failed to connect to localhost port 80

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My hosts file maps 127.0.0.1 to localhost . $ curl -I 'localhost' curl: (7) Failed to connect to localhost port 80: Connection refused And then $ curl -I 127.0.0.1 HTTP/1.1 200 OK Server: nginx/1.2.4 Date: Wed, 09 Apr 2014 04:20:47 GMT Content-Type: text/html Content-Length: 612 Last-Modified: Tue, 23 Oct 2012 21:48:34 GMT Connection: keep-alive Accept-Ranges: bytes In my hosts file I have 127.0.0.1 localhost It appears that curl command fails to recognize entries in /etc/hosts . Can someone explain why? update: i've yet to try this but i've

Delete all documents from index/type without deleting type

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I know one can delete all documents from a certain type via deleteByQuery. Example: curl - XDELETE 'http://localhost:9200/twitter/tweet/_query' - d '{ "query" : { "term" : { "user" : "kimchy" } } }' But i have NO term and simply want to delete all documents from that type, no matter what term. What is best practice to achieve this? Empty term does not work. Link to deleteByQuery 回答1: I believe if you combine the delete by query with a match all it should do what you are looking for, something like this (using your example): curl -

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

匿名 (未验证) 提交于 2019-12-03 02:13: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

LEMP--如何在Ubuntu上安装Linux、Nginx、MySQL和PHP

筅森魡賤 提交于 2019-12-03 02:11:26
简介 LEMP是用来搭建动态网站的一组软件,首字母缩写分别表示Linux、Nginx(Engine-X)、MySQL和PHP。 本文将讲述如何在Ubuntu安装LEMP套件。当然,首先要安装Ubuntu18.04操作系统,接着按照以下方法完成其他组建的安装。 1.切换root用户 输入命令: su root 回车提示输入密码,怎么输入都不对,这是你的root没有设置密码或者你当前就是root 给root用户设置密码:命令: sudo passwd root 输入密码,并确认密码。 重新输入命令: su root 然后输入密码: 发现可以切换到root权限了。 使用su xyx命令,切换到普通用户。 2.以下演示将通过非管理员账号进行,即通过sudo命令完成安装 如果是普通账号(非管理员)可继续往下看。 管理员可以去掉sudo直接使用命令 步骤一:安装Nginx网站服务器 $ sudo apt update $ sudo apt install nginx 在Ubuntu上,使用以上两条命令完成nginx安装就可以通过localhost访问了,若访问失败,可能是已经安装了Apache等占用80端口的服务,或者是防火墙问题,若访问成功,应该如下图所示。 步骤二:安装MySQL数据库 $ sudo apt install mysql-server-5.7 执行该条命令安装MySQL

CORS: Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true

匿名 (未验证) 提交于 2019-12-03 02:09:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a setup involving Frontend server (Node.js, domain: localhost:3000) <---> Backend (Django, Ajax, domain: localhost:8000) Browser <-- webapp <-- Node.js (Serve the app) Browser (webapp) --> Ajax --> Django(Serve ajax POST requests) Now, my problem here is with CORS setup which the webapp uses to make Ajax calls to the backend server. In chrome, I keep getting Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true. doesn't work on firefox either. My Node.js setup is: var allowCrossDomain = function(req, res,

No suitable driver found for &#039;jdbc:mysql://localhost:3306/mysql [duplicate]

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This question already has an answer here: The infamous java.sql.SQLException: No suitable driver found 7 answers Using Java, I get this error when attempting to connect to a mysql database: java.sql.SQLException: No suitable driver found for 'jdbc:mysql://localhost:3306/mysql at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at MyTest1.main(MyTest1.java:28) I'm using the mysql-connector-java-5.1.18-bin.jar driver. It is in my build path. I have restarted MySQL. I've also logged on

React Native: fetch request failed with error - TypeError: Network request failed(…)

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am developing a simple app using React Native. I am testing it on Android device. I have created a Node.js server to listen to the requests, it is running at http://localhost:3333/ . Next, I am making a fetch request from index.android.js. Below is the code. fetch('http://localhost:3333/', { 'method': 'GET', 'headers': { 'Accept': 'text/plain', } } ) .then((response) => response.text()) .then((responseText) => { console.log(responseText); }) .catch((error) => { console.warn(error); }); The code for the request handler at node server is

using ui.bootstrap causing issues with carousel

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am having issues with getting the carousel working properly. I used yeomen to scaffold the angular app. I am getting this error Error: [$compile:ctreq] Controller 'carousel', required by directive 'slide', can't be found! http://errors.angularjs.org/1.2.26/$compile/ctreq?p0=carousel&p1=slide at http://localhost:9000/bower_components/angular/angular.js:78:12 at getControllers (http://localhost:9000/bower_components/angular/angular.js:6543:19) at nodeLinkFn (http://localhost:9000/bower_components/angular/angular.js:6712:35) at http:/

Android Emulator Jenkins Plugin not working

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to use the Jenkins Android Emulator with Cloudbees and I am often experiencing this kind of output: error : device offline $ / opt / android / android - sdk - linux / platform - tools / adb connect localhost : 44194 $ / opt / android / android - sdk - linux / platform - tools / adb - s localhost : 44194 shell getprop dev . bootcomplete error : device offline $ / opt / android / android - sdk - linux / platform - tools / adb connect localhost : 44194 $ / opt / android / android - sdk - linux / platform - tools / adb - s

Nginx cannot find unix socket file with Unicorn (no such file or directory)

匿名 (未验证) 提交于 2019-12-03 02:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am deploying a Rails 4 app to a Fedora 19 x64 server using Nginx and Unicorn. The problem is that I get an error when visiting the address: "We're sorry, but something went wrong." My Nginx error log ( /var/log/nginx/error.log ) shows: 2014 / 03 / 08 03 : 50 : 12 [ warn ] 23934 #0: conflicting server name "localhost" on 0.0.0.0:80, ignored 2014 / 03 / 08 03 : 50 : 12 [ warn ] 23936 #0: conflicting server name "localhost" on 0.0.0.0:80, ignored 2014 / 03 / 08 03 : 50 : 14 [ crit ] 23939 #0: *1 connect() to unix:/tmp/unicorn.[app