Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brenda Logs #10

Open
dalekurt opened this issue Jul 8, 2014 · 7 comments
Open

Brenda Logs #10

dalekurt opened this issue Jul 8, 2014 · 7 comments

Comments

@dalekurt
Copy link

dalekurt commented Jul 8, 2014

Hi James,

I'm having a challenge locating the log files for brenda on the nodes.

@Berryu
Copy link

Berryu commented Oct 18, 2014

When running the instances, type

brenda-tool ssh tail log

@aliasguru
Copy link

I've got a very similar issue.

Basically, when I run the brenda-tool ssh tail log command, it IS executed on each instance, but each instance returns the same error to me:
bash: log: command not found

Even when I ssh to a particular instance and run the command tail log there, the error persists. It might simply be that the location of logs has changed, or a command isn't available in recent Ubuntu distros, I don't know.

@aliasguru
Copy link

Never mind, just found it: The command shall slightly change to brenda-tool ssh tail /mnt/brenda/log

Seems like on every instance, brenda mounts a drive on /mnt/brenda for me and puts the logfile there. I'm using a custom AMI by the way, created based on Ubuntu 14.04.

@woutervddn
Copy link

At my end, everthing works as expected.

@aliasguru:
It indeed mount to /mnt/brenda, but normally it should create symlinks ln -s /mnt/brenda/ /root/.

Since brenda SSH commands are executed as root, you should be able to view them in as tail log. So either your machine does not act as root, or something goes wrong when the symlink is created, or your SSH 'start' directory is not /root. If you start in / it might explain why it doesn't show up.

Are you using your own AMI? If so, on which distro is it based? What is that distro's default starting dir when connecting to it via ssh?

@aliasguru
Copy link

@woutervddn As mentioned above, I created my own AMI and used Ubuntu 16.04 as a base (I misremembered the OS version in my post above, just checked it now). In that instance, I have to use the user ubuntu to log in. What I did in the end was to generate a symlink via sudo ln -s /mnt/brenda/log ~/log to be able to use the brenda-tool command as indicated, and created an AMI afterwards. This works fine now.

@woutervddn
Copy link

woutervddn commented Apr 11, 2017

@aliasguru In Ubuntu 16.04 logging in as Root over ssh is disabled. Even when you enable it, it will still cease to work whenever you restart (or spawn) the machine. This behavior is due to AWS's configuration in /etc/cloud/cloud.cfg. This can be changed by following the procedure written here: http://serverfault.com/questions/412113/aws-how-to-stop-cloud-init-from-disabling-root-login

The code seems to check a disable_root boolean configuration value, so I'm guessing that you need to set this in /etc/cloud/cloud.cfg:
disable_root: 0

Took me a couple hours (and about 10 AMI iterations) to figure it out...

@aliasguru
Copy link

this works great, thanks for the tip! I was using disable_root: false, as the initial line was disable_root: true, but besides that, login now works as it should! Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants