问题标签 [reboot]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1426 浏览

c# - Remote MSMQ connection apparently lost problem when MSMQ server reboots

I am connecting to a remote MSMQ within a Windows Service, and doing a BeginReceive as follows:

The Process method gets the message and calls EndReceive like this:

and then processes the message, then calls BeginReceive again like this:

The problem is that for some reason when the MSMQ server reboots, the Process method fires, and gets to the EndReceive line which then throws a MessageQueueException. Once the remote server reboots, no more messages get received and processed until I restart the Windows Service.

It seems odd to me that the ReceiveCompletedEventHandler method (Process) is firing, and also why no more messages get received after the remote server reboots - I'm not quite sure how to ensure that the connection is reestablished after a reboot.

Does anyone know why this is happening? (and how to fix it?).

Note - I've now added some code that handles the case when the EndReceive call throws this specific error, and loops calling BeginReceive() again (with Thread.Sleeps) until there's no error any more. Annoyingly, even though this appears to work when the MSMQ server is back up and BeginReceive seems to work (ie doesn't throw any errors), still NO messages get received any more.

0 投票
2 回答
1827 浏览

rabbitmq - celerybeat 关机 - initscript 命令?

我正在尝试设置 rabbitmq/celery/django-celery/django 以使其具有“防重启”功能,即一切都会自行恢复。一切似乎都很好,除了这个:

当我重新启动时,所有服务都启动了,但似乎 celeryd 在 rabbitmq 之前启动,并且 celerybeat 随后被终止,因为它无法连接(?):

在 Ubuntu 上,我将带有 apt 的 rabbitmq-server、带有 pip 的 django-celery 安装到我的 virtualenv 中,然后我符号链接了我从https://github.com/ask/celery/tree/master/contrib/debian获得的“celeryd”initscript /etc/init.d 中的/init.d,在 /etc/default/celeryd 中将其配置为使用我的 virtualenv 中的 django celeryd,并通过它使其“防重启”(也许“默认值”是问题?)

我没有使用单独的 initscript 运行 celeryd 和 celerybeat,而是将 celeryd 配置为包含 Beat(也许这就是问题所在?):

任何指针如何解决这个问题?

如果我

没有投诉:

但我需要消除对任何手动步骤的需要。

0 投票
4 回答
5575 浏览

c# - c#重启远程机器,主机名是文本框

我对 c# 真的很陌生,我想我的程序可能有问题。所以我想让程序运行,它有 1 个重启远程机器的按钮,以及一个输入机器名称的文本框(windows xp sp3 环境)。这是我拥有的代码,它不会重新启动机器。我不想使用 psexec,除非我可以从程序本身调用 psexec b/ci 希望这是一个动态程序。长话短说,它提出了 cmd 提示符,但由于某种原因机器没有重新启动(我对远程机器有权限)......任何建议都将不胜感激,因为它可能很简单,我忽略了。

代码:

0 投票
5 回答
20134 浏览

ios - iphone以编程方式重启

我有代码

reboot命令在终端中有效,但即使我以 root 身份运行该应用程序,该操作仍然被拒绝。有没有人找到任何可行的方法,或者可以解释一下SBSetting的重启,这让我很好奇?

0 投票
1 回答
486 浏览

shell - 在重新启动时安排 regsvr32 执行

我正在 NSIS 上编写一个注册 shell 扩展的安装程序。

在卸载和升级时,由于 explorer.exe 锁定旧扩展,因此无法删除/覆盖旧扩展,并且排除了杀死 - 重新启动进程。

因此,我使用不同的名称提取新扩展名,将旧扩展名标记为删除(卸载/升级)并通过PendingFileRenameOperations注册表项将新扩展名重命名为其原始名称(仅限升级)。到目前为止,这工作正常。

问题是,我必须在启动时注册新的 shell 组件,因为PendingFileRenameOperations仅在重新启动时有效。有没有办法在重新启动后安排 regsvr32 操作?

我不能依靠在RunOnce上执行 .bat 来做到这一点,因为注销/登录也会触发RunOnce操作。

提前致谢。

0 投票
1 回答
397 浏览

c - 使用 C 语言更改 GRUB 的变量

我想知道是否有任何方法可以让我编写一个 C 程序来更改 GRUB 变量的值。

我需要编写一个可以在另一个操作系统上重新启动计算机的程序,例如:

  • 我在 Suse disk1

程序更改 GRUB 的变量并自动重新启动。

  • 我在 Suse disk2

我想访问以下变量:title、root、kernel、initrd。但无需编辑 /boot/grub/menu.lst 或 grub.conf 文件。

有 GRUB 的 API 吗?

0 投票
1 回答
9370 浏览

android - 以编程方式重新启动android设备

可能重复:
单击按钮重新启动手机

是否可以以编程方式重新启动设备。

我只想通过单击按钮重新启动设备。

0 投票
2 回答
2954 浏览

iphone - iPhone 项目未运行(不止一次)

我有一个我试图通过 Xcode 在我的手机上运行的 iPhone 应用程序。

  • 它安装和运行没有问题
  • 我对源代码进行了更改(可以忽略不计,如 NSLog())
  • 它安装没有问题
  • 运行导致错误:

    Error Starting Executable 'myApp'

    Don't know how to run. Try "help target".

  • 我卸载应用程序,然后重新启动手机

  • 它安装和运行没有问题(直到我做出另一个改变;然后我必须重复这个舞蹈)

不用说,必须卸载应用程序、重新启动手机并重新初始化环境(即设置首选项)会花费不合理的时间,并且可能表明存在严重问题。问题是,我收到的唯一一条模糊的错误消息让我在 Google 上无处可去。这个问题到底是从哪里来的?

0 投票
3 回答
182 浏览

android - 当系统崩溃或重新启动时,是否有任何事件/意图让我知道?

我已经实现了一个功能,可以在需要时更新数据库。

(例如,将数据库的列值之一更改为 B)

如果系统崩溃或重新启动或出现故障,

有什么我可以知道的,然后我可以处理恢复数据库吗?

(例如,将数据库的列值之一恢复到 A)

感谢帮助。

0 投票
2 回答
69571 浏览

windows-7 - 设置环境变量需要在 64 位上重新启动

我正在使用需要设置系统 PATH 环境变量的 Wix 3.5 安装程序。

这就是我设置环境变量的方式:

这似乎适用于 32 位系统,无需重新启动即可识别更改。但是,当我在 64 位 Windows 7 上尝试时,需要重新启动。

这是 64 位系统上的已知问题吗?

也许最好的方法是安排重新启动以覆盖所有基地。

谢谢,艾伦