Installation Issues

More
13 Dec 2014 06:14 #1 by Ashlan
I'm trying to get things going, have loaded the sql database and downloaded things... using web faction and node 10.31 (and also tried 10.24), I am getting this error:

[ashlan@web351 Havoc]$ /home/ashlan/webapps/node/bin/node ./havoc.js
havoc engine init
Sat Dec 13 06:08:36 loaded base language file: strings.eng
detected & loaded language files: strings.eng
Sat Dec 13 06:08:36 detected component files: act, char, db, item, quest, server, user, world
Sat Dec 13 06:08:36 havoc.loadComponent: act
Sat Dec 13 06:08:36 loaded component: act init, initPlugins, initChar, reloadPlugin, basic, _events, _registered
Sat Dec 13 06:08:36 havoc.loadComponent: char

/home/ashlan/Havoc/node_modules/jsdom/node_modules/contextify/node_modules/bindings/bindings.js:83
throw e
^
Error: /home/ashlan/Havoc/node_modules/jsdom/node_modules/contextify/build/Release/contextify.node: wrong ELF class: ELFCLASS32
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at bindings (/home/ashlan/Havoc/node_modules/jsdom/node_modules/contextify/node_modules/bindings/bindings.js:76:44)
at Object.<anonymous> (/home/ashlan/Havoc/node_modules/jsdom/node_modules/contextify/lib/contextify.js:1:96)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

Any ideas? The guys at my server web faction say that there could be a binary issue but since I installed their versions of node from their control panel, I'm not sure if that is really the problem. I also tried to load once before I installed the sql database.

Please Log in or Create an account to join the conversation.

More
13 Dec 2014 06:42 - 13 Dec 2014 07:33 #2 by Ashlan
Figured out how to check my node version:

node: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped

Any suggestions? :cheer:
Last Edit: 13 Dec 2014 07:33 by Ashlan.

Please Log in or Create an account to join the conversation.

More
13 Dec 2014 15:49 #3 by plamzi
Try updating node to v0.10.5. There's an npm module called "n" that makes node updates easier.

If it doesn't work, you can also comment out the "jsdom" include statement for now. It is only used in one example mob script and so it's not essential.

Please Log in or Create an account to join the conversation.

More
14 Dec 2014 04:35 #4 by Ashlan

plamzi wrote: Try updating node to v0.10.5. There's an npm module called "n" that makes node updates easier.

If it doesn't work, you can also comment out the "jsdom" include statement for now. It is only used in one example mob script and so it's not essential.

What file would I be commenting that out of? I'm having trouble locating it. Also, assuming it works, what's the effected mob so that I can remove it?

Please Log in or Create an account to join the conversation.

More
14 Dec 2014 05:00 #5 by plamzi
It's in char.js.

You should have a way to search recursively for something in multiple files. Assuming you're under Linux:
find . | xargs grep jsdom

There are two mobs using that script. You can see them in the database in Procs. You don't need to worry about removing them--their progs are just not going to work, but they won't crash you or anything.

Please Log in or Create an account to join the conversation.

More
14 Dec 2014 05:11 #6 by Ashlan
Okay, thanks :)

It got further this time, but then it hit a new error:

fs.js:695
return binding.stat(pathModule._makeLong(path));
^
Error: ENOENT, no such file or directory './syslog'
at Object.fs.statSync (fs.js:695:18)
at new Tail (/home/ashlan/Havoc/node_modules/tail/tail.js:67:16)
at EventEmitter.havoc.init (/home/ashlan/Havoc/havoc.js:75:16)
at Object.<anonymous> (/home/ashlan/Havoc/havoc.js:266:8)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)

Please Log in or Create an account to join the conversation.

More
14 Dec 2014 06:01 #7 by plamzi
That just means it's trying to read back the syslog and not finding the file. If you're not putting the stdout into a file called ./syslog, that's normal. You can do 'touch syslog' to create an empty one but I recommend actually redirecting your stdout there (see the included upstart script). This will make your in-game syslog event able to show you debug information.

Please Log in or Create an account to join the conversation.

More
05 May 2019 18:40 #8 by aldie
Hi, this is from freshman@mud.tap.de (one of the admins of aldie@aldebaran-mud.de)

Here are some experiences from my last few days which I'd like to share with anyone interested:

To get the portal running on a test machine for debugging, I installed a common linux. I used an OpenSuse 15 (server edition, no X-Windows and Desktop) from OSboxes. I used Suse because I'm used to it from the ancient past, should work with other decent linux in a similar fashion.

Among other things (like installing apache2) I installed node.js and also c++ as I later learned that npm will compile modules with C++. Suse does this
like:

zypper install gcc-c++
zypper install nodejs

In my case it installed a node Version 8.15.1

For the wsproxy to run (for testing), you can go to the proxy directory and basically run "node wsproxy.js".

However, in my case, some modules were missing. I had to do:

npm install uglify-js
npm install websocket
npm install iconv-lite

You can do all this from within the proxy dir (where the modules are installed).

For a production environment you might want to arrange files and startup scripts in a different way..

However, wsproxy (or node.js to be exact) will complain that modern iconv-lite is incompatible with the deprecated usage in wsproxy.js.
Some modifications are required. I added these in the attached zip file in a patch file wsproxy.js.diff which you should be able to apply with
path -p0 < wsproxy.js.diff (or by hand with your editor of choice).
I also added the whole wsproxy.js file for your reference (but you might have a newer version of it with some other fixes)

Also wsproxy.js complains a missing chat.json. I assume this links to some other mudportal module which is not included with the mudportal.app.
You can just create a file containing only [] (like with: echo "[]" > chat.json ) to shut it up.

With this I could run the proxy, still I had issues to connecting to any, even my, mud. Generally you need to specify a proxy, either in the URL or the portal files. For example like:

http://<webserver-host>/portal/?host=<mud-host>&port=<mud-port>&proxy=ws://<proxy-host>:6200

Alas, js/modules/Socket.js contains explicit references to cloudgamer.org. Esp. o.proxy is cleared only when cloudgames is used as a proxy. Only then it will ever attempt to connect to your mud.

I do not know what is the reason for using o.proxy as a flag in this fashion, but you need to adapt at least the second reference to cloudgamer to your specific setup.

Again, I included a diff to Socket.js showing you what I mean. There I use 192.168.132.129 which is my lab webserver... put in YOUR server ip or hostname.

This got ME running, at least for means of debugging.

May the source be with you.

Good luck,
Freshman. (ok, here I'm called aldie)
Attachments:

Please Log in or Create an account to join the conversation.