ControlSystemStudio / phoebus

A framework and set of tools to monitor and operate large scale control systems, such as the ones in the accelerator community.
http://phoebus.org/
Eclipse Public License 1.0
90 stars 90 forks source link

alarm-logger: How to change/disable tomcat port; missing properties file; broken `-help` #2277

Closed kasemir closed 2 years ago

kasemir commented 2 years ago

I'm trying to start the alarm-logger on a host where some process related to Thinlinc already uses TCP port 9000. The alarm-logger fails to start as shown below.

Issues:

java -jar service-alarm-logger-4.6.10-SNAPSHOT.jar -help
May 25, 2022 11:04:54 AM org.phoebus.framework.preferences.PreferencesReader <init>
SEVERE: Cannot read default preference settings for class org.phoebus.alarm.logging.AlarmLoggingService from /alarm_logging_service.properties
May 25, 2022 11:04:54 AM org.apache.catalina.util.LifecycleBase handleSubClassException
SEVERE: Failed to start component [Connector[HTTP/1.1-9000]]
org.apache.catalina.LifecycleException: Protocol handler start failed
    at org.apache.catalina.connector.Connector.startInternal(Connector.java:1008)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardService.addConnector(StandardService.java:226)
    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:259)
    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:197)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:311)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:164)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
    at org.phoebus.alarm.logging.AlarmLoggingService.main(AlarmLoggingService.java:79)
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:555)
    at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:337)
    at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:294)
    at java.base/sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:89)
    at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:239)
    at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:213)
    at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1116)
    at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1202)
    at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:568)
    at org.apache.catalina.connector.Connector.startInternal(Connector.java:1005)
    ... 14 more

May 25, 2022 11:04:54 AM org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter report
SEVERE: 

***************************
APPLICATION FAILED TO START
***************************

Description:

The Tomcat connector configured to listen on port 9000 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector's configuration, identify and stop any process that's listening on port 9000, or configure this application to listen on another port.
kasemir commented 2 years ago

How can I change the TCP port used by the SearchController

--> Start with -Dserver.port=9001