Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Agrikk
Oct 17, 2003

Take care with that! We have not fully ascertained its function, and the ticking is accelerating.
I've been futzing around in Ubuntu 16 and I've broken Sudo.

Any command that I enter prefixed by sudo results in a blank newline that capture whatever I type without actually doing anything until I hit Control-Z to kill that process. There are no errors, just an endless blank space until I kill the process.

I am deploying from an image, and all new instances from this image exhibit this behavior. How do I fix this?

Adbot
ADBOT LOVES YOU

Agrikk
Oct 17, 2003

Take care with that! We have not fully ascertained its function, and the ticking is accelerating.
This is what I thought was a basic Apache/PHP server on AWS EC2 with some environmental variables and aliases shoved into /.bashrc.

I also installed some packages whose names escape me to allow colors for things like ls.

I’ve done nothing explicit to sudo membership and everything was working fine for a few days through reboots and snapshot/AMI imaging.

I’ll try the uninstall/reinstall route and see where that gets me.

Agrikk
Oct 17, 2003

Take care with that! We have not fully ascertained its function, and the ticking is accelerating.
How do I configure an ubuntu server to register its hostname with windows DNS (serverA) when it receives a DHCP address from a different server (serverB)?

I have control over the DNS server but not the DHCP server and these servers are AWS EC2 servers fwiw. Googling is lousy with answers that have DHCP and DNS on the same windows box but it doesn't seem applicable here.

Agrikk
Oct 17, 2003

Take care with that! We have not fully ascertained its function, and the ticking is accelerating.

SamDabbers posted:

Typically you don't want non-domain-joined client machines to be able to update the DNS zone directly, so the DHCP server itself registers the host name the client provides to it with the DNS server using some sort of shared key authentication. Active Directory does streamline the plumbing between the Windows DHCP server and the AD DNS, but a similar setup is relatively straightforward between e.g. BIND and ISC dhcpd.

Edit: this might help OP
https://ephemeralelectrons.wordpres...ows-dns-server/

Thanks for the response. That was an interesting article as it presents three options:

1. Configure DHCP server to perform DNS registration on behalf of the clients
2. Join the Linux devices to AD domain and configure them to dynamically update
3. Setup a new sub-domain running a dedicated Linux BIND server and configure DNS forwarding on Microsoft DNS server.


A pity I'm looking at option two and the author never explores past the first article. :rolleyes:

Agrikk
Oct 17, 2003

Take care with that! We have not fully ascertained its function, and the ticking is accelerating.
This is probably a really simple question if you know linux, which I don't:

What is the most direct route to getting a thousand images copied every hour from a windows (AWS EC2) server onto an Amazon EFS file store mounted on a pool of Ubuntu servers?


I have an app server that generates approximately one thousand graph images every hour. It then takes these images and copies them directly to an AWS FSx file share. This share is accessed by a pool of Windows IIS servers that then serves them to the internet.

What I'd like to do is replace the Windows IIS web pool with an Ubuntu Apache web pool. My problem is, since AWS EFS cannot be accessed from a windows server directly, I need to find some way to copy the files off of the windows application server to the EFS file store that is mounted on the Ubuntu servers.

How do I accomplish this?

Windows-to-windows is a simple robocopy job. but windows-to-ubuntu? I have no idea.

Agrikk
Oct 17, 2003

Take care with that! We have not fully ascertained its function, and the ticking is accelerating.

Sheep posted:

FSx for Windows (and FSx for Lustre, which isn't being used here) and EFS are not the same thing.

You can mount FSx for Windows shares from Linux, though it seems a little cumbersome. Alternatively some slightly-to-very terrible options are:

1. Use WinSCP and drag and drop the folder. Pretty straightforward and my preferred solution were I doing this exactly once.

This is an hourly batch job.

quote:

2. Install NFS client for Windows and mount the EFS share directly in the Windows machine: it's available in control panel/programs/turn Windows features on.

Amazon EFS is not supported on Windows instances.

quote:

3. Install Samba on the Ubuntu machine and make a share available and reachable from the Windows machine.

Like the above poster suggested. This seems the most promising for my workload.

quote:

4. Install WSL and use rsync.

This is interesting. I've not heard about this.

quote:

If you really want to go the rsync route I have a version I built that doesn't require Cygwin, but frankly it's terrible.



Pablo Bluth posted:

Windows now has OpenSSH shipped by default, so you should have access to scp as a way to copy files. Setup authorized_keys for passwordless access in a script (on a suitably low permission linux account), then write a simple script and schedule it to copy every hour. Use -u or --ignore-existing to avoid recopying old files.

I like this idea. It requires the least configuration of the destination web servers, or the creation of a jump box for the windows share.

Agrikk
Oct 17, 2003

Take care with that! We have not fully ascertained its function, and the ticking is accelerating.
From exierience as of yesterday, AWS EFS won't work on windows. Apparently Windows NFS client is implemented slightly differently than AWS EFS. After hours of trying I couldn't make a windows EC2 box see EFS. This was confirmed in a support case I opened up about this very thing.

Hence my need for this ask.

Agrikk
Oct 17, 2003

Take care with that! We have not fully ascertained its function, and the ticking is accelerating.

Ffycchi posted:

Oh god please use NFS over samba. Yes, you can use NFS shares on windows.

Also especially for thousands of SMALL files, it's basically built for NFS.

NFS has notably better transfer rates than SMB with small and medium sized files. SMB and NFS are even with large files.

The only things SMB does better is sharing over the internet due to thinks like NAT translation, and an idiot proof setup that requires at most one Braincell. NFS requires a bit more due to ACLs but that's also a boon in terms of granular control.

Also robocopy and rsync are the correct answers outside that.


This raises an interesting situation in that I'd now be mounting an Amazon EFS filesystem to an Ubuntu EC2 instance, then sharing that mount point as a new mount point via NFS to a windows EC2 host. Ugh. This sounds kludgy as hell.

Agrikk
Oct 17, 2003

Take care with that! We have not fully ascertained its function, and the ticking is accelerating.
I have an Ubuntu EC2 instance with 8GB RAM that is constantly running low on memory (<2%) and I am having a hard time finding the process that is using it.

running "ps aux | awk '{print $6/1024 " MB\t\t" $11}' | sort -n" produces

code:
[a bunch of items using 0 memory]
0.164062 MB             /usr/sbin/blkmapd
0.1875 MB               /usr/sbin/rpc.idmapd
0.8125 MB               sort
0.839844 MB             /usr/sbin/acpid
1.71094 MB              /sbin/agetty
2.12891 MB              less
2.16406 MB              /sbin/agetty
2.33594 MB              /usr/sbin/atd
2.95703 MB              /usr/sbin/cron
3.17969 MB              awk
3.25391 MB              ps
3.53125 MB              /usr/sbin/irqbalance
3.70312 MB              /sbin/rpcbind
3.8125 MB               watch
3.81641 MB              watch
3.90625 MB              top
4.67578 MB              /usr/bin/dbus-daemon
4.72656 MB              (sd-pam)
4.73047 MB              /lib/systemd/systemd-udevd
4.89453 MB              /usr/sbin/rsyslogd
4.94531 MB              -bash
5.23828 MB              /usr/sbin/oddjobd
5.89453 MB              /lib/systemd/systemd-timesyncd
6.05469 MB              sshd:
6.0625 MB               /lib/systemd/systemd-networkd
6.61328 MB              /usr/lib/policykit-1/polkitd
7.13672 MB              sshd:
7.20312 MB              /usr/lib/accountsservice/accounts-daemon
7.28516 MB              /lib/systemd/systemd-logind
7.29688 MB              /usr/sbin/smbd
8.98438 MB              /usr/sbin/smbd
8.99609 MB              sshd:
9.22656 MB              /lib/systemd/systemd
9.46484 MB              /usr/sbin/smbd
9.78125 MB              /lib/systemd/systemd-resolved
12.1367 MB              /usr/sbin/snmpd
12.7539 MB              /lib/systemd/systemd
13.5273 MB              /usr/sbin/nmbd
16.4414 MB              /snap/amazon-ssm-agent/4046/amazon-ssm-agent
17.5 MB         /usr/bin/python3
17.5312 MB              /sbin/multipathd
19.9141 MB              /usr/bin/python3
22.0977 MB              /usr/sbin/smbd
24.5391 MB              /usr/sbin/rpc.mountd
25.3203 MB              /lib/systemd/systemd-journald
37.3047 MB              /usr/lib/snapd/snapd
38.0859 MB              /usr/sbin/apache2
40.3086 MB              /snap/amazon-ssm-agent/4046/ssm-agent-worker
63.8555 MB              /usr/sbin/apache2
65.6562 MB              /usr/sbin/apache2
66.4414 MB              /usr/sbin/apache2
66.9531 MB              /usr/sbin/apache2
67.1367 MB              /usr/sbin/apache2
67.168 MB               /usr/sbin/apache2
68.332 MB               /usr/sbin/apache2
69.1641 MB              /usr/sbin/apache2
69.2734 MB              /usr/sbin/apache2
73.6953 MB              /usr/sbin/apache2
which is roughly one gig. How can I locate what is using the other 7 gigs?

Agrikk
Oct 17, 2003

Take care with that! We have not fully ascertained its function, and the ticking is accelerating.
vmstat results:

code:
ubuntu@ip-10-1-101-214:~$ vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0 386704 122676 7049068    0    0     0     4    6    7  0  0 99  0  0
Huh. So it looks like the bulk of my physical memory (7g) is simply being used as cache? So if I'm understanding this right, this is perfectly normal behavior for RAM utilization by the OS and I shouldn't be alarmed?

Which then means any physical memory alarms can be ignored unless other symptoms manifest themselves. Is that right?

Agrikk
Oct 17, 2003

Take care with that! We have not fully ascertained its function, and the ticking is accelerating.

Bob Morales posted:

What is setting the alarms? Some kind of monitoring software?

You're not swapping so you're fine.

Yeah. My monitoring software is reporting ~ 98% memory use and I was trying to figure out if I needed to resize this instance or if this was normal behavior. It looks like since I have 8gigs of physical RAM on the instance and 7gigs of it is used for cache I'm fine.

Agrikk
Oct 17, 2003

Take care with that! We have not fully ascertained its function, and the ticking is accelerating.
I am building a web cluster using Ubuntu 22.04 and Apache2 for the front end(s) and a TrueNAS NFS share on the backend for the file store.

I am trying to change ownership of the NFS share to allow the web servers to perform updates and file writes but I'm bumping into a permissions issue. So I'm running the following command

quote:

sudo chown www-data:www-data /nfs/web/files/

and I'm getting

quote:

chown: changing ownership of '/nfs/web/files': Invalid argument

I'm reading that the invalid argument issue is stemming from it being an NFS share mounted locally, but I'm not sure how to rectify it. Can someone help point me in the right direction?

Adbot
ADBOT LOVES YOU

Agrikk
Oct 17, 2003

Take care with that! We have not fully ascertained its function, and the ticking is accelerating.

Saukkis posted:

Use 'id www-data' to check what are the UID and GID and change the ownership to those in the TrueNAS.

...and how do I go about changing ownership in TrueNAS? I assume there's some kind of mapping function that'll assign a user or group on the Ubuntu boxes to a user on the TrueNAS box?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply