#1 2022-07-18 08:08:54

Johann
Member
Registered: 2022-05-30

Upgrade to v4.2.0: java.net.BindException: Address already in use

I am following the upgrade steps at https://reportserver.net/en/tutorials/upgrade-30/, but after starting ReportServer on Tomcat, the application hangs at the ReportServer loading screen. From the reportserver, it seems the port 8022 is already in use. I tried killing the process using this port but that has not worked. Here are my reportserver logs:

  _____                       _    _____                            ______       _                       _
 |  __ \                     | |  / ____|                          |  ____|     | |                     (_)
 | |__) |___ _ __   ___  _ __| |_| (___   ___ _ ____   _____ _ __  | |__   _ __ | |_ ___ _ __ _ __  _ __ _ ___  ___
 |  _  // _ \ '_ \ / _ \| '__| __|\___ \ / _ \ '__\ \ / / _ \ '__| |  __| | '_ \| __/ _ \ '__| '_ \| '__| / __|/ _ \
 | | \ \  __/ |_) | (_) | |  | |_ ____) |  __/ |   \ V /  __/ |    | |____| | | | ||  __/ |  | |_) | |  | \__ \  __/
 |_|  \_\___| .__/ \___/|_|   \__|_____/ \___|_|    \_/ \___|_|    |______|_| |_|\__\___|_|  | .__/|_|  |_|___/\___|
            | |                                                                              | |
            |_|                                                                              |_|

Version: RS4.2.0-6066 2022-06-29-18-43-47
Code Version: 2021-11-08-11-18-29
Java Version: Oracle Corporation OpenJDK 64-Bit Server VM 25.181-b13 (1.8)
VM Args: -Djava.util.logging.config.file=/opt/tomcat/apache-tomcat-9.0.27/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -Dcatalina.base=/opt/tomcat/apache-tomcat-9.0.27 -Dcatalina.home=/opt/tomcat/apache-tomcat-9.0.27 -Djava.io.tmpdir=/opt/tomcat/apache-tomcat-9.0.27/temp
rs.configdir: Not Configured

### DB Config ###
hibernate.dialect: net.datenwerke.rs.utils.hibernate.MySQL5Dialect (OK)
hibernate.connection.driver_class: com.mysql.cj.jdbc.Driver (OK)
hibernate.connection.url: jdbc:mysql://localhost:3306/reportserver (OK)
hibernate.connection.username: omc
hibernate.connection.password: **********
hibernate.default_schema:

Connection Test: OK
Schema Version: RS3.0-23

18-Jul-2022 16:04:43.037 INFO [main] net.datenwerke.rs.EnvironmentValidator.startup Validating database schema...
18-Jul-2022 16:04:53.414 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure try to bind: net.datenwerke.rs.saiku.server.rest.resources.AdminResource
18-Jul-2022 16:04:53.415 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure done binding: net.datenwerke.rs.saiku.server.rest.resources.AdminResource
18-Jul-2022 16:04:53.415 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure try to bind: net.datenwerke.rs.saiku.server.rest.resources.BasicRepositoryResource2
18-Jul-2022 16:04:53.415 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure done binding: net.datenwerke.rs.saiku.server.rest.resources.BasicRepositoryResource2
18-Jul-2022 16:04:53.416 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure try to bind: net.datenwerke.rs.saiku.server.rest.resources.DataSourceResource
18-Jul-2022 16:04:53.416 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure done binding: net.datenwerke.rs.saiku.server.rest.resources.DataSourceResource
18-Jul-2022 16:04:53.416 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure try to bind: net.datenwerke.rs.saiku.server.rest.resources.ExporterResource
18-Jul-2022 16:04:53.416 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure done binding: net.datenwerke.rs.saiku.server.rest.resources.ExporterResource
18-Jul-2022 16:04:53.416 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure try to bind: net.datenwerke.rs.saiku.server.rest.resources.FilterRepositoryResource
18-Jul-2022 16:04:53.417 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure done binding: net.datenwerke.rs.saiku.server.rest.resources.FilterRepositoryResource
18-Jul-2022 16:04:53.417 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure try to bind: net.datenwerke.rs.saiku.server.rest.resources.InfoResource
18-Jul-2022 16:04:53.417 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure done binding: net.datenwerke.rs.saiku.server.rest.resources.InfoResource
18-Jul-2022 16:04:53.417 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure try to bind: net.datenwerke.rs.saiku.server.rest.resources.License
18-Jul-2022 16:04:53.417 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure done binding: net.datenwerke.rs.saiku.server.rest.resources.License
18-Jul-2022 16:04:53.418 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure try to bind: net.datenwerke.rs.saiku.server.rest.resources.OlapDiscoverResource
18-Jul-2022 16:04:53.418 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure done binding: net.datenwerke.rs.saiku.server.rest.resources.OlapDiscoverResource
18-Jul-2022 16:04:53.418 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure try to bind: net.datenwerke.rs.saiku.server.rest.resources.Query2Resource
18-Jul-2022 16:04:53.418 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure done binding: net.datenwerke.rs.saiku.server.rest.resources.Query2Resource
18-Jul-2022 16:04:53.418 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure try to bind: net.datenwerke.rs.saiku.server.rest.resources.SessionResource
18-Jul-2022 16:04:53.419 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure done binding: net.datenwerke.rs.saiku.server.rest.resources.SessionResource
18-Jul-2022 16:04:53.419 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure try to bind: net.datenwerke.rs.saiku.server.rest.resources.SaikuI18nResource
18-Jul-2022 16:04:53.419 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure done binding: net.datenwerke.rs.saiku.server.rest.resources.SaikuI18nResource
18-Jul-2022 16:04:53.419 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure try to bind: net.datenwerke.rs.saiku.server.rest.resources.StatisticsResource
18-Jul-2022 16:04:53.420 INFO [main] net.datenwerke.rs.saiku.server.rest.SaikuRestModule.configure done binding: net.datenwerke.rs.saiku.server.rest.resources.StatisticsResource
18-Jul-2022 16:04:53.727 INFO [main] net.datenwerke.rsenterprise.main.service.RsEnterpriseModule.configureServlets SAP Crystal libraries not present
18-Jul-2022 16:04:58.938 WARNING [main] net.datenwerke.rs.configservice.service.configservice.ConfigServiceImpl.getConfigFailsafe Configfile scheduler/scheduler.cf could not be loaded. Default values are in effect.
18-Jul-2022 16:04:58.942 WARNING [main] net.datenwerke.rs.configservice.service.configservice.ConfigServiceImpl.getConfigFailsafe Configfile exportfilemd/pdfexport.cf could not be loaded. Default values are in effect.
18-Jul-2022 16:04:58.943 WARNING [main] net.datenwerke.rs.configservice.service.configservice.ConfigServiceImpl.getConfigFailsafe Configfile exportfilemd/pdfexport.cf could not be loaded. Default values are in effect.
18-Jul-2022 16:04:59.136 INFO [main] net.datenwerke.rs.saiku.service.saiku.ThinQueryServiceImpl.<init> loaded thinqueryservice
18-Jul-2022 16:04:59.380 INFO [main] net.datenwerke.rs.core.service.i18ntools.RemoteMessageServiceImpl.<init> Loading messages...
18-Jul-2022 16:05:07.978 INFO [main] net.datenwerke.rs.core.service.i18ntools.RemoteMessageServiceImpl.<init> Available locales: de, hi, lo, pt, lt, hr, lv, hu, zh-CN, hy, uk, id, mk, mn, af, uz, ms, el, mt, en, is, it, my, es, et, eu, vi, ja, ne, ro, nl, no, ru, be, fi, bg, keys, fr, bn, jw, bs, ka, si, sk, sl, ga, gd, ca, sq, sr, kk, km, sv, ko, zh-TW, ta, cs, th, lb, tl, pl, da, tr
18-Jul-2022 16:05:13.970 INFO [Thread-29] net.datenwerke.rs.core.service.jarextension.hookers.ReportServerExtenderHooker.initialize Start loading ReportServer extensions.
18-Jul-2022 16:05:13.980 INFO [Thread-29] net.datenwerke.rs.core.service.EnvironmentAfterStartupInformation.initialize

Application Server: Apache Tomcat/9.0.27

### PAM Configuration ###
Static PAM configuration: net.datenwerke.rs.authenticator.service.pam.UserPasswordPAMAuthoritative
Finalized PAM configuration: class net.datenwerke.rs.authenticator.service.pam.UserPasswordPAMAuthoritative


18-Jul-2022 16:05:14.816 SEVERE [Thread-29] org.apache.sshd.common.util.logging.LoggingUtils.error bind(0.0.0.0/0.0.0.0:8022) - failed (BindException) to bind: Address already in use
18-Jul-2022 16:05:14.817 WARNING [Thread-29] net.datenwerke.rs.remoteaccess.service.RemoteAccessStartup$1.initialize Failed to start SFTP Server
        java.net.BindException: Address already in use
                at sun.nio.ch.Net.bind0(Native Method)
                at sun.nio.ch.Net.bind(Net.java:433)
                at sun.nio.ch.Net.bind(Net.java:425)
                at sun.nio.ch.AsynchronousServerSocketChannelImpl.bind(AsynchronousServerSocketChannelImpl.java:162)
                at org.apache.sshd.common.io.nio2.Nio2Acceptor.bind(Nio2Acceptor.java:81)
                at org.apache.sshd.common.io.nio2.Nio2Acceptor.bind(Nio2Acceptor.java:171)
                at org.apache.sshd.server.SshServer.start(SshServer.java:340)
                at net.datenwerke.rs.remoteaccess.service.sftp.SftpServiceImpl.start(SftpServiceImpl.java:163)
                at net.datenwerke.rs.remoteaccess.service.RemoteAccessStartup$1.initialize(RemoteAccessStartup.java:33)
                at net.datenwerke.gf.service.lateinit.LateInitStartup$1.run(LateInitStartup.java:62)
                at java.lang.Thread.run(Thread.java:748)
18-Jul-2022 16:05:14.897 INFO [Thread-29] net.datenwerke.rs.search.service.search.SearchServiceImpl.rebuildIndex Rebuilding search index...
18-Jul-2022 16:05:16.286 INFO [Thread-29] net.datenwerke.gf.service.lateinit.LateInitStartup$1.run Startup completed

Any advice or help would be much appreciated. Thank you!

Offline

#2 2022-07-18 08:45:41

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Upgrade to v4.2.0: java.net.BindException: Address already in use

Hi Johann,

I don't think this has to do with the upgrade. For making sure, you can disable the SFTP service for testing if you get any error messages and if your ReportServer starts:

https://reportserver.net/en/guides/conf … sc-misccf/

<sftp disabled="true">

Regards,
Eduardo

Offline

#3 2022-07-18 09:59:08

Johann
Member
Registered: 2022-05-30

Re: Upgrade to v4.2.0: java.net.BindException: Address already in use

Hi Eduardo,

I have completely removed my previous installation of ReportServer, so I am unable to change that setting in misc/misc.cf. I did not change sftp disabled to true before removing my previous installation. Could that be the issue?

Offline

#4 2022-07-18 11:43:46

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Upgrade to v4.2.0: java.net.BindException: Address already in use

Hi Johann,

you can try the upgrade again but disabling the sftp server before. As I mentioned, I don't think this is the issue, though, but you can try this to be sure.

Regards,
Eduardo

Offline

#5 2022-07-19 01:56:50

Johann
Member
Registered: 2022-05-30

Re: Upgrade to v4.2.0: java.net.BindException: Address already in use

Hi Eduardo,

I have tried to reinstall my previous version of ReportServer by moving my reportserver folder back into my Tomcat webapps directory. However, now I am unable to even log in to ReportServer:

Error
Type 'net.datenwerke.rs.core.client.genrights.AccessRsGenericTargetIdentifier' was not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom field serializer. For security purposes, this type will not be deserialized.

How should I go about debugging from here? My reportserver logs still show:

net.datenwerke.rs.remoteaccess.service.RemoteAccessStartup$1.initialize Failed to start SFTP Server
        java.net.BindException: Address already in use

Offline

#6 2022-07-19 07:00:46

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Upgrade to v4.2.0: java.net.BindException: Address already in use

Hi Johann,

" reinstall my previous version of ReportServer by moving my reportserver folder back into my Tomcat webapps directory"
-> since I am not sure if your database was modified, this is not the correct way to return to your old version. You should also return to your db backup. Then the old version should work, as both a backup of application and db are needed.

Regards,
Eduardo

Offline

#7 2023-02-06 05:56:59

carlhyde
Member
Registered: 2023-02-06

Re: Upgrade to v4.2.0: java.net.BindException: Address already in use

"java.net.BindException: Address already in use" is an error message that occurs when an application tries to bind to a socket address (i.e., an IP address and port number) that is already being used by another process on the same machine. This error can happen when attempting to start a server or client socket and can be resolved by either choosing a different java socket address or stopping the process that is already using the desired socket address.

To resolve the  error, you can try the following steps:

Identify the process that is using the same socket address: You can use the "netstat" command in Windows or "lsof" command in Unix/Linux to determine which process is using the desired socket address.

Stop the process using the socket address: Once you've identified the process, you can stop it using the appropriate methods for your operating system.

Choose a different socket address: If you cannot or do not want to stop the process that is using the desired socket address, you can try binding to a different socket address.

The steps to resolve the error can vary depending on the specific situation, so it may be necessary to try multiple approaches.

Offline

Board footer

Powered by FluxBB