S
S
santaTihonov2019-01-12 14:21:24
Java
santaTihonov, 2019-01-12 14:21:24

How to run site sources (in Java)?

Hi everybody.
There are sources of a working site, which is deployed on a hosting and works successfully.
Downloaded content to my PC:
5c39cc2ab58b9891146461.png
Trying to run sources locally. IntelliJ IDEA says the following:

/Users/testUser/Applications/tomcat/bin/catalina.sh run
NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
[2019-01-12 02:18:12,194] Artifact FULL:war exploded: Waiting for server connection to start artifact deployment...
Connected to server
[2019-01-12 02:18:12,216] Artifact FULL:war exploded: Artifact is being deployed, please wait...
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 1099; nested exception is: 
  java.net.BindException: Address already in use (Bind failed)
jdk.internal.agent.AgentConfigurationError: java.rmi.server.ExportException: Port already in use: 1099; nested exception is: 
  java.net.BindException: Address already in use (Bind failed)
  at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:491)
  at jdk.management.agent/jdk.internal.agent.Agent.startAgent(Agent.java:447)
  at jdk.management.agent/jdk.internal.agent.Agent.startAgent(Agent.java:599)
Caused by: java.rmi.server.ExportException: Port already in use: 1099; nested exception is: 
  java.net.BindException: Address already in use (Bind failed)
  at java.rmi/sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:335)
  at java.rmi/sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:243)
  at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:411)
  at java.rmi/sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147)
  at java.rmi/sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:233)
  at java.rmi/sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:220)
  at java.rmi/sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:180)
  at jdk.management.agent/sun.management.jmxremote.SingleEntryRegistry.<init>(SingleEntryRegistry.java:49)
  at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.exportMBeanServer(ConnectorBootstrap.java:836)
  at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:479)
  ... 2 more
Caused by: java.net.BindException: Address already in use (Bind failed)
  at java.base/java.net.PlainSocketImpl.socketBind(Native Method)
  at java.base/java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:436)
  at java.base/java.net.ServerSocket.bind(ServerSocket.java:381)
  at java.base/java.net.ServerSocket.<init>(ServerSocket.java:243)
  at java.base/java.net.ServerSocket.<init>(ServerSocket.java:135)
  at java.rmi/sun.rmi.transport.tcp.TCPDirectSocketFactory.createServerSocket(TCPDirectSocketFactory.java:45)
  at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:666)
  at java.rmi/sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:324)
  ... 11 more
Disconnected from server

At the same time, when I make a site from scratch, everything works correctly.
Who can tell in which direction to dig? MB I uploaded the source codes to the IDE on the wrong side? =))

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
alfss, 2019-01-12
@alfss

BindException: Address already in use Change
the port or turn off what interferes

M
mamadaliev, 2019-04-26
@mamadaliev

Writes that port 1099 is busy, you need to change it to another one, for example, to 8080
Another way to solve the problem is to disable the process that uses this port:

ps -aef | grep 1099
kill -9 PID

R
Rodion Kudryavtsev, 2019-01-13
@rodkud

Do you speak at least a little English? You write either the address is busy, then look at the logs for the details of the error...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question