Dirtsand on a VPS

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Re: Dirtsand on a VPS

Postby Surta » Sat Oct 12, 2019 8:43 am

I was afraid of that... but I'm not even there yet. I'm having some difficulties getting the server to run at all after a reinstallation. Suddenly I can't get it to connect to my Docker Postgres - getting this error:

ds-918> Error connecting to postgres: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?

Of course I blame it on my own skills, so before I ask any questions, I'll see if I can find some answers first :P
Surta
 
Posts: 88
Joined: Fri Mar 29, 2019 1:13 pm

Re: Dirtsand on a VPS

Postby Surta » Sat Oct 12, 2019 4:41 pm

Well, forget about the database for the time being, I started from scratch just to test (for who? Is there ANYONE still around who wants to create a server?) Anyway.

Following this: https://guildofwriters.org/wiki/DIRTSAN ... ng_Started

First observation: the string-theory installation is never mentioned, neither in the prerequisites nor anywhere in the instructions. Since this proved to be kinda vital (got error messages without it), you may want to include a link to zrax' instructions: https://github.com/zrax/string_theory/w ... ing_theory

Second observation: I tried to clone the Github to /opt/dirtsand which seems to be the place according to the above instructions. This results in an error after running
$ make && sudo make install

Show Spoiler


Obviously then I can't start the server using
bin/dirtsand dirtsand.ini
Since, well, duh. bin/dirtsand does not exist.

So, I tried to install it to my home directory instead, just to test. Running
$ cmake -DCMAKE_INSTALL_PREFIX=/home/surta/dirtsand ..
$ make && sudo make install
results in in the same error.

However, running the original lines:

cmake -DCMAKE_INSTALL_PREFIX=/opt/dirtsand ..
make && sudo make install
Does not result in any errors:

Show Spoiler


And, weirdly enough, ~/dirtsand/bin/dirtsand DOES get created.
Which I can then copy to /opt/dirtsand and get into the one step further which is the database error I mentioned above :)
Surta
 
Posts: 88
Joined: Fri Mar 29, 2019 1:13 pm

Re: Dirtsand on a VPS

Postby Tsar Hoikas » Mon Oct 14, 2019 4:47 pm

You should clone the git repository in a directory other than /opt/dirtsand as that is the install directory. The instructions probably operate under the assumption your clone directory is ~ or some subdirectory thereof.

Edit: I went through the wiki page and did a pass of cleanups/clarifications. Looks like it hadn't been modified in about 5 years...
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Dirtsand on a VPS

Postby Surta » Wed Oct 16, 2019 3:11 pm

Thanks!! Infinitely better :D

I have tested the updated instructions, and so far I might have found two tiny suggestions:

Now you need to load the initial structure for your DB, the SQL files being available in DIRTSAND's source code:

~/dirtsand$ sudo -u postgres psql -d dirtsand < db/dbinit.sql
~/dirtsand$ sudo -u postgres psql -d dirtsand < db/functions.sql
Your database should now be ready.


I would suggest you add
\q
Because well, it's obvious for database experts but it took me a little while to figure it out :)

Second one:

~/dirtsand$ sudo cp dirtsand.sample.ini /opt/dirtsand/dirtsand.ini
~/dirtsand$ sudo chown dirtsand /opt/dirtsand/dirtsand.ini
~/dirtsand$ sudo -u dirtsand nano dirtsand.ini


Should the last line not be sudo -u dirtsand nano /opt/dirtsand/dirtsand.ini ?

Other than that, all clear!

---

That said, I'm getting an error after running /opt/dirtsand/bin/dirtsand /opt/dirtsand/dirtsand.ini:

error while loading shared libraries: libstring_theory.so.3: cannot open shared object file: No such file or directory

Any idea what I might have done wrong?
Surta
 
Posts: 88
Joined: Fri Mar 29, 2019 1:13 pm

Re: Dirtsand on a VPS

Postby Tsar Hoikas » Wed Oct 16, 2019 6:00 pm

Surta wrote:
Now you need to load the initial structure for your DB, the SQL files being available in DIRTSAND's source code:

~/dirtsand$ sudo -u postgres psql -d dirtsand < db/dbinit.sql
~/dirtsand$ sudo -u postgres psql -d dirtsand < db/functions.sql
Your database should now be ready.


I would suggest you add
\q
Because well, it's obvious for database experts but it took me a little while to figure it out :)


I think you meant to quote a different spot since those don't open the interactive PostgreSQL session. I fixed a place where \q was really missing and the incorrect path.

Surta wrote:That said, I'm getting an error after running /opt/dirtsand/bin/dirtsand /opt/dirtsand/dirtsand.ini:

error while loading shared libraries: libstring_theory.so.3: cannot open shared object file: No such file or directory

Any idea what I might have done wrong?


I've seen this before myself, but I don't remember what I did to fix it. The good news is that Zrax just finished making string_theory a header-only library today. So, if you update your working copy of string_theory to the latest commit on master and rebuild, the probably should go away.
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Dirtsand on a VPS

Postby Surta » Thu Oct 17, 2019 12:12 pm

The good news is: your instructions are flawless now, even a rookie can use these to set up a server now. I mean if I can... anyone can ^_^
I managed to get my server going again and even sorted the Postgres error (by throwing away the old one and starting from scratch there as well).

