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 03-25-2020, 10:42 AM   #1
Stoorat
Human being with feelings
 
Join Date: Mar 2020
Posts: 8
Default OsX Private Server: Error loading config file!

Hi - I’ve been noodling with Ninjam for a while joining in on public servers for a few weeks and thought I’d take the plunge and try setting up a private server on my iMac running OsX High Sierra 10.13.6

I’m afraid I’ve run into the “Error loading config file!” problem in terminal

Here’s what I’ve tried so far:

I downloaded the compiled Ninjam server from elieserdejesus's post (03-05-2016, 08:28 AM) in this thread:
https://forum.cockos.com/showthread.php?t=165468

I’ve edited and renamed the example config file (now called config.cfg) and put ninjamsrv + config.cfg loose in my Applications folder as suggested by Maccool in this thread:
https://forum.cockos.com/showthread.php?t=18730

However, when I try to run it in Terminal I end up with this:

Last login: Wed Mar 25 08:58:37 on console
UNKNOWN:~ stuart-imac21$ cd /Applications
UNKNOWN:Applications stuart-imac21$ ./ninjamsrv config.cfg
NINJAM Server v0.06 built on Dec 17 2015 at 10:48:21 starting up...
Copyright (C) 2005-2007, Cockos, Inc.
[config] error opening configfile 'config.cfg'
Error loading config file!
UNKNOWN:Applications stuart-imac21$

Any ideas on things to try would be most welcome

Thanks in advance!

(The other alternative is having a go at setting up the server on my Windows work laptop but I might get told off!)

Last edited by Stoorat; 03-28-2020 at 08:45 AM.
Stoorat is offline   Reply With Quote
Old 03-25-2020, 03:38 PM   #2
pljones
Human being with feelings
 
pljones's Avatar
 
Join Date: Aug 2007
Location: London, UK
Posts: 730
Default

Do you have a file called "config.cfg"? If not, that may well be your problem.
__________________
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-26-2020, 06:47 PM   #3
Rastko
Human being with feelings
 
Join Date: Mar 2006
Posts: 25
Default

I have the same error and yes the config file does exist .
Rastko is offline   Reply With Quote
Old 03-27-2020, 05:24 AM   #4
pljones
Human being with feelings
 
pljones's Avatar
 
Join Date: Aug 2007
Location: London, UK
Posts: 730
Default

So you have a Terminal window open.

You are in the folder where the ninjamsvr program is.

Do "ls" (first character is letter L lowercase) and paste the output here.
__________________
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-27-2020, 05:55 AM   #5
Rastko
Human being with feelings
 
Join Date: Mar 2006
Posts: 25
Default

Quote:
Originally Posted by pljones View Post
So you have a Terminal window open.

You are in the folder where the ninjamsvr program is.

Do "ls" (first character is letter L lowercase) and paste the output here.
Hi , this comes out after "ls" in the folder :

rastko-mbp:ninjam_server Rastko$ ls
cclicense.txt example.cfg license.txt ninjamsrv
rastko-mbp:ninjam_server Rastko$

then I try to start :

/Users/Rastko/Desktop/ninjam_server/ninjamsrv example.cfg

and get this :

NINJAM Server v0.08 built on Mar 26 2020 at 18:02:01 starting up...
Copyright (C) 2005-2017, Cockos, Inc.
[config] error opening configfile 'example.cfg'
Error loading config file!
rastko-mbp:~ Rastko$
Rastko is offline   Reply With Quote
Old 03-27-2020, 08:59 AM   #6
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 1,775
Default

Quote:
Originally Posted by Rastko View Post
Hi , this comes out after "ls" in the folder :

rastko-mbp:ninjam_server Rastko$ ls
cclicense.txt example.cfg license.txt ninjamsrv
rastko-mbp:ninjam_server Rastko$

then I try to start :

/Users/Rastko/Desktop/ninjam_server/ninjamsrv example.cfg

