COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > NINJAM Discussion > NINJAM User Discussion

Reply
 
Thread Tools Display Modes
Old 11-28-2018, 01:48 PM   #1
Alkamist
Human being with feelings
 
Join Date: Dec 2011
Posts: 506
Default Compiling the server program on Windows?

Hey there!

I've been trying to figure out how to compile the Ninjam server program to host a server on Windows 10. I downloaded the source code and I'm kind of lost. I'm not very experienced with this sort of thing so I don't know what to do.

I see there are some old VC++ 6 project files, am I supposed to get VC++ 6 to compile it? What would be the easiest way for me to compile the server program?

If anyone could give some instructions for a dummy that would be great! I'm on Windows 10 64 bit.
Alkamist is offline   Reply With Quote
Old 03-12-2019, 09:31 PM   #2
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 301
Default

bump. same question. how to compile the sources on Win10 64bit. current visual studio 2017 & compiler has issues. anybody?
brummbear is offline   Reply With Quote
Old 03-13-2019, 04:42 PM   #3
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 301
Default

OK, so it finally compiled after:
* Adding individual component "Windows Universal CRT SDK" to VS 2017
* Manually adding a #define strcasecmp stricmp
* Excluding non existing cpp files from old 2006 project file (projectmode.cpp and historyfile.cpp)
* Deleting incompatible command line compiler options

The server runs but the user authentication does not work. Seems there is something wrong with SHA implementation on 64bit systems

What now?

Last edited by brummbear; 03-13-2019 at 08:30 PM.
brummbear is offline   Reply With Quote
Old 03-13-2019, 05:44 PM   #4
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,967
Default

Hi brummbear,
maybe try to check these threads:

https://forum.cockos.com/showthread.php?t=62063
https://forum.cockos.com/showthread.php?t=17757
akademie is offline   Reply With Quote
Old 03-13-2019, 08:44 PM   #5
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 301
Default

Hi akademie,

Thank you for these hints! I checked the SHA fix for 64bit but it turns out the fix was indeed already merged by Justin into the latest sources for 0.071. Hence, this is apparently not the culprit.

I am getting kicked out immediately, both as a user with password and also as an anonymous. In fact it looks like the server does not even parse the user name at all. Here is the output from the server regardless how I try to login:

: Incoming connection from 127.0.0.1!
127.0.0.1: disconnected (username:'', code=1)

Thus I am wondering if this could have anything to do with string/char functions that do not compile properly? The compiler gives warnings about the older POSIX string functions not being the best choice in current windows, but it still compiles without errors.

The cfg file gets processed properly by the server, all settings like port bpm etc work. If I only could connect to this thing!
Do you have any other ideas?
brummbear is offline   Reply With Quote
Old 03-13-2019, 09:06 PM   #6
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,967
Default

I am not a programmer, so I cannot help with it more I think :-/
I did compile linux server for me year or two ago and I faced this problem because of 64-bit system. Anonymous login was OK, but I needed personal access and it was not working. So that's why I found those threads and made changes.
Maybe, also check if your CFG files are right in access policy.. anonymous = yes, etc...
akademie is offline   Reply With Quote
Old 03-14-2019, 12:39 AM   #7
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 301
Default

I'm not a programmer either... have not coded in c++ in 20years. The cfg is ok.
The problem is somewhere in the initial phase when the connection gets established between server and client, could be even before the username gets evaluated. Hence I tried a newer WDL/jnetlib but still no luck. Also with the entire current version of WDL no luck.

I also tried with Windows specific function names for the POSIX functions that created warnings (which should not be an issue anyway). Compiles without errors, no warnings. Still no connection possible.

It probably requires deeper debugging with breakpoints to get to the bottom of this - arrrgggh.
brummbear is offline   Reply With Quote
Old 03-14-2019, 12:59 AM   #8
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 301
Default

UPDATE: In desperation I downloaded the OLD Ninjam sources from Bill Auger's github (i.e. V0.06 and not the updated V0.071 from Justin's github).

https://github.com/downloads/bill-au...erver_0.06.zip


Ironically, the old sources compile without any issue immediately in VS2017 on my Win 10 64bit machine! Connections no problem, simply working.

How????
brummbear is offline   Reply With Quote
Old 03-14-2019, 06:40 AM   #9
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,910
Default

Looks like NINJAM uses WDL JNetLib. The JNetLib client is broken when building with VS2017+. A commit from 2014 prevents constants used by the JNetLib client from being set to expected values if they already defined–which they are since VS2017. Try applying this patch to latest WDL: https://github.com/cfillion/WDL/comm...b4e4465e.patch.
cfillion is offline   Reply With Quote
Old 03-14-2019, 04:18 PM   #10
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 301
Default

