LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-02-2018, 10:21 AM   #1
regis135
LQ Newbie
 
Registered: Jul 2018
Posts: 4

Rep: Reputation: Disabled
Error connecting via spacecmd to localhost


I've installed Spacewalk 2.7 on 2 separate servers and everything is working fine. However, I happened to notice something when using spacecmd. If I give spacecmd the fully qualified name of the host, it works fine, but if I attempt to connect via localhost, I get a certificate error that localhost does not match the FQDN.

# spacecmd -u automated -p fakepass -s fakename.com

INFO: Connected to https://fakename.com/rpc/api as automated

# spacecmd -u automated -p fakepass -s localhost -d

CertificateError: hostname 'localhost' doesn't match 'fakename.com'
ERROR: Failed to connect to https://localhost/rpc/api

This makes sense, since during the spacewalk install it asked for the hostname and we gave it the FQDN.

The only curious thing is we also have 2 Red Hat Satellite 5.7 servers that I inherited and both of those allow a spacecmd connection via BOTH the FQDN and localhost.

# spacecmd -u automated -p fakepass -s localhost

INFO: Connected to https://localhost/rpc/api as automated

# spacecmd -u automated -p fakepass -s fakename.com

INFO: Connected to https://fakename.com/rpc/api as automated

I'm not sure that even matters, but that was something that was pointed out and I am now curious how localhost is working on the Satellite side and where that was set, vs not working on the Spacewalk side.
 
Old 07-05-2018, 09:01 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
What are the contents of /etc/hosts?

Code:
ping localhost
and
Code:
ping fakename.com
should return valid results.

Code:
127.0.1.1 fakename.com
in /etc/hosts should help, if not solve it directly.
Compere /etc/hosts on working systems vs this one.
 
Old 07-05-2018, 11:19 AM   #3
regis135
LQ Newbie
 
Registered: Jul 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks for the response.

Working Red Hat Satellite 5.7 server hosts file

127.0.0.1 localhost.localdomain localhost
192.168.0.10 fakename.com fakename

ping localhost works
ping fakename.com and ping fakename works

Non-Working Spacewalk 2.7 server hosts file

127.0.0.1 localhost.localdomain localhost
192.168.0.20 fakename2.com fakename2

ping localhost works
ping fakename2.com and ping fakename2 works
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Error connecting to IMAP server: localhost. shams Linux - Server 1 04-23-2015 08:08 AM
error connecting to localhost 127.0.0.1 in apt-get and all front-ends I have for it sehku17 Linux - Networking 2 09-23-2007 02:25 PM
Squirrelmail Error connecting to IMAP server: tls://localhost cccc Linux - Server 4 01-12-2007 01:39 AM
Squirrelmail Error connecting to IMAP server: tls://localhost cccc Debian 1 09-18-2006 01:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration