我来自riak和redis,我从未遇到过这项服务的问题,或者进行互动.
这是mongo普遍存在的问题,而且相当无能为力.重启没有帮助.我是mongo的新手.
mongo
MongoDB shell version: 2.2.1
connecting to: test
Fri Nov 9 16:44:06 Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91
exception: connect failed
Run Code Online (Sandbox Code Playgroud)
这就是我在日志中看到的.
now open)
Fri Nov 9 16:44:34 [conn47] end connection 10.29.16.208:5306 (1 connection now open)
Fri Nov 9 16:45:04 [initandlisten] connection accepted from 10.29.16.208:5307 #48 (2 connections now open)
Fri Nov 9 16:45:04 [conn48] end connection 10.29.16.208:5307 (1 connection now open)
Fri Nov 9 16:45:04 [initandlisten] connection accepted from 10.29.16.208:5308 #49 (2 connections now open)
Fri …Run Code Online (Sandbox Code Playgroud) 为什么哦为什么我不能连接到mysql?
mysql -u root -ptest101 -h xxx.xxx.xxx.xxx
ERROR 1130 (HY000): Host 'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL server
Run Code Online (Sandbox Code Playgroud)
在my.cnf我有以下内容
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 0.0.0.0
Run Code Online (Sandbox Code Playgroud)
我也跑了以下......
'UPDATE mysql.user SET Password = PASSWORD('test101') WHERE User = 'root';
FLUSH PRIVILEGES;
Run Code Online (Sandbox Code Playgroud)
我可以使用mysql -u root -ptest101在主机上访问但不能使用mysql -u root -ptest101 -h xxx.xxx.xxx.xxx
哇......为什么会这样?我是ubuntj 12.04
mysql> SELECT host FROM mysql.user WHERE User = …Run Code Online (Sandbox Code Playgroud) 在ts is_edit = true中禁用...
<input [disabled]="is_edit=='false' ? true : null" id="name" type="text" [(ngModel)]="model.name" formControlName="name" class="form-control" minlength="2">
Run Code Online (Sandbox Code Playgroud)
我只是想根据true或禁用输入false.
我试过以下:
[disabled]="is_edit=='false' ? true : null"
[disabled]="is_edit=='true'"
[disabled]="is_edit"
Run Code Online (Sandbox Code Playgroud) 我收到了很多499 nginx错误代码.我看到这是客户端问题.这不是Nginx或我的uWSGI堆栈的问题.我注意到当获得499时uWSGI日志中的相关性.
address space usage: 383692800 bytes/365MB} {rss usage: 167038976
bytes/159MB} [pid: 16614|app: 0|req: 74184/222373] 74.125.191.16 ()
{36 vars in 481 bytes} [Fri Oct 19 10:07:07 2012] POST /bidder/ =>
generated 0 bytes in 8 msecs (HTTP/1.1 200) 1 headers in 59 bytes (1
switches on core 1760)
SIGPIPE: writing to a closed pipe/socket/fd (probably the client
disconnected) on request /bidder/ (ip 74.125.xxx.xxx) !!!
Fri Oct 19 10:07:07 2012 - write(): Broken pipe [proto/uwsgi.c line
143] during POST /bidder/ (74.125.xxx.xxx) …Run Code Online (Sandbox Code Playgroud) 我在用:
gpg --gen-key
Run Code Online (Sandbox Code Playgroud)
有没有更好的方法来创建PGP密钥?这个程序想要什么?一个完全砰的服务器?
没有足够的随机字节可用.请做一些其他工作,让操作系统有机会收集更多
我真的不知道如何让主管使用环境变量.
以下是配置代码段.
[program:htNotificationService]
priority=2
#autostart=true
#autorestart=true
directory=/home/ubuntu/workspace/htFrontEnd/heythat/htsite
command = /usr/bin/python htNotificationService.py -service
stdout_logfile=/var/log/heythat/htNotificationService.log
redirect_stderr=true
environment=PATH=/home/ubuntu/workspace/htFrontEnd/heythat
stopsignal=QUIT
Run Code Online (Sandbox Code Playgroud)
我尝试过以下方法:
environment=PATH=/home/ubuntu/workspace/htFrontEnd/heythat
environment=PYTHONPATH=$PYTHONPATH:/home/ubuntu/workspace/htFrontEnd/heythat
environment=PATH=/home/ubuntu/workspace/htFrontEnd/heythat,PYTHONPATH=$PYTHONPATH:/home/ubuntu/workspace/htFrontEnd/heythat
Run Code Online (Sandbox Code Playgroud)
当我开始上司时,我得到了
htNotificationService: ERROR (abnormal termination)
Run Code Online (Sandbox Code Playgroud)
我可以通过设置python路径从shell开始,但不能从主管开始.在日志中,我收到一条错误消息,指出无法找到导入.好吧,如果主管能够工作,那就可以解决.我甚至在/ etc/environment中有路径?
为什么主管不工作?
当我尝试使用uWSGI启动Flask时出现以下错误.我是这样开始的:
> # cd ..
> root@localhost:# uwsgi --socket 127.0.0.1:6000 --file /path/to/folder/run.py --callable app - -processes 2
Run Code Online (Sandbox Code Playgroud)
这是我的目录结构:
-/path/to/folder/run.py
-|app
-|__init__.py
-|views.py
-|templates
-|static
Run Code Online (Sandbox Code Playgroud)
的内容 /path/to/folder/run.py
if __name__ == '__main__':
from app import app
#app.run(debug = True)
app.run()
Run Code Online (Sandbox Code Playgroud)
的内容 /path/to/folder/app/__init__.py
import os
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
#from flaskext.babel import Babel
from config import basedir
app = Flask(__name__)
app.config.from_object('config')
#app.config.from_pyfile('babel.cfg')
db = SQLAlchemy(app)
login_manager = LoginManager()
login_manager.setup_app(app)
login_manager.login_view = 'login'
login_manager.login_message = u"Please …Run Code Online (Sandbox Code Playgroud) 我需要删除一个主分支,但事实证明它很难.我只想清理那个分支并开始新的.我从开发分支删除.我希望GitHub上的主人干净.
# git push origin --delete master
> To https://github.com/mymasterb.git ! [remote rejected] master
> (deletion of the current branch prohibited) error: failed to push some
> refs to 'https://github.com/mymaster.git'
Run Code Online (Sandbox Code Playgroud)
我如何简单地用新鲜的石板开始我的主人?
我正在使用Ubuntu 12.04和Postgress 9.2.
我需要使用此密码创建此用户,例如
postgres://admin:test101@127.0.0.1:5432
Run Code Online (Sandbox Code Playgroud)
如何从命令行执行此操作?我需要使用bash脚本进行自动化.我有一个全新的安装.
我有一个约会,我需要让时区知道.
local_tz = timezone('Asia/Tokyo')
start_date = '2012-09-27'
start_date = datetime.strptime(start_date, "%Y-%m-%d")
start_date = start_date.astimezone(local_tz)
now_utc = datetime.now(timezone('UTC'))
local_now = now_utc.astimezone(local_tz)
Run Code Online (Sandbox Code Playgroud)
我需要找到这是否属实:
print start_date>local_now
Run Code Online (Sandbox Code Playgroud)
但是我得到了这个错误.
start_date = start_date.astimezone(local_tz)
ValueError: astimezone() cannot be applied to a naive datetime
Run Code Online (Sandbox Code Playgroud)
我将utc转换为tokyo没有任何问题.我需要在东京做好start_date时区感知广告.
谢谢