views:

546

answers:

2

Hi,

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.

+1  A: 

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.

bmargulies
Thanks for the advice will take a look at the file structure, pretty sure the job folders are still there, trying a new instance sounds like a sensible idea as well
Jon
Sorry didn't know about the winstone, I just saw that going through some of the logs. (Winstone Servlet Engine V0.9.10)
Jon
A: 

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).

Peter Schuetze
Cool, will have a look there as well
Jon