zengkid / SmartTomcat

The Tomcat plugin for Intellij IDEA
Apache License 2.0
126 stars 55 forks source link

Multiple Tomcat with 'AJP port 8009 already in use' issue #9

Closed barats closed 6 years ago

barats commented 6 years ago

When I try to start two or more Tomcat via SmartTomcat plugin, it says AJP port 8009 already in use and failed.

Could you update your plugin and modify AJP port number when there are multiple tomcat instance running ?

Many thanks ahead.

zengkid commented 6 years ago

Hi,Setmet

You can update it in $tomcat_home/conf/server.xml

Regards Kid


From: Barat Semet notifications@github.com Sent: Wednesday, April 18, 2018 11:06:49 AM To: zengkid/SmartTomcat Cc: Subscribed Subject: [zengkid/SmartTomcat] Multiple Tomcat with 'AJP port 8009 already in use' issue (#9)

When I try to start two or more Tomcat via SmartTomcat plugin, it says AJP port 8009 already in use and failed.

Could you update your plugin and modify AJP port number when there are multiple tomcat instance running ?

Many thanks ahead.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/zengkid/SmartTomcat/issues/9, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADOd05hzsE40Ppt_CvCGUiKm0xYQX4z-ks5tpq3JgaJpZM4TZWfk.

barats commented 6 years ago

What if I want to start multiple instances from single Tomcat ?

I checked out your code and can't help but thinking: maybe we can do some alternations in com.poratu.idea.plugins.tomcat.conf.AppCommandLineState to support such a mechanism.

What's your opinion about this approach ?

yl-coder commented 6 years ago

@barats you can do that by modifying the server.xml of each run configuration. Basically the server.xml of each run configuration you setup can be found at $USERHOME/.smartTomcat/configurationName/conf/server.xml.

If you want a automatic way, you can build a custom jar from my forked repo. link

It will automatically assign AJP and tomcat port to be HTTP port + 1/ + 2.

I will create the GUI for users to key in those port in future and create a pull request. when i'm free.