Centos7 - Plesk - Failed to initialize component [Connector[HTTP/1.1-8443]]

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

Moderators: Lapo, Bax

User avatar
pozeat
Posts: 20
Joined: 04 Oct 2012, 13:53
Location: France
Contact:

Centos7 - Plesk - Failed to initialize component [Connector[HTTP/1.1-8443]]

Postby pozeat » 07 Jun 2023, 11:19

Version : SFS2x 2.19.2

Hello everybody,

I am trying to run the sfs2x.sh on a Ionos Cloud Serveur with Plesk CentOS 7
I log to Plesk admin through port 8443

it returns an error, it says "Address already in use" :
07-Jun-2023 11:14:28.364 SEVERE [TomcatRunner] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to initialize component [Connector[HTTP/1.1-8443]]
org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1050)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:554)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1045)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.startup.Catalina.load(Catalina.java:724)
at org.apache.catalina.startup.Catalina.load(Catalina.java:746)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:307)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:477)
at com.smartfoxserver.v2.http.TomcatServer.start(TomcatServer.java:43)
at com.smartfoxserver.v2.SmartFoxServer$1.run(SmartFoxServer.java:325)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.net.BindException: Address already in use
at java.base/sun.nio.ch.Net.bind0(Native Method)
at java.base/sun.nio.ch.Net.bind(Net.java:455)
at java.base/sun.nio.ch.Net.bind(Net.java:447)
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:275)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:230)
at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1227)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1240)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:604)
at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:76)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1047)


Do you have any idea how I can fix this ?

Thank you
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Centos7 - Plesk - Failed to initialize component [Connector[HTTP/1.1-8443]]

Postby Lapo » 07 Jun 2023, 13:29

Hi,
it means that the embedded webserver cannot start due to another service using the same default port (8443)
If you have another service running on that port you may want to change its port value or, in alternative, you could change the default HTTPS port for SFS2X.

To do so you must manually edit the file located here --> SFS2X/lib/apache-tomcat/conf/server.xml
Search for the port number (8443) and use another value that you're sure is not used on your server.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
pozeat
Posts: 20
Joined: 04 Oct 2012, 13:53
Location: France
Contact:

Re: Centos7 - Plesk - Failed to initialize component [Connector[HTTP/1.1-8443]]

Postby pozeat » 07 Jun 2023, 17:04

Hi Lapo,

Thank you for your quick answer,

When changing the tomcat server to port 8445, I have no errors when I start sfs2x.sh

Then when I try to log in the admin in https, I use port 8445, but I have a websocket connection error in the console
'wss://mydomain.dev:8445/BlueBox/websocket' failed


I added rules to the firewall
Allow incoming from all on port 8445/udp
Allow incoming from all on port 8445/tcp

Could you give me another hint ?

Thank you
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Centos7 - Plesk - Failed to initialize component [Connector[HTTP/1.1-8443]]

Postby Lapo » 08 Jun 2023, 07:15

You're trying to connect via wss:// which is Websocket over SSL... unless you have already installed a signed SSL certificate this won't work.
For the initial server setup use the standard WSS.
In any case the login phase of the AdminTool is encrypted, regardless of an SSL certificate being deployed.

Cheers
p.s. = in order to deploy an SSL certificate see here --> http://docs2x.smartfoxserver.com/Gettin ... yptography
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Google [Bot] and 77 guests