Hudson CI 服务器配置出现严重错误

发布于 2024-08-20 01:05:51 字数 2801 浏览 1 评论 0原文

我不确定这是否是一个真正的问题,所以我会理解它是否被关闭或移动。

我是哈德森的新手,我已经安装并运行了几周,到目前为止我感到非常高兴。它作为 Windows 服务运行在 Windows 2008 X64 计算机上。

WS2008在VMware ESXI4.0以及另一个WS2008和Ubuntu服务器上运行。昨晚两台Windows服务器突然停止响应,MSTSC、文件共享、Web访问,全部停止了。 ESXI 服务器仍然响应,因为我可以浏览主页并查看其安装指南。 Ubuntu 机器继续正常工作,我通过 ssh 连接到它,Apache 服务器正在运行,Samba 仍然正常响应。

最后我不得不重新启动物理盒子才能将其全部恢复。

一旦我这样做了,服务器就恢复了,但哈德森现在失去了它的设置。奇怪的是它仍然要求我登录,并且用户名和密码仍然有效,所以它知道用户已设置。

该用户被设置为管理员用户,这样我就可以管理整个网站。我设置了三个构建作业,并让它们每晚都构建。

现在,当我登录时,我在左侧菜单上看不到一半的选项,并且没有工作。

我不太确定从哪里开始尝试解决它。

我确实需要一些帮助和指导。

谢谢乔恩

编辑

好的,所以我现在可以缩小我的问题范围。

如果我删除用户安全性,它会显示所有版本,我可以再次管理系统。

<?xml version='1.0' encoding='UTF-8'?>
<hudson>
  <version>1.341</version>
  <numExecutors>2</numExecutors>
  <mode>NORMAL</mode>
  <useSecurity>false</useSecurity>
  <authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy">
    <permission>hudson.scm.SCM.Tag:Jon</permission>
    <permission>hudson.model.View.Configure:Jon</permission>
    <permission>hudson.model.Computer.Configure:Jon</permission>
    <permission>hudson.model.Item.Configure:Jon</permission>
    <permission>hudson.model.Item.Create:Jon</permission>
    <permission>hudson.model.Run.Delete:Jon</permission>
    <permission>hudson.model.Computer.Delete:Jon</permission>
    <permission>hudson.model.View.Delete:Jon</permission>
    <permission>hudson.model.Hudson.Read:anonymous</permission>
    <permission>hudson.model.Hudson.Read:Jon</permission>
    <permission>hudson.model.Run.Update:Jon</permission>
    <permission>hudson.model.Hudson.Administer:Jon</permission>
    <permission>hudson.model.Item.Build:Jon</permission>
    <permission>hudson.model.Item.Read:Jon</permission>
    <permission>hudson.model.Item.Delete:Jon</permission>
    <permission>hudson.model.Item.Workspace:Jon</permission>
    <permission>hudson.model.View.Create:Jon</permission>
  </authorizationStrategy>
  <securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
    <disableSignup>true</disableSignup>
  </securityRealm>

这是我改的线,是真的。

<useSecurity>false</useSecurity>

我的用户名是“Jon”,我仍然可以使用它登录,但我只能看到以下选项:

构建历史记录 我的观点 排行榜

如果我尝试直接进入“/管理”,我的访问会被拒绝。

第二次编辑

修复了它,我删除了所有安全性,进去并重新添加了用户,然后它似乎记住了一切..非常奇怪。

第三次编辑

没有修复它,但找出了原来的问题是什么。它忘记了我的用户设置,所以即使我在重新启动后以所有权限重新添加“Jon”,它也会再次忘记这一切。

I am not sure if this is a true SO question really, so will understand if it gets closed or moved.

I am new to hudson, I have had it up and running for a few weeks now and so far have been very pleased. It is running on a Windows 2008 X64 machine as a windows service.

