Jetty and SSL Error

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

Jetty and SSL Error

Postby Ninjaoninja2 » 01 Jan 2018, 18:21

Hello,
Today I have an interesting issue, I'm trying to setup Jetty and SSL with SFS2X but I'm getting this error in my logs:

Code: Select all

WARN  [main] xml.XmlConfiguration     - Config error at <Set name="                                                                                                                                                             KeyStorePassword"><Property name="jetty.sslContext.keyStorePassword" deprecated=                                                                                                                                                             "jetty.keystore.password" default="OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4"/></Set>
java.lang.reflect.InvocationTargetException

I'm running SFS2X 2.13.0 and an AWS bitnami instance.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Jetty and SSL Error

Postby Lapo » 02 Jan 2018, 08:41

Hi,
it looks like you manually changed some of the Jetty config files. Can you explain what you've done?

The instructions for setting up TLS are found here:
http://docs2x.smartfoxserver.com/Gettin ... yptography

Normally you don't need to edit Jetty's config.

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

Re: Jetty and SSL Error

Postby Ninjaoninja2 » 02 Jan 2018, 21:20

Lapo wrote:Hi,
it looks like you manually changed some of the Jetty config files. Can you explain what you've done?

The instructions for setting up TLS are found here:
http://docs2x.smartfoxserver.com/Gettin ... yptography

Normally you don't need to edit Jetty's config.

Cheers

The only thing I did was change the ssl.ini fields to what I needed for my .jks file.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Jetty and SSL Error

Postby Lapo » 03 Jan 2018, 08:37

According to Jetty's doc the error above is nothing to worry about.
It is complaining about some old syntax in a config file that is going to be deprecated. This means that the settings are actually valid.

What is not clear to me is why this is happening. Have you migrated old Jetty files from a previous SFS version maybe?

In any case the error should not prevent SFS2X or Jetty to work. So my next question is -> what is the problem besides the warning in the logs?

Thanks
Lapo

--

gotoAndPlay()

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

Re: Jetty and SSL Error

Postby Ninjaoninja2 » 05 Jan 2018, 14:20

Lapo wrote:According to Jetty's doc the error above is nothing to worry about.
It is complaining about some old syntax in a config file that is going to be deprecated. This means that the settings are actually valid.

What is not clear to me is why this is happening. Have you migrated old Jetty files from a previous SFS version maybe?

In any case the error should not prevent SFS2X or Jetty to work. So my next question is -> what is the problem besides the warning in the logs?

Thanks

Here's another error that is now preventing SFS from booting.

Code: Select all

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range:                                                                                         16
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Jetty and SSL Error

Postby Lapo » 05 Jan 2018, 15:46

Can you please post the entire stack trace? Otherwise it's not possible to understand what is going on.
Can you also clarify what changes have you made to they jetty config?

Thanks
Lapo

--

gotoAndPlay()

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

Re: Jetty and SSL Error

Postby Ninjaoninja2 » 05 Jan 2018, 17:44

Lapo wrote:Can you please post the entire stack trace? Otherwise it's not possible to understand what is going on.
Can you also clarify what changes have you made to they jetty config?

Thanks

Like I said, I made no changes besides what the documentation asked for. I changed the ssl.ini to my settings and put my java keystore in the SFS2X/lib/jetty/etc folder.
Here's the full trace:

Code: Select all

17:56:43,764 WARN  [main] xml.XmlConfiguration     - Config error at <Set name="TrustStorePassword"><Property name="jetty.sslContext.trustStorePassword" deprecated="jetty.truststore.password"/></Set>
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:214)
        at org.eclipse.jetty.start.Main.start(Main.java:457)
        at org.eclipse.jetty.start.Main.main(Main.java:75)
        at com.smartfoxserver.v2.http.JettyServer.start(JettyServer.java:35)
        at com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:326)
        at com.smartfoxserver.v2.Main.main(Main.java:14)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlConfiguration.java:488)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:411)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:358)
        at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:259)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1498)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1435)
        ... 10 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 16
        at java.lang.String.substring(String.java:1963)
        at org.eclipse.jetty.util.security.Password.deobfuscate(Password.java:200)
        at org.eclipse.jetty.util.security.Password.<init>(Password.java:79)
        at org.eclipse.jetty.util.ssl.SslContextFactory.setTrustStorePassword(SslContextFactory.java:812)
        ... 21 more
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Jetty and SSL Error

Postby Lapo » 05 Jan 2018, 18:28

It looks like you have introduced an error in the ssl.ini file.
Can you send us the file so we can take a look? You can use our support@... email box with a reference to this discussion.

The problem is definitely the changes to the config.

Hope it helps
Lapo

--

gotoAndPlay()

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

Re: Jetty and SSL Error

Postby Ninjaoninja2 » 08 Jan 2018, 19:51

Lapo wrote:It looks like you have introduced an error in the ssl.ini file.
Can you send us the file so we can take a look? You can use our support@... email box with a reference to this discussion.

The problem is definitely the changes to the config.

Hope it helps

Hey Lapo,
I've sent an email in! Awaiting your response.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 71 guests