尝试停止或重新启动docker容器时,我收到以下错误消息:
$ docker restart 5ba0a86f36ea
Error response from daemon: Cannot restart container 5ba0a86f36ea: [2] Container does not exist: container destroyed
Error: failed to restart containers: [5ba0a86f36ea]
Run Code Online (Sandbox Code Playgroud)
但是当我跑步的时候
$ docker logs -f 5ba0a86f36ea
Run Code Online (Sandbox Code Playgroud)
我可以看到日志,所以显然容器确实存在.有任何想法吗?
编辑:
对不起,我忘了提这个:
当我运行时,docker ps -a我看到容器已启动并正在运行.然而,其中的应用程序出现故障,因此我想重新启动它,或者只是在线获取该应用程序的新版本.但是当我无法停止并移除容器时,我也无法启动并运行新的应用程序,这将听取相同的端口.
当我在我的Fedora 20工作站上使用xsp4(来自MonoDevelop或直接)运行我的ASP.NET MVC 4网站时,我遇到以下异常:
System.Web.HttpRuntime.FinishWithException (wr={Mono.WebServer.XSPWorkerRequest}, e={System.Web.HttpException: ---> System.Web.HttpException: The pre-application start initialization method Start on type System.Web.WebPages.PreApplicationStartCode threw an exception with the following error message: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for <Module> ---> System.Security.SecurityException: No access to the given key ---> System.UnauthorizedAccessException: Access to the path "/etc/mono/registry" is denied.
at System.IO.Directory.CreateDirectoriesInternal (System.String …Run Code Online (Sandbox Code Playgroud) 我正在使用官方的elasticsearch Docker镜像,而不是设置我自己的弹性搜索实例.这很有效,直到我想扩展它.我想在该ElasticSearch实例中安装奇迹以获取更多信息.
现在,dockerfile/elasticsearch会自动运行ElasticSearch并将命令设置为/bin/bash不起作用,也不会附加到容器或尝试通过SSH访问它,也不会安装ssh-daemon apt-get install -y openssh-server.
在这种特殊情况下,我可以进入容器的文件系统并执行opt/elasticsearch/bint/plugin -i elasticsearch/marvel/latest,一切正常.
但是,apt-get如果我无法在正在运行的容器中安装终端,我怎么能安装需要安装的附加服务?
For the last 3 months or so I'm having random errors where I can't bind a specific port where our Identity server is running on my local development workstation. At first I thought it's my broken machine, so I reset everything, which kinda fixed the issue for 2 months and now it is back.
In the meanwhile other developers saw the same issue. All of us who experience the issue are running Windows 10, but not everyone with Windows 10 …
两者都被定义为一组协同工作的计算机,并为最终用户提供对在其后面运行的单个计算机的感知.
那么这里的区别是什么?
为了在Mono中部署我的项目,我已经将它降级为.Net 4.0,因为我已经完成了我正在引用的库(CommonUtils).但是,我仍然遇到以下异常:
无法解析主要引用"CommonUtils",因为它对程序集"Newtonsoft.Json,Version = 4.5.0.0,Culture = neutral,PublicKeyToken = 30ad4fe6b2a6aeed"具有间接依赖性,它是针对".NETFramework,Version = v4构建的" .5"框架.这是比当前目标框架".NETFramework,Version = v4.0"更高的版本.
我试图解决这个问题:
这些都没有帮助.
这两个项目都设置为.Net 4.0.基准是通过复制编译组件CommonUtils成一个"ExternalLibraries" -folder,由于该DLL是在其他项目中也被使用.
右键单击Newtonsoft.Json.dll - 它bin与CommonUtils一起移动到该文件夹- 显示在详细信息/文件描述中:Json.NET .NET 4.0
我很确定我拥有一切正确的.net 4.0和Visual Studio也允许我添加库并支持我自动完成,只是编译抛出上述警告.作为警告的结果,我突然得到异常,即CommonUtils引用的类型都不存在
找不到命名空间名称'CommonUtils'的类型(您是否缺少using指令或程序集引用?)
还有什么我可以尝试使这项工作?
PS:几年前我遇到过类似的问题,一个旧的程序集用于编译,并通过从头开始设置窗口和视觉工作室来"解决"它,但这次我觉得不喜欢这样做.
更新:
它适用于另一台计算机:我已经通过USB Stick将文件夹结构带到另一台具有相同操作系统(Windows 8.1)和相同Visual Studio 2013的计算机 - 据我所知,两台计算机都应安装所有更新 - 它有效.
将USB Stick与成功编译的项目一起带回我的电脑 - 我仍然遇到同样的错误.
(我明白,这意味着两台计算机都不可能安装相同的所有东西,但我不知道如何找到差异,也许有些暗示这可能是错误的?)
更新2:
进程资源管理器没有太多帮助,但是当我使用诊断日志编译所有内容时,我想我得到了关键提示:
...
5> Unified primary reference "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed". (TaskId:158)
5> Using this version instead of original version "4.5.0.0" in …Run Code Online (Sandbox Code Playgroud) 例如,EntityFramework Microsoft.EntityFrameworkCore.Relational项目在资源文件中包含以下文本:
...
<data name="FromSqlMissingColumn" xml:space="preserve">
<value>The required column '{column}' was not present in the results of a 'FromSql' operation.</value>
</data>
...
Run Code Online (Sandbox Code Playgroud)
生成以下C#代码:
...
/// <summary>
/// The required column '{column}' was not present in the results of a 'FromSql' operation.
/// </summary>
public static string FromSqlMissingColumn([CanBeNull] object column)
{
return string.Format(CultureInfo.CurrentCulture, GetString("FromSqlMissingColumn", "column"), column);
}
...
private static string GetString(string name, params string[] formatterNames)
{
var value = _resourceManager.GetString(name);
Debug.Assert(value != null);
if (formatterNames != null)
{
for (var …Run Code Online (Sandbox Code Playgroud) c# resx entity-framework-core asp.net-core asp.net-core-localization
我正在使用chimp.js,它通过一些光纤魔法来增强webdriver.io,以便可以以同步方式定义代码.这是代码:
var c = require('./config');
module.exports = function () {
this.When(/^I try to login with wrong credentials$/, function () {
browser.setValue(userNameField, wrongUser);
browser.setValue(passwordField, wrongPassword);
browser.click('button[value="Login"]');
});
this.When(/^I try to login with the correct credentials$/, function () {
browser.setValue(userNameField, c.userName);
browser.setValue(passwordField, c.password);
console.log('before pressig the button');
browser.click('button[value="Login"]');
console.log('logged in');
});
};
Run Code Online (Sandbox Code Playgroud)
第一个When执行得很好.第二个When也有效,我只是没有看到
登录
在控制台上.两者都在同一个网站上运行,并且都点击了同一个按钮.在第二种情况下,登录成功后,浏览器将重定向到角度SPA.这里的一切都正确加载,但就是这样.回调永远不会发生.
用--debug --log=command我运行测试看到这是最后一行(在超时之前)
[1;30m[01:30:18]: [0m [0;35mCOMMAND [0mPOST "/wd/hub/session/7c334efe-2417-4184-b43c-082ba4441291/element/11/click"
Run Code Online (Sandbox Code Playgroud)
将日志级别切换为详细,并等待〜5min我收到以下错误:
[chimp][selenium.stderr] 01:36:59.561 DEBUG - Executed: [0560aaa14e4cf874afd72336c19e299b, clickElement {id=0.6384125368203968-3}]
[chimp][selenium.stderr] 01:37:02.449 WARN …Run Code Online (Sandbox Code Playgroud) 我们使用jest来测试我们的API并且具有非常复杂的场景.我们使用这些beforeAll函数为每个测试设置一般辅助变量,有时设置租户分离,在其他情况下,我们使用beforeEach函数为测试设置租户分离,为测试租户设置一些默认配置,...
例如,测试可能喜欢这样的东西(正如你所看到的,我们使用TypeScript来编写测试,以防万一):
let apiClient: ApiClient;
let tenantId: string;
beforeAll(async () => {
apiClient = await getClientWithCredentials();
});
beforeEach(async () => {
tenantId = await createNewTestTenant();
});
describe('describing complex test scenario', () => {
it('should have some initial state', async () => {
await checkState(tenantId);
});
it('should have some state after performing op1', async () =>{
await op1(tenantId);
await checkStateAfterOp1(tenantId);
});
it('should have some state after performing op2', async () =>{
await op2(tenantId);
await checkStateAfterOp2(tenantId);
});
it('should …Run Code Online (Sandbox Code Playgroud) 这个问题的答案是否仍然相关:如何使用bluebird宣传MongoDB本机Javascript驱动程序?
我不知道从什么时候开始更新,但是MongoDB的2.0 JS驱动程序在options对象中有一个属性promiseLibrary:http://mongodb.github.io/node-mongodb-native/2.0/api/MongoClient.html
并且大多数方法/函数确实返回了一个承诺,例如Cursor.toArray().
但是,我找不到使用这个新选项的示例,但使用时不会更简单:
MongoClient.connect('mongodb://URL', { promiseLibrary: require('bluebird') });
Run Code Online (Sandbox Code Playgroud)
或者这个定义是错的? - 在哪种情况下,应该如何正确定义?
更新:
代码在io.js上运行,所以我甚至可能不需要指定一个promiseLibrary驱动程序将使用ES6承诺? - 但是,据说蓝鸟的承诺比较慢:
Update2: 我添加了bluebird标签 - 如果promisifying真的比使用MongoDB自己的实现更好的话,也许在bluebird上工作的人可以提供更多细节吗?
c# ×2
docker ×2
.net ×1
angularjs ×1
asp.net-core ×1
async-await ×1
bluebird ×1
chimp.js ×1
distributed ×1
fedora ×1
jest ×1
mongodb ×1
mono ×1
node.js ×1
port ×1
promise ×1
resx ×1
selenium ×1
sockets ×1
typescript ×1
webdriver-io ×1
windows ×1
windows-10 ×1
xsp ×1