Headless Server - how to run a Lux room from the command line

Game of universal domination. New dice available free upon request.
mikeyg
Luxer
Posts: 11
Joined: Sat Jan 12, 2008 7:04 pm
Location: United States
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by mikeyg » Sun Apr 05, 2020 8:55 am

Huh - maybe it’s because I am joining from the same local area network/same IP? How can I trap more info for you? I could fire it up in debug mode and open up port 8000 if you want to connect and watch for it?

Code: Select all

<NetCon - Server-side of -MikeyG-> netConnection.run caught an exception
java.lang.ArrayIndexOutOfBoundsException: 1
	at com.sillysoft.lux.D.B.P(Unknown Source)
	at com.sillysoft.lux.D.B.run(Unknown Source)
If you want - email me - mikeygstl(at)gmail

killercatfish
Luxer
Posts: 267
Joined: Thu Sep 07, 2006 12:50 pm
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by killercatfish » Sun Apr 05, 2020 10:25 am

I cannot get my rooms to STOP having first round income. Any ideas? I have unclicked it in the GUI and removed the -firstroundbonus (or whatever it is) and tried changing to -nofirst...

Thanks!

mikeyg
Luxer
Posts: 11
Joined: Sat Jan 12, 2008 7:04 pm
Location: United States
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by mikeyg » Sun Apr 05, 2020 10:39 am

add

Code: Select all

 -nofirstturncontbonus 
to your startup.

Doh! Just realized you did that. Here is my startup line:

Code: Select all


$pathToJreBin/java -Djava.io.tmpdir=/var/tmp -Djava.awt.headless=true -cp "$pathtofolder/LuxCore.jar:$pathtofolder/lib/*" com.sillysoft.lux.Lux -headless -map=RomanEmpireII -network=true -public=tr -cards=468 -conts=5 -time=90 -name="-MikeyG-" -desc="Classic Strategy" -shuffle3 -nofirstturncontbonus -regcode=XXXXXXXXXXXXXXXXXXXXXXX


killercatfish
Luxer
Posts: 267
Joined: Thu Sep 07, 2006 12:50 pm
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by killercatfish » Fri Apr 24, 2020 12:27 pm

Howdy!

I am trying to get my rooms onto a raspberry pi 4. I am getting a name mismatch error when registering. TIA.

I believe it has something to do with the map name? -map=BioDeux-extreme <---Is there an issue with this on raspian/linux?

I believe it is a map name issue. Any suggestions?

killercatfish
Luxer
Posts: 267
Joined: Thu Sep 07, 2006 12:50 pm
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by killercatfish » Sat Apr 25, 2020 7:25 pm

Im finding this same error, I think, when trying to enter my room thats being hosted on linux (raspberry pi). Randomly I can get in, but typically I get the Connection to remote host lost and the array out of bounds. But then randomly it will let me in...
dustin wrote:
Sun Apr 05, 2020 1:00 am
Hey Mikey, I'm able to join your host with latest Lux no problem. Are you running it headless at the moment?

I've seen the ArrayOutOfBounds error in the past and thought I fixed it already in latest release. Tho I could have missed something still

killercatfish
Luxer
Posts: 267
Joined: Thu Sep 07, 2006 12:50 pm
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by killercatfish » Sun Apr 26, 2020 11:11 am

Ok, for the life of me I cannot get first turn bonus to be off when running headless from 2009 iMac running 10.10.~

User avatar
PJB
Lux Moderator
Lux Moderator
Posts: 1579
Joined: Sat Nov 22, 2008 10:09 pm
Location: The Netherlands
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by PJB » Sun Apr 26, 2020 2:46 pm

I think i cant join any room running on linux with that latest version of lux.

User avatar
PJB
Lux Moderator
Lux Moderator
Posts: 1579
Joined: Sat Nov 22, 2008 10:09 pm
Location: The Netherlands
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by PJB » Sun Apr 26, 2020 5:11 pm

Mikeyg did you just change something? Suddenly after this post i can join your room.

User avatar
PJB
Lux Moderator
Lux Moderator
Posts: 1579
Joined: Sat Nov 22, 2008 10:09 pm
Location: The Netherlands
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by PJB » Sun Apr 26, 2020 5:29 pm

Oh no cant join anymore.

mikeyg
Luxer
Posts: 11
Joined: Sat Jan 12, 2008 7:04 pm
Location: United States
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by mikeyg » Sun Apr 26, 2020 8:15 pm

Didn’t change a thing. I see your attempt, but get the same darn array out of bounds exception.

I wish I could get the code from Dustin To help troubleshoot. I’ve offered to sign an NDA years ago. used to have a problem that the game would just go non-responsive after a few days.

My server is still running Ubuntu 16.10, but my desktop runs RHEL7 - not that it should matter, just a jvm either way.

User avatar
PJB
Lux Moderator
Lux Moderator
Posts: 1579
Joined: Sat Nov 22, 2008 10:09 pm
Location: The Netherlands
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by PJB » Sun Apr 26, 2020 8:40 pm

Got two MacBooks beside each-other, 1 running latest lux version other the previous version. Latest version cant join previous version can join. :panic:

mikeyg
Luxer
Posts: 11
Joined: Sat Jan 12, 2008 7:04 pm
Location: United States
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by mikeyg » Sun Apr 26, 2020 9:08 pm

Same. I am using a previous version to join the latest. I’ll try downgrading my server to see if the latest can connect to an older version.

killercatfish
Luxer
Posts: 267
Joined: Thu Sep 07, 2006 12:50 pm
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by killercatfish » Mon Apr 27, 2020 7:14 am

anyone have an older version for linux?

killercatfish
Luxer
Posts: 267
Joined: Thu Sep 07, 2006 12:50 pm
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by killercatfish » Mon Apr 27, 2020 7:15 am

I agree, nothing i'd like better right now than help make lux great again :-)
mikeyg wrote:
Sun Apr 26, 2020 8:15 pm
Didn’t change a thing. I see your attempt, but get the same darn array out of bounds exception.

I wish I could get the code from Dustin To help troubleshoot. I’ve offered to sign an NDA years ago. used to have a problem that the game would just go non-responsive after a few days.

My server is still running Ubuntu 16.10, but my desktop runs RHEL7 - not that it should matter, just a jvm either way.

User avatar
SecondTermMistake
Lux Moderator
Lux Moderator
Posts: 175
Joined: Sun Nov 07, 2004 8:05 pm

Re: Headless Server - how to run a Lux room from the command line

Post by SecondTermMistake » Tue Oct 20, 2020 7:56 pm

http://sillysoft.net/download/LuxDelux-linux.tgz
doesn't exist any more... is this available elsewhere?


User avatar
SecondTermMistake
Lux Moderator
Lux Moderator
Posts: 175
Joined: Sun Nov 07, 2004 8:05 pm

Re: Headless Server - how to run a Lux room from the command line

Post by SecondTermMistake » Tue Oct 20, 2020 8:28 pm

I'm trying to run with:
linux-private-jre8_73-64bit/bin/java
-Djava.awt.headless=true
-cp "LuxCore.jar:lib/*" com.sillysoft.lux.Lux
-headless
-map=ClassicPartDeux
-network=true
-public=true
-cards=5e15
-conts=30
-time=30
-name=SecondTermMistake-desc=STMhost
-shuffle3
-nofirstturncontbonus
-regcode=luxcode-MY-REAL-LUX-REG-CODE

But getting:

✱ Validating the nickname 'SecondTermMistake' ✱
✱ ERROR: Someone has already registered the nickname 'SecondTermMistake' for use in Internet Public games. Please ``w
iki/?HowToSetYourNickname`choose a new name` and try again. If you have recently reset your registration code, then `
`wiki/?HowToUpdateRegistration`update your registration` and try again. ✱
✱ The LuxServer has shutdown ✱


It's the same code I use in the game, which I suppose I did get from dustin 9 years ago... do I need something different?

User avatar
dustin
Lux Creator
Lux Creator
Posts: 10998
Joined: Thu May 15, 2003 2:01 am
Location: Cascadia
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by dustin » Tue Oct 20, 2020 8:34 pm

try:
-regcode=MY-REAL-LUX-REG-CODE

User avatar
SecondTermMistake
Lux Moderator
Lux Moderator
Posts: 175
Joined: Sun Nov 07, 2004 8:05 pm

Re: Headless Server - how to run a Lux room from the command line

Post by SecondTermMistake » Tue Oct 20, 2020 8:42 pm

Still no good.

I also tried the even older registration code I had: luxpack000-MY-FIRST-REAL-LUX-REG-CODE

Both were actually the same registration, I think you just sent me an updated code at some point?

User avatar
SecondTermMistake
Lux Moderator
Lux Moderator
Posts: 175
Joined: Sun Nov 07, 2004 8:05 pm

Re: Headless Server - how to run a Lux room from the command line

Post by SecondTermMistake » Wed Oct 21, 2020 7:30 pm

For future readers of this forum, my reg was real old. So got a new one. New one works good :D

User avatar
SecondTermMistake
Lux Moderator
Lux Moderator
Posts: 175
Joined: Sun Nov 07, 2004 8:05 pm

Re: Headless Server - how to run a Lux room from the command line

Post by SecondTermMistake » Thu Oct 22, 2020 1:49 am

New question. Is it possible to specify all 6 bots?

```-agent=Reaper```
makes them all Reaper... but really I'd like one Reaper and a mix of some others...
ala the Titan and Explorer hosts.

User avatar
dustin
Lux Creator
Lux Creator
Posts: 10998
Joined: Thu May 15, 2003 2:01 am
Location: Cascadia
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by dustin » Thu Oct 22, 2020 2:43 am

there are a couple AI mixes available:
-agent=reapermix
reaper2mix (2 reapers plus mix of other weaker AIs)
bodmix (1 BotOfDoom plus mix)
bommix (1 BotOMatic plus mix)

User avatar
SecondTermMistake
Lux Moderator
Lux Moderator
Posts: 175
Joined: Sun Nov 07, 2004 8:05 pm

Re: Headless Server - how to run a Lux room from the command line

Post by SecondTermMistake » Thu Oct 22, 2020 12:51 pm

Sweet.

What about player colors? Are those customizable via command line?
Or is there some file I can go muck about in?

User avatar
dustin
Lux Creator
Lux Creator
Posts: 10998
Joined: Thu May 15, 2003 2:01 am
Location: Cascadia
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by dustin » Thu Oct 22, 2020 3:07 pm

-colors=classicmix
-colors=biodeuxmix

are available options

User avatar
SecondTermMistake
Lux Moderator
Lux Moderator
Posts: 175
Joined: Sun Nov 07, 2004 8:05 pm

Re: Headless Server - how to run a Lux room from the command line

Post by SecondTermMistake » Thu Oct 22, 2020 3:12 pm

Boo. That's not very customizable =P

User avatar
dustin
Lux Creator
Lux Creator
Posts: 10998
Joined: Thu May 15, 2003 2:01 am
Location: Cascadia
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by dustin » Thu Oct 22, 2020 11:50 pm

If you open up a GUI version of Lux and set the colors, then run a headless one on the same computer, it will use the colors you setup in GUI mode. Sorry it's not more headless configurable

User avatar
SecondTermMistake
Lux Moderator
Lux Moderator
Posts: 175
Joined: Sun Nov 07, 2004 8:05 pm

Re: Headless Server - how to run a Lux room from the command line

Post by SecondTermMistake » Thu Oct 22, 2020 11:58 pm

I'm gonna have to figure some sort of weird X forwarding Linux shinannigans if I want my custom colors. Haha.

Where do those settings get saved? Can I hack some file so it looks like I ran the GUI?

User avatar
dustin
Lux Creator
Lux Creator
Posts: 10998
Joined: Thu May 15, 2003 2:01 am
Location: Cascadia
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by dustin » Thu Mar 04, 2021 7:31 pm

FYI here are the full commands I am currently using to run headless servers (on linux boxes). Modify as per needed:

CLASSIC:

nohup ../LuxDelux/linux-private-jre8_40/bin/java -Djava.awt.headless=true -cp "../LuxDelux/LuxCore.jar:../LuxDelux/lib/*" com.sillysoft.lux.Lux -headless -map=Classic -network=true -public=true -cards=4681015 -conts=0 -time=30 -desc=Memories_of_our_youth__-__\`\`lux/rules.php\`Online_Rules\` -shuffle3 -nofirstturncontbonus -ranked -colors=classicmix -agent=reapermix -name=YourNameHere -regcode=YourCodeHere &> log-classic.out &


BIO (extreme):

nohup ../LuxDelux/linux-private-jre8_40/bin/java -Djava.awt.headless=true -cp "../LuxDelux/LuxCore.jar:../LuxDelux/lib/*" com.sillysoft.lux.Lux -headless -map=BioDeux-extreme -network=true -public=true -cards=5e15 -conts=30 -time=30 -name=YourNameHere -port=6624 -desc=_BIOHAZARD_ZONE__-__\`\`wiki/\?Welcome\`Welcome\`__-__\`\`lux/rules.php\`Online_Rules\` -shuffle3 -ranked -nofirstturncontbonus -colors=biodeuxmix -agent=reapermix -regcode=YourCodeHere &> log-bio.out &

User avatar
dustin
Lux Creator
Lux Creator
Posts: 10998
Joined: Thu May 15, 2003 2:01 am
Location: Cascadia
Contact:

Re: Headless Server - how to run a Lux room from the command line

Post by dustin » Thu Mar 04, 2021 7:35 pm

SecondTermMistake wrote:
Thu Oct 22, 2020 11:58 pm
Where do those settings get saved? Can I hack some file so it looks like I ran the GUI?
They get saved through the java preferences api. That location will be different depending on your platform.

User avatar
SecondTermMistake
Lux Moderator
Lux Moderator
Posts: 175
Joined: Sun Nov 07, 2004 8:05 pm

Re: Headless Server - how to run a Lux room from the command line

Post by SecondTermMistake » Sun Mar 21, 2021 6:59 pm

Yo dustin,
How do you make a host switch to shuffle ranked on Sundays?
Or even how do you do it manually?

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot] and 136 guests