The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#1 2014-02-04 22:13:56

DarkunderdoG
Member
Registered: 2014-02-04
Posts: 5

Server Help! :)

I've setup the Ticket Server, The Server, and Reflector

I can create tickets and go to the server url.

However when I try to login I get "Login Failed" and in the Log it shows

2014-02-04 23:08:04:
[user_id = 2] Transaction denied for user_id 2, hmac check failed
2014-02-04 23:08:04:
[user_id = 2] Transaction denied with the following get/post data:  action=check_hmac&user_id=2&sequence_number=0&ticket_hmac=888AE17B225B0536ACF77286E98914FD487C64B3

Any Ideas? I went through and verified i had the $sharedEncryptionSecret

Thanks! smile

Offline

#2 2014-02-05 02:04:39

DaVinci
Member
Registered: 2014-01-31
Posts: 69

Re: Server Help! :)

If you did set SharedServerSecret, I don't know really.

Offline

#3 2014-02-05 07:51:04

DarkunderdoG
Member
Registered: 2014-02-04
Posts: 5

Re: Server Help! :)

If i don't change any of the encryption keys - should it work?

Offline

#4 2014-02-05 08:07:23

DarkunderdoG
Member
Registered: 2014-02-04
Posts: 5

Re: Server Help! :)

Figured it out! smile Thanks Wiki! smile

Offline

#5 2014-02-05 17:07:55

Quindo
Member
Registered: 2014-02-05
Posts: 6

Re: Server Help! :)

What was your solution?  I am having the same issue.

Offline

#6 2014-02-05 17:29:52

DarkunderdoG
Member
Registered: 2014-02-04
Posts: 5

Re: Server Help! :)

http://thecastledoctrine.gamepedia.com/ … p_a_Server

Get the game server up and running

Section G.

Good Luck! smile Let me know if it works!

Offline

#7 2014-02-10 08:22:49

comg
Member
Registered: 2014-02-05
Posts: 13

Re: Server Help! :)

Hi there,

I have a similar issue with setting up my server. After few tests, i decided to go with minimum changes.

Now, my ticketServer is OK, the server looks OK and the reflector is set.
But, when I try to connect, i get a "Login Failed" error.

I double checked the sharedClientSecret is OK. (So i should't have to rebuild the game, right ?)

After the login fail, i can see that the house has been created though... (on the server admin page)

Any idea?

Thanks in advance,

ComG

Offline

#8 2014-02-10 08:59:09

Quindo
Member
Registered: 2014-02-05
Posts: 6

Re: Server Help! :)

comg wrote:

Hi there,

I have a similar issue with setting up my server. After few tests, i decided to go with minimum changes.

Now, my ticketServer is OK, the server looks OK and the reflector is set.
But, when I try to connect, i get a "Login Failed" error.

I double checked the sharedClientSecret is OK. (So i should't have to rebuild the game, right ?)

After the login fail, i can see that the house has been created though... (on the server admin page)

Any idea?

Thanks in advance,

ComG

What I did to get mine working is to set all of the fields similar to 'sharedClientSecret' to the same value.  That includes passwordHashingPepper and Ticketsgenerationsecret.

After I did that I stopped getting the hmac check failed message in my log file on gameserver.

Offline

#9 2014-02-10 09:05:56

comg
Member
Registered: 2014-02-05
Posts: 13

Re: Server Help! :)

I did that before but doesn't change anything.
So this time i left all the secret (except the client shared) to their default value.

Offline

#10 2014-02-10 11:55:48

Quindo
Member
Registered: 2014-02-05
Posts: 6

Re: Server Help! :)

comg wrote:

I did that before but doesn't change anything.
So this time i left all the secret (except the client shared) to their default value.

What are you getting in your log pages in the backends?

If you send me a temporary backend password I can take a look for you.

Offline

#11 2014-02-11 04:30:25

comg
Member
Registered: 2014-02-05
Posts: 13

Re: Server Help! :)

The server's not mine, I can't give you an access :S

The log says:
2014-02-10 16:08:41:
[user_id = 1] Transaction denied for user_id 1, hmac check failed
2014-02-10 16:08:41:
[user_id = 1] Transaction denied with the following get/post data:  action=check_hmac&user_id=1&sequence_number=0&ticket_hmac=7D9DF8709AA10FE7E89C055325685F67293BA3D4

Offline

#12 2014-02-12 04:38:59

comg
Member
Registered: 2014-02-05
Posts: 13

Re: Server Help! :)

I tried from the beginning once again, still doesn't work.
"Login Failed", the house is created on the server even though and the logs says :

Server:

2014-02-12 12:34:26:
[user_id = 1] Transaction denied for user_id 1, hmac check failed
2014-02-12 12:34:26:
[user_id = 1] Transaction denied with the following get/post data:  action=check_hmac&user_id=1&sequence_number=0&ticket_hmac=246C65E8D537472204C3BFB3F45E7AA67299499B

Ticket Server :

2014-02-12 12:29:34:
Ticket NFWHW-B7WTQ-MPXN4-9K74J created by 109.*.*.*
2014-02-12 12:29:20:
Ticket sale security check failed, from 109.*.*.*, data = "abc", hash = "4a6d6cd6e897ae77bb357dd68f39cee3",looking for hash = "ffd5ec8d71cfffab9197d56faad2b74f",(data hashed = "abcsecret A")

Note: I used the default secrets and hash and i changed the sharedClientSecret accordingly to the howto file.

Offline

#13 2014-02-12 05:37:22

comg
Member
Registered: 2014-02-05
Posts: 13

Re: Server Help! :)

So, after some debugging, it seems that the ticket_id i send, which is mashed up with other infos and hashed, doesn't match the hmac sent by the game.

[user_id = 1] Transaction denied for user_id 1, hmac check failed
correct_ticket_hmac : a4b88612e765aa0b779b06d26af067a9adbc37b7
sequence_number : 0
cd_ticketHashVersion : 30
sharedClientSecret : The long line Jason has put as a secret.  --Jason
ticket_hmac : 0FF80CA0A11430CE731CB48317B5B4FA8314E8CD

Either my sharedClientSecret is false, either the other infos (the sequence_number, the ticketHashVersion) mess up with the hashed string...

I'm a bit confused :s

Offline

Board footer

Powered by FluxBB 1.5.8