The WS2008 runs on VMware ESXI4.0, as well as another WS2008 and an Ubuntu Server. Last night the two windows servers suddenly stopped responding, MSTSC, file share, web access, it all stopped. The ESXI server still responded as I could browse to the home page and see its install guide. Also the Ubuntu machine continued to work normally, I ssh'd onto it, the Apache server was running and Samba still responded normally.

In the end I had to reboot the physical box to get it all back up again.

Once I did the servers came back up but Hudson has now lost its settings. What is weird is it still asks me to log in, and the username and password still work, so it knows that user is setup.

The user was setup to be an admin user so I could manage the whole site. I had three build jobs setup and had them building each night.

Now when I log in I do not see half the options on the left hand menu and there are no jobs.

I am not really sure where to start with this to try and solve it.

I could really do with some help and guidance.

Thank you

Jon

EDIT

OK, so I can narrow my question down now.

If I remove the user security it shows me all the builds and I can manage the system again.

<?xml version='1.0' encoding='UTF-8'?>
<hudson>
  <version>1.341</version>
  <numExecutors>2</numExecutors>
  <mode>NORMAL</mode>
  <useSecurity>false</useSecurity>
  <authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy">
    <permission>hudson.scm.SCM.Tag:Jon</permission>
    <permission>hudson.model.View.Configure:Jon</permission>
    <permission>hudson.model.Computer.Configure:Jon</permission>
    <permission>hudson.model.Item.Configure:Jon</permission>
    <permission>hudson.model.Item.Create:Jon</permission>
    <permission>hudson.model.Run.Delete:Jon</permission>
    <permission>hudson.model.Computer.Delete:Jon</permission>
    <permission>hudson.model.View.Delete:Jon</permission>
    <permission>hudson.model.Hudson.Read:anonymous</permission>
    <permission>hudson.model.Hudson.Read:Jon</permission>
    <permission>hudson.model.Run.Update:Jon</permission>
    <permission>hudson.model.Hudson.Administer:Jon</permission>
    <permission>hudson.model.Item.Build:Jon</permission>
    <permission>hudson.model.Item.Read:Jon</permission>
    <permission>hudson.model.Item.Delete:Jon</permission>
    <permission>hudson.model.Item.Workspace:Jon</permission>
    <permission>hudson.model.View.Create:Jon</permission>
  </authorizationStrategy>
  <securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
    <disableSignup>true</disableSignup>
  </securityRealm>

This is the line I changed, was true.

<useSecurity>false</useSecurity>

my user name is "Jon", which I can still log on with, but I can only see the following options:

Build History
My Views
Leader Board

If I try and go directly to "/manage" I get access denied.

Second Edit

Fixed it, I removed all security, went in and re added the User then it seemed to remember everything.. very odd.

Third Edit

Didn't fix it, but found out what the original problem is. It is forgetting my user settings, so even if I re add "Jon" back in with all privileges after a restart it forgets it all again.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撩人痒 2024-08-27 01:05:51

hudson 的所有配置信息都位于 hudson 主目录中的 XML 文件中。您没有告诉我们您如何部署它(winstone?jetty?),但您必须在某个地方有一个主目录。

很难想象哈德森会删除这些文件。

我会在其他地方安装一个新的、干净的 hudson,并将其与损坏的安装状态进行比较。

All of hudson's configuration information lives in XML files in the hudson home directory. You didn't tell us how you deploy it (winstone? jetty?), but you have to have a home directory somewhere.

It's rather hard to imagine hudson deleting these files.

I would make a new, clean, install of hudson somewhere else and compare it to the state of your broken installation.

深者入戏 2024-08-27 01:05:51

我曾经在编辑作业 xml(每个作业都有自己的 config.xml)并破坏了 xml 结构时丢失了数据。这将阻止 Hudson 加载作业。您可能会在日志文件 (HUDSON_HOME\*.log) 中找到一些有关出现问题的信息。

I once lost data when I edited the Job xmls (every job has it's own config.xml) and broke the xml structure. That will prevent Hudson from loading the jobs. You might find some information, of what is going wrong in the log files (HUDSON_HOME\*.log).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文