Cannot login to fresh foreman 1.4.0 install

Apologies if this is double posted… any advice would be greatly
appreciated.

I have a fresh foreman 1.4.0 install in Ubuntu, and when I try to login I
get the following errors:

Started POST "/users/login" for 127.0.0.1 at Wed Feb 19 14:04:03 -0500
2014

Processing by UsersController#login as HTML

  • Parameters: {"login"=>{"login"=>"Admin", "password"=>"[FILTERED]"},
    "utf8"=>"â",
    "authenticity_token"=>"46PTtpv9sKc/v/mKHU6UpPDgu8ZaeCb9pL6yOtFXN+o=",
    "commit"=>"Login"}*
    invalid user

with login: true I cannot login with the default credentials of
admin/changeme and I see the following error:

with login: false I get the following error:
Oops! Sorry, but something went wrong

×Note!Validation failed: authentication source can not be empty

If you think this is an error Foreman, please report a problem with System
Foreman tickets <Issues - Foreman> , probably
need to add the full message <http://devwebspuppet202.webs.dev/#> and
relevant log entries
*ActiveRecord :: RecordInvalid *
Validation failed: authentication source can not be empty
app / models / user.rb: 95: in create_admin &#39; app / models / user.rb: 102: inadmin '
app / controllers / Concerns / foreman / controller / authentication.rb:
36: in authenticate &#39; app / controllers / Concerns / foreman / controller / authentication.rb: 47: inrequire_login '
app / models / Concerns / foreman / thread_session.rb: 33: in clear_thread &#39; lib / middleware / catch_json_parse_errors.rb: 9: incall '

Hi Lukas, thanks for your reply.

When I ran that command, there was no output, it just returned the prompt.

Shawn

··· On Wednesday, February 19, 2014 3:05:07 PM UTC-5, Shawn Burgess wrote: > > Apologies if this is double posted... any advice would be greatly > appreciated. > > > I have a fresh foreman 1.4.0 install in Ubuntu, and when I try to login I > get the following errors: > > *Started POST "/users/login" for 127.0.0.1 at Wed Feb 19 14:04:03 -0500 > 2014* > *Processing by UsersController#login as HTML* > * Parameters: {"login"=>{"login"=>"Admin", "password"=>"[FILTERED]"}, > "utf8"=>"â", > "authenticity_token"=>"46PTtpv9sKc/v/mKHU6UpPDgu8ZaeCb9pL6yOtFXN+o=", > "commit"=>"Login"}* > *invalid user* > > > with login: true I cannot login with the default credentials of > admin/changeme and I see the following error: > > > with login: false I get the following error: > Oops! Sorry, but something went wrong > > ×Note!Validation failed: authentication source can not be empty > > If you think this is an error Foreman, please report a problem with System > Foreman tickets , > probably need to add the full message and > relevant log entries > *ActiveRecord :: RecordInvalid * > *Validation failed: authentication source can not be empty* > app / models / user.rb: 95: in `create_admin ' > app / models / user.rb: 102: in `admin ' > app / controllers / Concerns / foreman / controller / authentication.rb: > 36: in `authenticate ' > app / controllers / Concerns / foreman / controller / authentication.rb: > 47: in `require_login ' > app / models / Concerns / foreman / thread_session.rb: 33: in ` > clear_thread ' > lib / middleware / catch_json_parse_errors.rb: 9: in `call ' >

That seems to have helped, now I see the Foreman "Welcome" page

Thanks very much Lukas!

Hello,

looks like something was not properly initialized.

Can you do this command and paste the output?

foreman-rake db:migrate db:seed

LZ