and get this :

NINJAM Server v0.08 built on Mar 26 2020 at 18:02:01 starting up...
Copyright (C) 2005-2017, Cockos, Inc.
[config] error opening configfile 'example.cfg'
Error loading config file!
rastko-mbp:~ Rastko$
Hi Rastko,
maybe try to add full path also before example.cfg, like this:
/Users/Rastko/Desktop/ninjam_server/ninjamsrv /Users/Rastko/Desktop/ninjam_server/example.cfg

or, check if example.cfg file can be in fact read (read permissions) by user starting ninjam server.
akademie is offline   Reply With Quote
Old 03-27-2020, 10:40 AM   #7
pljones
Human being with feelings
 
pljones's Avatar
 
Join Date: Aug 2007
Location: London, UK
Posts: 730
Default

Yep, maybe "ls -l" would have been a better request.

But it does look like "./ninjamsvr example.cfg" should work. It's not saying "not found"... hm... Did you edit the file on your Mac?
__________________
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-28-2020, 12:16 AM   #8
Rastko
Human being with feelings
 
Join Date: Mar 2006
Posts: 25
Default

Quote:
Originally Posted by akademie View Post
Hi Rastko,
maybe try to add full path also before example.cfg, like this:
/Users/Rastko/Desktop/ninjam_server/ninjamsrv /Users/Rastko/Desktop/ninjam_server/example.cfg

or, check if example.cfg file can be in fact read (read permissions) by user starting ninjam server.
Hi Akademie ,

the full path helped and now I get this :

rastko-mbp:~ Rastko$ /Users/Rastko/Desktop/ninjam_server/ninjamsrv /Users/Rastko/Desktop/ninjam_server/example.cfg
NINJAM Server v0.08 built on Mar 26 2020 at 18:02:01 starting up...
Copyright (C) 2005-2017, Cockos, Inc.
Error opening license file cclicense.txt
[config] warning: invalid parameter on line 13 of /Users/Rastko/Desktop/ninjam_server/example.cfg
Server starting up...
Port: 2049
Error listening on port 2049!
Using defaults 120 BPM 8 BPI

I am sure that Error listening on port 2049! is because I did not yet open that port but not sure about the other ones.

In any case thank you for helping me

rastko
Rastko is offline   Reply With Quote
Old 03-28-2020, 12:16 AM   #9
Rastko
Human being with feelings
 
Join Date: Mar 2006
Posts: 25
Default

Quote:
Originally Posted by pljones View Post
Yep, maybe "ls -l" would have been a better request.

But it does look like "./ninjamsvr example.cfg" should work. It's not saying "not found"... hm... Did you edit the file on your Mac?
I did not edit anything left it as it was from the zip

thank you

rastko
Rastko is offline   Reply With Quote
Old 03-28-2020, 04:08 AM   #10
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 1,775
Default

Quote:
Originally Posted by Rastko View Post
Hi Akademie ,

the full path helped and now I get this :

rastko-mbp:~ Rastko$ /Users/Rastko/Desktop/ninjam_server/ninjamsrv /Users/Rastko/Desktop/ninjam_server/example.cfg
NINJAM Server v0.08 built on Mar 26 2020 at 18:02:01 starting up...
Copyright (C) 2005-2017, Cockos, Inc.
Error opening license file cclicense.txt
[config] warning: invalid parameter on line 13 of /Users/Rastko/Desktop/ninjam_server/example.cfg
Server starting up...
Port: 2049
Error listening on port 2049!
Using defaults 120 BPM 8 BPI

I am sure that Error listening on port 2049! is because I did not yet open that port but not sure about the other ones.

In any case thank you for helping me

rastko
Great, so we are nearly done

First, the server is running even now, no matter it give sthis error message, but it is missing cclicense.txt, which is declared at line 13 of CFG file.
Simply add that "cclicense.txt" file next to your example.cfg file (if it still does not help, write also full path to cclicense.txt in CFG).