The not so good news is that you were correct: the server improvements didn't solve my "real" problem:

[Lobby] Running on 0.0.0.0/14617
[Status] Running on 127.0.0.1/8080
ds-918> [Auth] Wrong Build ID from 123.45.67.89/62874: 26

My only sliver of hope for now is to create the client from scratch. So I went here https://guildofwriters.org/wiki/CWE:Getting_Started but it seems most of these packages are out of date (to put it mildly) or downright obsolete such as Visual Studio 2013 - I can't find it anywhere.

So before I get all worked up over this, could it be the client that is causing the problem, or anything else I might have missed?

As always, thanks :)
Surta
 
Posts: 88
Joined: Fri Mar 29, 2019 1:13 pm

Re: Dirtsand on a VPS

Postby Tsar Hoikas » Thu Oct 17, 2019 4:57 pm

Surta wrote:ds-918> [Auth] Wrong Build ID from 123.45.67.89/62874: 26


This is a pretty easy thing to fix. It looks like you're using the Gehn client. It isn't compatible with MOULa, so we use a different build ID for it. You'll need to change the DirtSand build ID in cmake by setting PRODUCT_BUILD_ID to 26 and recompiling. If you do choose this route, you'll want to make sure the age and SDL files are from the Gehn Shard repository as well, not the MOULa compatible repository.

Surta wrote:create the client from scratch. So I went here https://guildofwriters.org/wiki/CWE:Getting_Started but it seems most of these packages are out of date (to put it mildly) or downright obsolete such as Visual Studio 2013 - I can't find it anywhere.


I actually spent a few minutes working on that very page after fixing up some of the issues on the DirtSand page. Visual Studio 2013 is a little old at this point, but the download link on the wiki page does work. You'll have to sign in with Microsoft and get a free subscription to Visual Studio Dev Essentials. You might have to use the link provided a second time once you do all that.

Unfortunately, the PhysX 2.6.4 SDK download link is indeed broken. I was unable to find an alternative link in a quick google, so I'm not really sure what to do there. Edit: Deledrius has kindly provided us with an archive.org link to the SDK.
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Dirtsand on a VPS

Postby Surta » Fri Oct 18, 2019 9:04 am

Oh if only it could be that simple... yes I am using the Gehn client (since the Destiny client won't download the data files). If you don't mind, I would like to continue using the Gehn client, I mean, why reinvent the wheel when it's already rolling :)

I was already using the Gehn Shard repository files because Deledrius explained that those open the city right from scratch etc. The only question I still have is how do I set the PRODUCT_BUILD_ID to 26? I have no idea what Cmake is or how to alter it, so a pointer would be highly appreciated... is it as simple as just editing a file and then recompiling or is more involved?

Edit: I have followed your new instructions (very clear!) on the Client page and downloaded all the required tools. This might make for a great future project, but first I'd like to concentrate on the server itself :D

Another edit: I did find a file named CMakeLists.txt that seems to match the description - is that it?
Surta
 
Posts: 88
Joined: Fri Mar 29, 2019 1:13 pm

Re: Dirtsand on a VPS

Postby Deledrius » Fri Oct 18, 2019 10:56 am

The server build info is here: https://github.com/H-uru/dirtsand/blob/ ... xt#L22-L27

You should be able to set them when configuring CMake using the -DPRODUCT_BUILD_ID=26 option at the cmake command line, or find PRODUCT_BUILD_ID and set it to 26 if you're using some flavor of cmake-gui. Then just recompile & install. The client and server must match product numbers to connect.
User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1377
Joined: Mon Oct 01, 2007 1:21 pm

Re: Dirtsand on a VPS

Postby Surta » Fri Oct 18, 2019 3:01 pm

Oh fantastic, thank you so much. I ran the line:

cmake -DPRODUCT_BUILD_ID=26 -DCMAKE_INSTALL_PREFIX=/opt/dirtsand ..
And then of course the `make && sudo make install` line.

The GOOD news is that I no longer get this build error on the server side :D

The sad news is that I'm now stuck at the client saying "Logging in to Uru. Please wait"....... indefinitely and the server doesn't register my attempt at all :x Also, even when I use a wrong username/password, I don't get any message on the server about the erroneous login.

Another issue I'm running into that I didn't have before: I reinstalled my Windows machine since the last time I tinkered with the server. However since then my freebie domain was confiscated by Freenom so I switched to my regular domain. I updated the repair.ini and server.ini using PlasmaShop and uploaded those to the .datafiles/data/Client directory. Now they are downloaded each time I fire up the client. Of course I wanted to run Hoikas' manifest.py file so I installed Python, but now I'm getting

File "manifest.py", line 23, in <module>
from PyHSPlasma import *
ModuleNotFoundError: No module named 'PyHSPlasma'

I searched Google far and wide, but I can't seem to find this module...

I really apologize for taking up so much of your time, sometimes it feels like I'm taking one step forward and 9/10th of a fall back again. But I honestly feel it's SO close... I just don't want to give up!
Surta
 
Posts: 88
Joined: Fri Mar 29, 2019 1:13 pm

PreviousNext

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 0 guests

cron