theonedev/onedev · error · ExplicitException
Server not set up yet
Error message
Server not set up yet
What it means
The enable-internal-login command handler re-enables the internal login form by flipping SecuritySetting.disableInternalLogin to false. Before mutating, it looks up the SECURITY setting; if no security setting exists the server has not completed initial setup (admin account/initial configuration not created), so it throws 'Server not set up yet'.
Source
Thrown at server-core/src/main/java/io/onedev/server/commandhandler/EnableInternalLogin.java:69
SecurityUtils.bindAsSystem();
try {
doMaintenance(() -> {
sessionFactoryService.start();
try (var conn = dataService.openConnection()) {
callWithTransaction(conn, () -> {
dataService.checkDataVersion(conn, false);
return null;
});
} catch (SQLException e) {
throw new RuntimeException(e);
}
transactionService.run(() -> {
var setting = settingService.findSetting(Key.SECURITY);
if (setting == null || setting.getValue() == null)
throw new ExplicitException("Server not set up yet");
var securitySetting = (SecuritySetting) setting.getValue();
securitySetting.setDisableInternalLogin(false);
setting.setValue(securitySetting);
});
logger.info("Internal login form has been enabled");
return null;
});
System.exit(0);
} catch (ExplicitException e) {
logger.error(e.getMessage());
System.exit(1);
}
}
@Override
public void stop() {
sessionFactoryService.stop();View on GitHub (pinned to d44925c47c)
Solutions
- Complete the initial server setup via the web UI first (create admin, finish wizard), then re-run the command.
- Verify you are running the command against the correct site/data directory of an already-set-up instance.
- If the security setting was accidentally deleted, restore it from backup or let setup recreate it.
- Check server logs to confirm the instance completed bootstrap and data migration before issuing the command.
Defensive patterns
Strategy: try-catch
Validate before calling
// before running the command, confirm setup completed
boolean setupDone = new File(siteDir, "site").exists()
&& securitySettingService.findSetting(Key.SECURITY) != null; Try / catch
try {
new EnableInternalLogin(...).start();
} catch (ExplicitException e) {
if (e.getMessage().contains("Server not set up yet"))
logger.error("Complete initial server setup via web UI before running this command");
} Prevention
- Always complete the web setup wizard before issuing server maintenance commands.
- Run commands against the documented site directory of the set-up instance.
- Script pre-checks that verify the SECURITY setting exists before automating commands.
When it happens
Trigger: Running the 'enable-internal-login' server command against a OneDev installation whose bootstrap/setup has never completed, i.e. no SecuritySetting record persisted under Key.SECURITY.
Common situations: Running the command before ever opening the web UI and completing the initial setup wizard; pointing the command at an empty/uninitialized site directory; fresh container deployment where setup was never finished.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- Server not set up yet
- Unable to update attributes as agent is offline
- Cannot delete this branch as it has workspaces
- Cannot delete pull request "${request.getReference().toStrin
- errorMessage (from checkRestoreSourceBranchCondition)
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/5176e6e9f37fb834.
Report an issue: GitHub.