cclicese.txt is displayed when connecting to server to say user about, well licenses of work presented in jam etc... and has to be confirmed by user (checking "I agree..." checkbox and confirming by clicking the "Accept" button). You can write anything descriptional there.

I think you can even comment out that line altogether (using #) if it is for your private use and your bandmates and do not need it.


EDIT: About the Port error. Try another port, like 2050, 2051 or 2052. I have had problems using 2049 port also at work where those other port work flawlesly.

Last edited by akademie; 03-28-2020 at 04:11 AM. Reason: added port info
akademie is offline   Reply With Quote
Old 03-28-2020, 04:57 AM   #11
Stoorat
Human being with feelings
 
Join Date: Mar 2020
Posts: 8
Default

Wow - that was an amazingly quick response guys. Sorry for not responding (to my own question!)
I'm going to give all that advice you gave to Rastko a go and see where that gets me.
Stoorat is offline   Reply With Quote
Old 03-28-2020, 09:34 AM   #12
Stoorat
Human being with feelings
 
Join Date: Mar 2020
Posts: 8
Default

Quote:
Originally Posted by akademie View Post
Hi Rastko,
maybe try to add full path also before example.cfg, like this:
/Users/Rastko/Desktop/ninjam_server/ninjamsrv /Users/Rastko/Desktop/ninjam_server/example.cfg

or, check if example.cfg file can be in fact read (read permissions) by user starting ninjam server.
Thanks for all this brilliant advice guys

I致e tried moving the folder that Ninjamsrv files are contained in to my Desktop and adding the full url but unfortunately continue to get the Error loading config file

覧覧覧覧覧

Stuarts-iMac:~ stuart-imac21$ /Users/stuart-imac21/Desktop/ninjamserver/ninjamsrv /Users/stuart-imac21/Desktop/ninjamserver/config-2.cfg
NINJAM Server v0.06 built on Dec 17 2015 at 10:48:21 starting up...
Copyright (C) 2005-2007, Cockos, Inc.
[config] error opening configfile '/Users/stuart-imac21/Desktop/ninjamserver/config-2.cfg'
Error loading config file!
Stuarts-iMac:~ stuart-imac21$

覧覧覧覧覧

I have also tried re-saving the config file in the Apple script editor (because I致e noticed it won稚 let me just delete the .txt extension from the example.cfg.txt file) as pljones queried. (hence the it being called config-2.cfg)

I致e also tried putting the ninjamsrv and config cfg files loose in my Users/stuart-imac21/Applications folder but end up with the same result.

覧覧覧覧覧

Stuarts-iMac:~ stuart-imac21$ /Users/stuart-imac21/Applications/ninjamsrv /Users/stuart-imac21/Applications/config.cfg
NINJAM Server v0.06 built on Dec 17 2015 at 10:48:21 starting up...
Copyright (C) 2005-2007, Cockos, Inc.
[config] error opening configfile '/Users/stuart-imac21/Applications/config.cfg'
Error loading config file!

覧覧覧覧覧

This is what I get when I perform the 斗s command in the stuart-imac21/Applications folder - is this useful?

覧覧覧覧覧

Stuarts-iMac:~ stuart-imac21$ cd /Users/stuart-imac21/Applications
Stuarts-iMac:Applications stuart-imac21$ ls
Adobe bunkajam config.cfg.txt ninjamsrv
Stuarts-iMac:Applications stuart-imac21$

覧覧覧覧覧

I知 so jealous of Rastko for getting some movement!
Stoorat is offline   Reply With Quote
Old 03-28-2020, 09:43 AM   #13
Stoorat
Human being with feelings
 
Join Date: Mar 2020
Posts: 8
Default

Hold the phone - I may have just answered my own question there
I just noticed the config.cfg file still has .txt extension on it when performing the "ls" command - I'm just going to google how to fix that!
Stoorat is offline   Reply With Quote
Old 03-28-2020, 10:02 AM   #14
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 1,775
Default

no need to rename it I think, just put the correct name in the commandline, so instead of "config.cfg" type "config.cfg.txt"
akademie is offline   Reply With Quote
Old 03-28-2020, 10:09 AM   #15
Stoorat
Human being with feelings
 
Join Date: Mar 2020
Posts: 8
Default

OK - tantalisingly close now!

I created a new blank cfg file using the terminal window, copied and pasted the config file text into it and resaved in Textedit (which oddly didn't put the .txt extension back) and placed the licence document in my applications folder along with ninjamsrv and the new config file (config-2.cfg)

and voila...

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

Stuarts-iMac:Applications stuart-imac21$ ./ninjamsrv config-2.cfg
NINJAM Server v0.06 built on Dec 17 2015 at 10:48:21 starting up...
Copyright (C) 2005-2007, Cockos, Inc.
Server starting up...
Port: 2050
Error listening on port 2050!
Using defaults 100 BPM 16 BPI

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

I'm prepared to accept maybe I screwed up opening port 2050 on my router - does that seem the most likely explanation?
Stoorat is offline   Reply With Quote
Old 03-28-2020, 10:12 AM   #16
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 1,775
Default

Yes, first try different ports in configuration file (2049, 2051, 2052) - you have to restart ninjam server for new changes in cfg to take effect.
If none of them will work, then focus on modem/router settings (and/or operating system's firewall).
akademie is offline   Reply With Quote
Old 03-28-2020, 10:17 AM   #17
Stoorat
Human being with feelings
 
Join Date: Mar 2020
Posts: 8
Default

Quote:
Originally Posted by akademie View Post
Yes, first try different ports in configuration file (2049, 2051, 2052) - you have to restart ninjam server for new changes in cfg to take effect.
If none of them will work, then focus on modem/router settings (and/or operating system's firewall).
OK - I edited config-2.cfg to use port 2049, ran it again and we've got this

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

NINJAM Server v0.06 built on Dec 17 2015 at 10:48:21 starting up...
Copyright (C) 2005-2007, Cockos, Inc.
Server starting up...
Port: 2049
Using defaults 100 BPM 16 BPI

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

Is that a good thing?
Stoorat is offline   Reply With Quote
Old 03-28-2020, 10:32 AM   #18
Stoorat
Human being with feelings
 
Join Date: Mar 2020
Posts: 8
Default

Spoke too soon - I stopped it and started it again following failed attempts to login from another computer through Reaper and got this:

Stuarts-iMac:Applications stuart-imac21$ ./ninjamsrv config-2.cfg
NINJAM Server v0.06 built on Dec 17 2015 at 10:48:21 starting up...
Copyright (C) 2005-2007, Cockos, Inc.
Server starting up...
Port: 2049
Error listening on port 2049!
Using defaults 100 BPM 16 BPI

It was connecting though!
Stoorat is offline   Reply With Quote
Old 03-28-2020, 10:51 AM   #19
Stoorat
Human being with feelings
 
Join Date: Mar 2020
Posts: 8
Default

I've allowed anonymous users and have managed to connect (great!) - but whether the port works or not is pretty flakey.

I had it work on 2049 and 2052 once each, but now it won't work on any of them.

I'm a bit unclear on how it was able to work on them as the only one that I setup in my router (quite possibly incorrectly) was 2050!

Apart from just repeatedly editing the config file until I hit on one that decides to work any suggestions on where I should be looking?
Stoorat is offline   Reply With Quote
Old 03-28-2020, 11:01 AM   #20
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 1,775
Default

I don't know. But keep in mind that you have to terminate running server, and then start again, otherwise copies are still running in the background and may occupy the port.
akademie is offline   Reply With Quote
Old 03-28-2020, 07:45 PM   #21
Rastko
Human being with feelings
 
Join Date: Mar 2006
Posts: 25
Default

Quote:
Originally Posted by akademie View Post
I don't know. But keep in mind that you have to terminate running server, and then start again, otherwise copies are still running in the background and may occupy the port.
This was my problem here in Kuala Lumpur and now it seems all is working !

I just have to find some friends now :-).

Thank you so much for your help.

There must be a better way to kill ninjam server and not to have 8 copies running (like I had) but on a OSX I went to Activity Monitor application (it is built in just search). And once I found ninjam highlight it and click on the quit (top left cross thing)

I wish you all the best from Kuala Lumpur

rastko
Rastko is offline   Reply With Quote
Old 03-28-2020, 08:13 PM   #22
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 1,775
Default

Quote:
Originally Posted by Rastko View Post
This was my problem here in Kuala Lumpur and now it seems all is working !

I just have to find some friends now :-).

Thank you so much for your help.

There must be a better way to kill ninjam server and not to have 8 copies running (like I had) but on a OSX I went to Activity Monitor application (it is built in just search). And once I found ninjam highlight it and click on the quit (top left cross thing)

I wish you all the best from Kuala Lumpur

rastko
With pleasure

And about the closing/killing an application. This is described in the last sentence of the official ninjam server guide:

"If you need ot change the configuration once the server is running, you can restart it by hitting R (on Windows), or by using the command "killall -HUP ninjamsrv" (on Linux/FreeBSD/OS X)."
akademie is offline   Reply With Quote
Old 03-28-2020, 11:14 PM   #23
Rastko
Human being with feelings
 
Join Date: Mar 2006
Posts: 25
Default

Quote:
Originally Posted by akademie View Post
With pleasure

And about the closing/killing an application. This is described in the last sentence of the official ninjam server guide:

"If you need ot change the configuration once the server is running, you can restart it by hitting R (on Windows), or by using the command "killall -HUP ninjamsrv" (on Linux/FreeBSD/OS X)."
I have tried "killall -HUP ninjamsrv" but it seems it only restarts the server maybe I was doing something wrong as "killall" does indeed sound like closing something (totally closing, forwever).
Rastko is offline   Reply With Quote
Old 03-29-2020, 12:22 AM   #24
pljones
Human being with feelings
 
pljones's Avatar
 
Join Date: Aug 2007
Location: London, UK
Posts: 730
Default

Skip -HUP to really kill it. (That sends a SIGTERM, which tells it to stop.) SIGHUP, like the line says, doesn't stop the server, just reloads the config.
__________________
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-29-2020, 07:36 AM   #25
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 1,775
Default

Quote:
Originally Posted by pljones View Post
Skip -HUP to really kill it. (That sends a SIGTERM, which tells it to stop.) SIGHUP, like the line says, doesn't stop the server, just reloads the config.
Uhh, thanks for correction pljones. Sure the instruction is for restarting, a killing an app is only part of it, so only "killall ninjamsrv" command to kill.
akademie is offline   Reply With Quote
Old 04-06-2020, 01:51 AM   #26
tapemelancholy
Human being with feelings
 
Join Date: Sep 2018
Posts: 31
Default

Quote:
Originally Posted by Stoorat View Post
I've allowed anonymous users and have managed to connect (great!) - but whether the port works or not is pretty flakey.

I had it work on 2049 and 2052 once each, but now it won't work on any of them.

I'm a bit unclear on how it was able to work on them as the only one that I setup in my router (quite possibly incorrectly) was 2050!

Apart from just repeatedly editing the config file until I hit on one that decides to work any suggestions on where I should be looking?
You can use various ports. I'm using port 55000. So try others.

Also to run the server you can use these two commands (i have ninjam in the apps/ninjam):
cd /Applications/ninjam
./ninjamsrv config.cfg

And do not use several running instances. As well, to change config you need to kill the process and run it again.
tapemelancholy 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 11:49 PM.


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