MERCI, merci!! I keep being amazed by the helpfulness of this community!

It was indeed the WDL/JNetlib issue which killed the show. With your fix and the added #define strcasecmp stricmp in usercon.cpp of the Ninjam Server everything compiled fine in VS2017. Server is running and connections work as expected now.
brummbear is offline   Reply With Quote
Old 03-14-2020, 01:25 AM   #11
Captain Howdy
Human being with feelings
 
Join Date: Mar 2020
Posts: 3
Default

Hello Forum,

I am currently struggeling in setting up a server too. The server setup guide from the cockos page seems to be not up to date (https://www.cockos.com/ninjam/server-guide.php).

Can someone, please, give me a working guide how to set up a server.

Thank you very much in advance!
Captain Howdy is offline   Reply With Quote
Old 03-14-2020, 03:43 AM   #12
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,967
Default

Why do you think it is not up to date, Captain Howdy?
It is a guide how to setup NINJAM server application, not the server itself (I mean operating system), of course.
akademie is offline   Reply With Quote
Old 03-14-2020, 04:16 AM   #13
Captain Howdy
Human being with feelings
 
Join Date: Mar 2020
Posts: 3
Default

Thanks for answering. I am confused now.

The guide says:

"On Windows (after opening a command line, and going to the proper directory):
ninjamsrv configfilename.cfg"

but cmd replies "ninjamsrv" is not a command.

Therefore I think I have to compile an executive file first.

I want to host my own Ninjam server so my band mates and I can connect to it. If I understood this right, I use the ninjamsrv-c++-file from the linked github-files to compile my own exe-file to start the server (which is configurable by the config.cfg file).

What am I doing wrong?

Best
Cpt.
Captain Howdy is offline   Reply With Quote
Old 03-14-2020, 04:26 AM   #14
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,967
Default

Oh, I see what you mean.
Yes, it was discussed here already, that compiled binaries of server were taken down from the web page and only source code is available.

So there is direct link to Windows binary file from Internet archive here
http://web.archive.org/web/201703201...win32_v006.zip

and full archived page:
http://web.archive.org/web/201703201...njam/index.php

EDIT: and yes, the guide is for setup as configuring the running server (not as instructions how to compile from sources). I think we will have to ask Justin to put some executables back to webpage for us who cannot compile ourselves.

Last edited by akademie; 03-14-2020 at 06:15 AM. Reason: typo
akademie is offline   Reply With Quote
Old 03-14-2020, 07:14 AM   #15
Allesmachine
Human being with feelings
 
Join Date: Apr 2008
Posts: 5
Default

thank you!
Allesmachine is offline   Reply With Quote
Old 03-14-2020, 07:25 AM   #16
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,967
Default

Quote:
Originally Posted by Allesmachine View Post
thank you!
you're welcome
akademie is offline   Reply With Quote
Old 03-14-2020, 09:21 AM   #17
Captain Howdy
Human being with feelings
 
Join Date: Mar 2020
Posts: 3
Default

Thx akademie!
Captain Howdy is offline   Reply With Quote
Old 03-15-2020, 08:07 PM   #18
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 301
Default

I uploaded a Windows binary of the slightly newer server version 0.071 here:

https://stash.reaper.fm/38554/ninjamserver_0_071.zip

Compiled from https://github.com/justinfrankel/nin.../ninjam/server, see history further up in this thread.

Both 0.06 as well as 0.071 work fine as far as I can tell. I do not remember exactly what the differences were, they were minor (I think 0.071 fixed something rg parameters in the config file). It's been a while....
brummbear is offline   Reply With Quote
Old 03-16-2020, 02:58 AM   #19
g4greg
Human being with feelings
 
g4greg's Avatar
 
Join Date: May 2009
Location: Japan
Posts: 1,162
Default

Thanks!
With the coronavirus going on, I'm trying to find a way to jam with my duo partner, and haviing a ninjam server might just be the ticket!
__________________
Vocals for hire from From pop to metal, and everything in between .
https://www.fiverr.com/gregemond/be-...ger-songwriter
g4greg is offline   Reply With Quote
Old 03-16-2020, 01:25 PM   #20
pljones
Human being with feelings
 
pljones's Avatar
 
Join Date: Aug 2007
Location: London, UK
Posts: 765
Default

If you live close and have good internet, you might want to try Jamulus, too - it's a bit more "natural". See my discussion here for how NINJAM works, if you haven't.
__________________
Quote:
Originally Posted by Tony Williams
...Playing fast around the drums is one thing. But to play with people for others, to listen to, that's something else. That's a whole other world.
pljones is offline   Reply With Quote
Old 03-22-2020, 03:07 AM   #21
elgourmet
Human being with feelings
 
Join Date: Oct 2017
Posts: 22
Default

Quote:
Originally Posted by brummbear View Post
I uploaded a Windows binary of the slightly newer server version 0.071 here:

https://stash.reaper.fm/38554/ninjamserver_0_071.zip

Compiled from https://github.com/justinfrankel/nin.../ninjam/server, see history further up in this thread.

Both 0.06 as well as 0.071 work fine as far as I can tell. I do not remember exactly what the differences were, they were minor (I think 0.071 fixed something rg parameters in the config file). It's been a while....
thank you!
is there anything special I have to do on windows to get it running? your archive file contains the .exe file. once i double click it (as adminsitrator), nothing happens. also nothing appears in the task manager.

does the file need some kind of java runtime environment or something similar to be properly executed?
elgourmet is offline   Reply With Quote
Old 03-22-2020, 10:12 AM   #22
brummbear
Human being with feelings
 
brummbear's Avatar
 
Join Date: May 2016
Location: out west
Posts: 301
Default

Quote:
Originally Posted by elgourmet View Post
thank you!
is there anything special I have to do on windows to get it running? your archive file contains the .exe file. once i double click it (as adminsitrator), nothing happens. also nothing appears in the task manager.

does the file need some kind of java runtime environment or something similar to be properly executed?

You have to start the server with a config file as described here:
https://www.cockos.com/ninjam/server-guide.php

For example you would use: ninjamserver_0_071.exe myserver.cfg

Here is an example config file that you can edit to your liking:
https://github.com/justinfrankel/nin...er/example.cfg

The most convenient way to start the server on Windows is to place a shortcut on your desktop and specify the config file in the Target field of the shortcut. Then you can always start with just a double click, that's the way I do it. In short: After you have set it up once it is no effort at all anymore and you will have tons of fun with your musician friends.
brummbear is offline   Reply With Quote
Old 03-22-2020, 06:06 PM   #23
EManBass
Human being with feelings
 
Join Date: Sep 2015
Location: Brooklyn, NY
Posts: 147
Default

Hello, I am new to NINJAM and tried it today with success. I would like to know how to create my own server for my own, private sessions. I have many threads open, and this one is the most promising given all the information shared which I have already opened as well. But I don't understand anything. I have no clue about coding and no clue about what I am supposed to do with all this.

So, here are my questions: what do I do with that example config file? I downloaded the entire NINJAM folder because I figured I may have everything I need there; and I also downloaded the server file from the stash brummbear posted. Now what? I am as lost as I have never been =(

----------------

Edit: you know when you finally give up looking for something your mom asked you to bring from home, and decide to call her to ask where it is and, as soon as she picks up, you find that thing? Well, I opened the the config file as a text and I see the text. Now, am I supposed to erase anything or just change numerical values, and passwords and such? And after that, running the command prompt should do it? Running it now as it is did nothing =(
EManBass is offline   Reply With Quote
Old 03-22-2020, 06:50 PM   #24
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 3,967
Default

Quote:
Originally Posted by EManBass View Post
...And after that, running the command prompt should do it? Running it now as it is did nothing =(
And.. what do you expect it to do when it would it do??

I mean, it is a server application, it does a lot of things in the background, but it is not supposed to present you not much when doing it.
To find it working you need to connect to it using your ninjam client (ReaNINJAM, Jamtaba VST/standalone, ..)

If you are running it in a standard server in some datacenter it is quite easy, but if you are going to use it on your home computer which is behind firewall, then you will need to make some changes in modem configuration / NAT, port forwarding etc. to be able to connect to it from the outside world.

BTW, this is how it looks when ninjam server application is correctly running (in Windows)

https://stash.reaper.fm/38647/ninjam...screenshot.png

just this, nothing more (you can show connected users, kill users, reload config, shut down server)

Last edited by akademie; 03-22-2020 at 07:02 PM.
akademie is offline   Reply With Quote
Old 03-30-2020, 11:26 PM   #25
EManBass
Human being with feelings
 
Join Date: Sep 2015
Location: Brooklyn, NY
Posts: 147
Default

Ok, I confess I personally don't have much interest in this. I really just wanted to learn how to setup private sessions because a lot of my full-time musician friends who have teaching gigs are having a really hard time teaching online, and I wanted to help them setting up something so at least they could play in time with their students. I had the intention of learning how to setup private servers so I could then teach them and, at the same time, convert them into Reaper users. But seems like too much work even for me =) I may come back and look into it again, I actually never got it to even show that status as in your image. Thank you for your answer, though!
EManBass is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:19 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.