Web Socket problems.

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Ninjaoninja2
Posts: 204
Joined: 22 Sep 2013, 23:33

Web Socket problems.

Postby Ninjaoninja2 » 05 Jul 2017, 17:07

Hello,
I've been trying to enable my certificate that I bought form GoDaddy to work with 2X, I installed it the way the docs said too. But for some reason I think it's still reading the old one. I've tried to go to the (myip):8443 but it comes up that the connection is not secure. The ssl.ini is pointing to the right directory, so I'm not sure what's going. And, when I try to login to the admintool via encryption it give me an error in the logs saying "This zone (admin) does not allow encrypted connections."
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Web Socket problems.

Postby Lapo » 06 Jul 2017, 10:40

Hi,
if the browser test says it's not a secure connection the certificate isn't working.
There might be server side errors. Have you checked? In case there are let us know what it is.

As regards the AdminTool error, the problem is that you first need to configure the server to use SSL for the admin.
To do this simply connect with the AdminTool normally, Under ServerConfigurator > Admin activate the Use encryption option.

Save and restart. But... don't do that until you have fixed the certificate issue! Or you won't be able to access the Admin! :shock: :D

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
Ninjaoninja2
Posts: 204
Joined: 22 Sep 2013, 23:33

Re: Web Socket problems.

Postby Ninjaoninja2 » 06 Jul 2017, 12:43

Lapo wrote:Hi,
if the browser test says it's not a secure connection the certificate isn't working.
There might be server side errors. Have you checked? In case there are let us know what it is.

As regards the AdminTool error, the problem is that you first need to configure the server to use SSL for the admin.
To do this simply connect with the AdminTool normally, Under ServerConfigurator > Admin activate the Use encryption option.

Save and restart. But... don't do that until you have fixed the certificate issue! Or you won't be able to access the Admin! :shock: :D

Hope it helps

EDIT: I checked again and some of the methods from the documentation are "deprecated" so I changed them. And now I keep getting an error that reads: "Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect" but I've gone back and generated new passwords everytime, and alas no good! It ALWAYS says that, even if I KNOW it's right. Any ideas?
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Web Socket problems.

Postby Lapo » 06 Jul 2017, 14:02

Yeah, the error is due to an incorrect step in the deployment of the certificate.
Just to understand are you running SFS2X 2.13 or something older?

I ask because since 2.13 all web services are managed via Jetty, websockets included. Prior to 2.13 we used another engine.
Lapo

--

gotoAndPlay()

...addicted to flash games
Ninjaoninja2
Posts: 204
Joined: 22 Sep 2013, 23:33

Re: Web Socket problems.

Postby Ninjaoninja2 » 06 Jul 2017, 14:08

Lapo wrote:Yeah, the error is due to an incorrect step in the deployment of the certificate.
Just to understand are you running SFS2X 2.13 or something older?

I ask because since 2.13 all web services are managed via Jetty, websockets included. Prior to 2.13 we used another engine.

No, I'm running 2.13. :)
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Web Socket problems.

Postby Lapo » 06 Jul 2017, 14:18

Cool.
Next thing I have to ask did you follow the docs step by step?
http://docs2x.smartfoxserver.com/Gettin ... yptography
Section "SSL Certificates"

Did you find any issues at any of the steps?

Also one source of confusion / problems with certificates is the three items that are given to you: the certificate, the private key and and optional intermediate certificate. One time I got confused and mixed them resulting in a similar issue.

Just make sure you are using the right item at the right step and if the problem persists, let me know if there's a specific step where you had problems.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
Ninjaoninja2
Posts: 204
Joined: 22 Sep 2013, 23:33

Re: Web Socket problems.

Postby Ninjaoninja2 » 06 Jul 2017, 14:25

Lapo wrote:Cool.
Next thing I have to ask did you follow the docs step by step?
http://docs2x.smartfoxserver.com/Gettin ... yptography
Section "SSL Certificates"

Did you find any issues at any of the steps?

Also one source of confusion / problems with certificates is the three items that are given to you: the certificate, the private key and and optional intermediate certificate. One time I got confused and mixed them resulting in a similar issue.

Just make sure you are using the right item at the right step and if the problem persists, let me know if there's a specific step where you had problems.

Cheers


Okay, so the files I'm getting from GoDaddy are 2 .crt files. So when I go to convert them, I do. And then once I try to convert the pfx to a .jks it says the pfx file is "blank". And if I try to open the .pfx file, I get an error stating that "This file is invalid for use as the following: Personal Information Exchange". Somehow I don't remember how I found a workaround using another file type, which at the time lead me to the "Invalid password" error.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Web Socket problems.

Postby Lapo » 06 Jul 2017, 14:35

So you've got the certificate and private key in .crt format, correct?
Lapo

--

gotoAndPlay()

...addicted to flash games
Ninjaoninja2
Posts: 204
Joined: 22 Sep 2013, 23:33

Re: Web Socket problems.

Postby Ninjaoninja2 » 06 Jul 2017, 14:37

Lapo wrote:So you've got the certificate and private key in .crt format, correct?

Correct.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Web Socket problems.

Postby Lapo » 06 Jul 2017, 14:44

Okay.
Depending on the certificate provider you get all sorts of formats and combinations, unfortunately, and it's difficult to provide directions for all of them.

If you want we can take a look, if you can send both file to our email (support@...)

Thanks
p.s. = add a reference to this discussion in the email, if you write us.
Lapo

--

gotoAndPlay()

...addicted to flash games
Ninjaoninja2
Posts: 204
Joined: 22 Sep 2013, 23:33

Re: Web Socket problems.

Postby Ninjaoninja2 » 06 Jul 2017, 14:49

Lapo wrote:Okay.
Depending on the certificate provider you get all sorts of formats and combinations, unfortunately, and it's difficult to provide directions for all of them.

If you want we can take a look, if you can send both file to our email (support@...)

Thanks
p.s. = add a reference to this discussion in the email, if you write us.

Alrighty, I sent you guys an email and 'll happily await your response.

Thanks, Zach.
Schmolle
Posts: 1
Joined: 13 Dec 2020, 15:24

Re: Web Socket problems.

Postby Schmolle » 13 Dec 2020, 19:28

Lapo wrote:As regards the AdminTool error, the problem is that you first need to configure the server to use SSL for the admin.
To do this simply connect with the AdminTool normally, Under ServerConfigurator > Admin activate the Use encryption option.

Save and restart. But... don't do that until you have fixed the certificate issue! Or you won't be able to access the Admin! :shock: :D


Dear all,

unfortunatley thats exactly what happend to me and I am not able to access the administration tool. I always get the error "A disconnection occurred due to unknown reason; please reconnect" regardless of wheter using port 8080 or 8443. Basically I enabled the "encryption" in the RemoteAdmin section but as no certificate was uploaded so far, https connection is not possible. We are running a SFS2X (Version 2.16.3) hosted on an Overcast Server. Any help would be appreciated.

Best wishes,
Matthias
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Web Socket problems.

Postby Lapo » 14 Dec 2020, 07:53

Hi Matthias,
for issues with Overcast drop us an email directly via support@... with the details of your server and we'll fix it for you.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 43 guests