Ubuntu 22.04 Installation Woes

Hi there! I have a bunch of issues that I am trying to get to the bottom of. The larger problem at hand is that I do not know where to look for the appropriate logs so I’ve just been kind of fishing about.

Bad behaviors I am trying to resolve:

  • When rc.local runs I get a no acceptor error referencing permissions or the port being in use. lsof indicates that nothing is using the port. Running root’s onboot.sh script as root appears to run things fine. Running the ares user onboot.sh as the ares user appears to run things fine as well.
  • While things appear to run when manually executed, visiting the web portal just spins forever. I see the requests in nginx’s logs for various things but chrome never advances beyond showing the titlebar change and a white page.


  • I can connect to the game via the telnet client just fine.
  • nginx does not have any errors in its logs.
  • Running the portal and the game in debug mode doesn’t appear to generate any more information. I see the portal service the root GET with a 200 and that’s it after that.
  • CPU load is near 0.
  • Memory committed is about 700MB/2000MB.

Any suggestions on where else to look?

Install Steps
apt install -y git
apt-get -y install dialog apt-utils
apt-get -y -o Dpkg::Options::="--force-confnew" upgrade
apt-get install -y binutils
apt-get install -y apt-transport-https
apt-get install -y ruby-bundler
apt-get install -y ruby-dev
apt-get install -y nginx
apt-get install -y nodejs
apt-get install -y npm
apt-get install -y python3
apt-get install -y redis-server
apt-get install -y fail2ban
apt-get install -y unattended-upgrades
dpkg-reconfigure -f noninteractive unattended-upgrades
service redis-server start
service redis-server restart
adduser --disabled-password --gecos "" ares
addgroup www
usermod -a -G sudo,www,redis ares
sudo chmod 755 /home/ares
apt install libhugetlbfs-bin
echo "sudo -u ares -i '/home/ares/onboot.sh'" > /root/onboot.sh
echo "sudo hugeadm --thp-never" >> /root/onboot.sh
chmod +x /root/onboot.sh
if [ -e /etc/rc.local ]
    sed -i -e '$i \/root/onboot.sh &\n' /etc/rc.local
    printf '%s\n' '#!/bin/bash' '/root/onboot.sh &\n' 'exit 0' | sudo tee -a /etc/rc.local
chmod +x /etc/rc.local
systemctl enable redis-server
chown ares /var/www/html
chgrp redis /etc/redis/redis.conf 
chmod g+rwx /etc/redis/redis.conf  
chgrp redis /var/lib/redis
chmod g+rwx /var/lib/redis
chgrp redis /var/lib/redis/dump.rdb
chmod g+rwx /var/lib/redis/dump.rdb
chgrp www /etc/nginx/sites-available/default
chmod g+rwx /etc/nginx/sites-available/default
apt-get update
apt-get install -y autoconf automake bison libc6-dev libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libtool libyaml-dev make pkg-config sqlite3 zlib1g-dev libgmp-dev libreadline-dev libssl-dev
apt install -y snapd
snap install core
snap refresh core
snap install --classic certbot
ln -s /snap/bin/certbot /usr/bin/certbot
echo "%sudo   ALL=(ALL:ALL) ALL,NOPASSWD: ALL" >> /etc/sudoers

# Install part
su ares
cd ~
echo "cd aresmush" > onboot.sh
echo "bin/startares&" >> onboot.sh
chmod +x onboot.sh

sudo apt install -y autoconf automake bison libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libtool libyaml-dev pkg-config sqlite3 zlib1g-dev libreadline-dev

curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -

\curl -sSL https://get.rvm.io | bash -s stable
source $HOME/.rvm/scripts/rvm
rvm install ruby-3.1.2
rvm use ruby-3.1.2
rvm --default use ruby-3.1.2

echo "source /home/ares/.rvm/scripts/rvm" >> "/home/ares/.profile"
echo "rvm use 3.1.2" >> "/home/ares/.profile"

gem install bundler
gem install rake

git clone https://github.com/aresmush/aresmush.git
git clone https://github.com/aresmush/ares-webportal.git

cd /home/ares/aresmush
cp -r install/game.distr game

mkdir game/logs
chmod +x bin/*


cd /var/www/html/

ln -s "$/home/ares/aresmush/game" game

cp "/home/ares/aresmush/install/nginx.default" /etc/nginx/sites-available/default
sudo service nginx restart

cd "/home/ares/ares-webportal"
chmod +x bin/*

sudo npm install -g npm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

nvm install 18
nvm use 18

npm install -g ember-cli

cd "/home/ares/aresmush"
bundle install
bundle exec rake initmigrations

# Certs

#cd "/home/ares/aresmush"

# Reboot

sudo reboot

Hi! I’m a little confused by the install steps you quoted, as that doesn’t look like the standard Ares installer. Are you trying to do something custom?

But if you can connect to the game via client, then at least that’s installed correctly.

If it’s just the web portal not working, I’d try running:

cd ares-webportal

And check for errors.

You can also look for errors on the browser’s Javascript developer console.

It is custom but based on the ‘self install’ scripts. The developer console shows the following:



bin/deploy completes successfully.

I’ll look in to this aresconfig thinger. Thanks!

I would check your nginx config. Just because it’s running doesn’t mean it’s set up correctly. The error messages say that it can’t find aresconfig.js, which is supposed to be accessible to the website via symbolic link (set up during one of the install steps). You can compare to the install template here: https://github.com/AresMUSH/aresmush/blob/master/install/templates/nginx.erb

I’m afraid my ability to troubleshoot custom installs is limited. You could always start over with the 1-click install, or just run the stock install scripts on a fresh droplet. Last I knew, they worked seamlessly on 22.04.

That was enough for me to get nginx in a good spot so the portal’s good now. Last bit is to find out why I can’t bind ports when the game tries to run via rc.local but is fine when I run the onboot scripts from root or the ares user.

Adding a 5 second sleep to the beginning of my rc.local fixed the binding issues.

1 Like

Is there a technical reason that rc.local is used over a systemd service?

It worked :slight_smile:

I vaguely recall messing around with systemd, but it’s been many years and I don’t really remember why it didn’t work.

1 Like