Why are you using Java 9? java 8 is the current stable version and should be available on Ubuntu.
If you can’t connect with any client, this might be a firewall issue then. You should open 5222 port on that server. You can first try to login form the same server (if it has GUI) by installing some client on it. It doesn’t have to be Spark. Can be any xmpp client, e.g. Pidgin.
Your server’s hostname and server name (which is xmpp domain) are shown on Admin Console’s first page. You should be putting “server name” into Spark’s or other client’s server/domain field. But of course, this domain name should be resolvable in your network (this means it should be in your DNS, or you have to additionally add IO on the Advanced setting in Spark).
There is no instructions for installing Spark on Linux. You either install deb and then find and launch it via term, or extract and run tar.gz version via term. Java 8 should work for Spark. Tar.gz version has Java 8 included already. You can use this version, as it has more detailed error messages https://bamboo.igniterealtime.org/artifact/SPARK-INSTALL4J/shared/build-900/Inst all4j/spark_2_8_0_900.tar.gz