AsydSolutions / ASYD

ASYD is a powerful, versatile, agentless and easy-to-use server deployment automation system, with integrated web interface and monitoring.
https://www.asyd.eu
GNU General Public License v3.0
34 stars 6 forks source link

[faq] Troubleshooting #81

Open Choms opened 9 years ago

Choms commented 9 years ago

Q. On Ruby 2.2.0, sometimes after upgrading ASYD you can get this error message: dm-serializer-1.2.2/lib/dm-serializer/to_yaml.rb:15:in 'included': undefined method 'add_domain_type' for Psych:Module (NoMethodError)

A. Reinstall those gems: gem uninstall data_mapper dm-serializer sinatra bundle install

Choms commented 9 years ago

Q. ASYD won't start with error: .gem/ruby/gems/ffi-1.9.8/lib/ffi/library.rb:133:in `block in ffi_lib': Could not open library '.gem/ruby/gems/process_shared-0.2.0/lib/process_shared/posix/helper.so'

A. Fixed on pmahoney/process_shared#4

Choms commented 9 years ago

Q. When adding a host which displays "-bash: warning: setlocale: LC_ALL: cannot change locale" when ssh-ing to it (no locales package installed), the frontend throws a stacktrace.

A. Once installing the necessary packages and configuring locales correctly with the below commands, adding a host works without problems.

apt-get update
apt-get -y install locales
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
echo "#  File generated by update-locale" > /etc/default/locale
locale-gen
update-locale
fbrandstetter commented 7 years ago

Error adding the host proxmox1: undefined method `chomp' for nil:NilClass

What does that mean?

Choms commented 7 years ago

That's a tricky one, it means there was some kind of issue adding the host so it couldn't retrieve all the necessary information. Basically, it could not retrieve some (or all) system info and failed processing it.

This was a common error in the past when you provide a wrong password as ASYD could not connect to the host and get any info at all, however we fixed that concrete bug in a previous release and now if you provide an incorrect password it just tell you so, so it must be something else, like it lost connectivity while retrieving the data or similar (I think there's networking issues at some place, the internet is acting funny today).

Could you try and re-add the same host and see if that happens again? If so, could you tell me the ASYD version you are using, the OS of the machine you are trying to add (uname -a) and see on log/asyd.log if there's something relevant.

Cheers!

fbrandstetter commented 7 years ago

Hey,

Thanks for your fast answer!

I've made sure that I can ping the other host which should be added, as well I tried to reach ports on the other server. Everything there seems to work and the return / going to routing path is identical.

The password is correct, as I can login using putty to the machine.

OS on both machines: Linux asyd 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux ( Debian Jessie 8.6 )

log/asyd.log doesn't show anything which could help.

Choms commented 7 years ago

Ok, so I just released a new patch that should output the full trace on log/asyd.log, just update ASYD with "git pull" and restart it (./asyd.sh restart). Then try adding the host again and check if this time there's something useful in the log file :)

fbrandstetter commented 7 years ago

After installing HighLine, I'm getting:

root@10.0.5.7's password: stty: standard input: Inappropriate ioctl for device stty: standard input: Inappropriate ioctl for device stty: standard input: Inappropriate ioctl for device

root@10.0.5.7's password: stty: standard input: Inappropriate ioctl for device stty: standard input: Inappropriate ioctl for device stty: standard input: Inappropriate ioctl for device

root@10.0.5.7's password: stty: standard input: Inappropriate ioctl for device stty: standard input: Inappropriate ioctl for device stty: standard input: Inappropriate ioctl for device

100.64.12.1 - - [21/Oct/2016:20:21:59 +0100] "POST /host/add HTTP/1.1" 303 - 10.2078

fbrandstetter commented 7 years ago

After hours of debugging now, I've finally brought it to that issue:

Error adding the host FRANKFURT: Authentication failed for user root@

Choms commented 7 years ago

Hi again,

The last error is just a common auth failure message (wrong user/password, careful about the spaces if you are copypasting the password, etc.)

About the actual issue, the ioctl thing, looks like some stty configuration is messing things up with the net-ssh connector (on the setup it opens a stream to the machine so it can send/receive interactively to verify that the permissions for the user are all correct). I've tested on a fresh Debian 8.5 minimal installation (to be specific a vultr instance) and works just fine out of the box, so dependencies should not be an issue. Can you check your .bashrc and see if you have any stty line that might be changing the default behavior and causing this issue?

Cheers!

JustDevZero commented 7 years ago

@fbrandstetter Also... be sure that in /etc/ssh/sshd_config the line: PermitRootLogin is set to YES or atleast to without-password (if the ssh key was already there).

fbrandstetter commented 7 years ago

Hello Choms,

The .bashrc was the issue! I've had some fancy .bashrc in order to make putty look a bit better, although this destroyed things. I've switched back to the default .bashrc from Debian and it works like a charm.

Thanks for your assistance and thank you for this product! :-)

Choms commented 7 years ago

I'm cleaning up a bit this thread (it's the troubleshooting one after all).