··· On Wed, Feb 19, 2014 at 12:05:07PM -0800, Shawn Burgess wrote: > Apologies if this is double posted... any advice would be greatly > appreciated. > > > I have a fresh foreman 1.4.0 install in Ubuntu, and when I try to login I > get the following errors: > > *Started POST "/users/login" for 127.0.0.1 at Wed Feb 19 14:04:03 -0500 > 2014* > *Processing by UsersController#login as HTML* > * Parameters: {"login"=>{"login"=>"Admin", "password"=>"[FILTERED]"}, > "utf8"=>"â", > "authenticity_token"=>"46PTtpv9sKc/v/mKHU6UpPDgu8ZaeCb9pL6yOtFXN+o=", > "commit"=>"Login"}* > *invalid user* > > > with login: true I cannot login with the default credentials of > admin/changeme and I see the following error: > > > with login: false I get the following error: > Oops! Sorry, but something went wrong > > ×Note!Validation failed: authentication source can not be empty > > If you think this is an error Foreman, please report a problem with System > Foreman tickets , probably > need to add the full message and > relevant log entries > *ActiveRecord :: RecordInvalid * > *Validation failed: authentication source can not be empty* > app / models / user.rb: 95: in `create_admin ' > app / models / user.rb: 102: in `admin ' > app / controllers / Concerns / foreman / controller / authentication.rb: > 36: in `authenticate ' > app / controllers / Concerns / foreman / controller / authentication.rb: > 47: in `require_login ' > app / models / Concerns / foreman / thread_session.rb: 33: in ` > clear_thread ' > lib / middleware / catch_json_parse_errors.rb: 9: in `call ' > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/groups/opt_out.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

>
> My mistake, the following was logged in production.log:

Migrating to CreateHosts (20090714132448)
Migrating to AddAuditsTable (20090714132449)
Migrating to CreateArchitectures (20090715143858)
Migrating to CreateMedia (20090717025820)
Migrating to CreateDomains (20090718060746)
Migrating to CreateSubnets (20090718064254)
Migrating to CreateOperatingsystems (20090720134126)
Migrating to CreateModels (20090722140138)
Migrating to CreateEnvironments (20090722141107)
Migrating to CreateReports (20090729132209)
Migrating to CreatePtables (20090730152224)
Migrating to CreatePuppetclasses (20090802062223)
Migrating to CreateParameters (20090804130144)
Migrating to CreateAuthSources (20090820130541)
Migrating to CreateHostgroups (20090905150131)
Migrating to AddTypeToParameter (20090905155444)
Migrating to AddDomainToParameter (20090907045751)
Migrating to ChangeReportFieldTypeToText (20090915030726)
Migrating to ChangeHostBuildDefaultToFalse (20090916053824)
Migrating to AddIndexToHost (20090920043521)
Migrating to AddIndexToParameters (20090920064156)
Migrating to AddIndexToReports (20090920065522)
Migrating to CreateUsers (20091012135004)
Migrating to CreateSessions (20091016031017)
Migrating to AddStatusToReport (20091022054108)
Migrating to CalcExistingReports (20091214045923)
Migrating to CreateLookupKeys (20091219132338)
Migrating to CreateLookupValues (20091219132839)
Migrating to ChangeMysqlReportsColumn (20100115021803)
Migrating to AddFamilyToOs (20100310080727)
Migrating to UpdateFactNamesAndValuesToBin (20100325142616)
Migrating to AddReleasenameToOs (20100414125652)
Migrating to CreateUsergroups (20100416124600)
Migrating to AddOwnerToHosts (20100419151910)
Migrating to AddUbuntuCustomLvmPtable (20100523114430)
Migrating to CreateMediaOperatingsystemsAndMigrateData (20100523141204)
Migrating to MigrateInstallationMediumUri (20100524080302)
Migrating to SimplifyParameters (20100525094200)
Migrating to UpdateOsMinor (20100601221000)
Migrating to ChangeFamilyInOs (20100616114400)
Migrating to CreateNotices (20100625155400)
Migrating to AddInternalAuth (20100628123400)
Migrating to CreateRoles (20100629093200)
Migrating to AddUserDomainsAndHostgroups (20100701081235)
Migrating to CreateUserFacts (20100822072954)
Migrating to AddEnabledToHosts (20100823181036)
Migrating to AddMyBooleansToUser (20100914092104)
Migrating to CreateMessages (20101018120548)
Migrating to CreateSources (20101018120603)
Migrating to CreateLogs (20101018120621)
Migrating to AddMetricsToReport (20101019122857)
Migrating to ConvertReports (20101019183859)
Migrating to AddOwnedFilterToUser (20101103150254)
Migrating to CorrectMedia (20101118130026)
Migrating to CreateConfigTemplates (20101121080425)
Migrating to CreateTemplateCombinations (20101121135521)
Migrating to CreateOperatingsystemsConfigTemplates (20101122132041)
Migrating to CreateTemplateKinds (20101123152150)
Migrating to CreateOsDefaultTemplates (20101123153303)
Migrating to AddDefaultTemplates (20101125153351)
Migrating to AddSubSystemsToSubnet (20101130093613)
Migrating to CreateProxies (20101130100315)
Migrating to AddProxyToDomain (20101202104444)
Migrating to AddGrubbyTemplate (20101213085232)
Migrating to AddHostGroupDefaults (20110117162722)
Migrating to AddDefaultPxeMenuTemplate (20110128130239)
Migrating to CreateProxyFeatures (20110213104226)
Migrating to ChangePuppetmasterColumn (20110216101848)
Migrating to AddManagedToHosts (20110301154453)
Migrating to RevertFaceNamesAndValuesToTextRecords (20110321070954)
Migrating to AddPriorityToParameter (20110327123639)
Migrating to AddMediaPathToMedium (20110404150043)
Migrating to AddImageToHost (20110407091150)
Migrating to RemoveUnusedFieldsFromPuppetClasses (20110412103238)
Migrating to AddTableBookmarks (20110417102947)
Migrating to AddSolarisTemplates (20110420150600)
Migrating to AddSolarisDisks (20110613141800)
Migrating to AddLookUpKeyIdToPuppetClass (20110616080444)
Migrating to AddSparcInfoToModel (20110617190131)
Migrating to AddAncestryToHostgroup (20110619130336)
Migrating to CreateSettings (20110628115422)
Migrating to UpdateAuditsTable (20110712064120)
Migrating to CreateHostClass (20110712070522)
Migrating to AddSuseTemplates (20110725142054)
Migrating to AddVmDefaultsToHostgroup (20110801090318)
Migrating to AddSubnetAndDomainToHostGroups (20110803114134)
Migrating to RenameChangesToAuditedChanges (20111124095053)
Migrating to AddRemoteAddressToAudits (20111124095054)
Migrating to RenameParentToAssociation (20111124095055)
Migrating to AddGatewayAndDnsToSubnets (20111205231500)
Migrating to EnsureAllHostnamesAreLowercase (20111227095806)
Migrating to AddFromAndToRangesToSubnets (20120102071633)
Migrating to CreateSubnetDomain (20120110113051)
Migrating to CreateComputeResources (20120122131037)
Migrating to AddUuidAndComputeIdToHost (20120126113850)
Migrating to AddWindowsTemplates (20120127141602)
Migrating to CreateNics (20120311081257)
Migrating to AddPuppetMasterProxyToHostAndHostGroup (20120313081913)
Migrating to UpdateReportFieldToLargeInt (20120502105518)
Migrating to CreateImages (20120506143325)
Migrating to AddCertNameToHost (20120509131302)
Migrating to CreateKeyPairs (20120510113417)
Migrating to AddDnsIdToSubnet (20120521142924)
Migrating to AddImageIdToHost (20120523065531)
Migrating to AddUserComputeResources (20120529113900)
Migrating to AddComputeResourcesBooleanToUser (20120529115814)
Migrating to AddEpelSnippets (20120604114049)
Migrating to ConvertParamsToText (20120607074318)
Migrating to ChangeBookmarkColumnToText (20120612070100)
Migrating to RenameAssociationToAssociated (20120613082125)
Migrating to FixAuditableType (20120620124658)
Migrating to FixAssociatedType (20120620124659)
Migrating to CreateTaxonomies (20120621135042)
Migrating to AddOkHostsBookMark (20120623002052)
Migrating to AddAuditableNameAndAssociatedNameToAudit (20120624081510)
Migrating to AddOsFamilyToMedia (20120624093958)
Migrating to AddOsFamilyToPtable (20120624094034)
Migrating to AddAttributesToComputeResources (20120705130038)
Migrating to AddSomeIndexes (20120824142048)
Migrating to CreateEnvironmentClasses (20120905095532)
Migrating to AddLookupKeysOverrideAndRequired (20120905131841)
Migrating to AddLookupValuesCountToLookupKeys (20120916080843)
Migrating to CacheLookupValuesCount (20120916080926)
Migrating to AddIamRoleToImages (20120921000313)
Migrating to CreateTokens (20120921105349)
Migrating to AddBmcFeatureToProxy (20120927020752)
Migrating to AddTaxonomyIdsToHosts (20121003172526)
Migrating to ChangeDomainCharacterCount (20121011115320)
Migrating to CreateTrends (20121012170851)
Migrating to CreateTrendCounters (20121012170936)
Migrating to UpdateMediaPathLimit (20121015113502)
Migrating to CreateHostgroupClasses (20121018152459)
Migrating to AddLocalbootTemplate (20121026160433)
Migrating to RenameReplyAdressSetting (20121029164911)
Migrating to AddLocationsOrganizations (20121101141448)
Migrating to MigrateHypervisorsToComputeResources (20121118120028)
Migrating to CreateTaxableTaxonomies (20121118125341)
Migrating to AddMyTaxonomyToUser (20121119102104)
Migrating to AddSubscribeToAllHostgroupsToUsers (20121210214810)
Migrating to ChangeSmartVariableLength (20121218084123)
Migrating to RemoveReplayAddressSetting (20121219040534)
Migrating to AddIgnoreTypesToTaxonomy (20130109155024)
Migrating to AddDigestToMessages (20130121130826)
Migrating to AddStiToHosts (20130211160200)
Migrating to AddDigestToSources (20130228145456)
Migrating to RemoveDuplicateSnippets (20130329195742)
Migrating to AddLabelToHostGroup (20130409081924)
Migrating to AddStiToSettings (20130417110127)
Migrating to FixStiHostAuditableType (20130418134513)
Migrating to AddIdToUserHostgroup (20130419145808)
Migrating to AddLocaleToUsers (20130430150500)
Migrating to RemoveDuplicateFactNames (20130520152000)
Migrating to AddUniqueConstraintToFactName (20130520161514)
Migrating to AddUniqueConstraintsToFactValues (20130523131455)
Migrating to ChangeColumnLengths (20130530061844)
Migrating to RemoveEnvironmentFromHost (20130725081334)
Migrating to AddPublicToKeyPairs (20130804131949)
Migrating to ChangeComputeResourcePasswordToText (20130813105054)
Migrating to AddLdapFilterToAuthSources (20130814132531)
Migrating to DeleteOrphanedRecords (20130908100439)
Migrating to AddKeys (20130908170524)
Migrating to RemoveUnusedRoleFields (20130924145800)
Migrating to FixAuditableType2 (20131003143143)
Migrating to AddComposeFlagAndShortNameToFactName (20131014133347)
Migrating to AllowNullValuesOnFactValue (20131017142515)
Migrating to AddTypeToFactName (20131021125612)
Migrating to ChangeNameIndexOnFactName (20131021152315)
Migrating to UpdateForemanUrl (20131104132542)
Migrating to AddAncestryToFactNames (20131107094849)
Migrating to AddPxegrubLocalbootTemplate (20131122150434)
Migrating to RenameSeededTemplates (20131127112625)
Migrating to AddDescriptionToOperatingsystem (20131204174455)
Migrating to AddUserdataFlagToImages (20131223120945)
Migrating to CreateComputeProfiles (20131224153518)
Migrating to CreateComputeAttributes (20131224153743)
Migrating to AddComputeProfileToHostgroup (20131224154836)