Not able to run both httpd and gitblit

148 views
Skip to first unread message

Sukumar Reddy

unread,
Feb 16, 2016, 10:32:50 AM2/16/16
to gitblit
Hi,

1.
configured httpd
    started httpd service and able to browse http://localhost:8080

2.
 configured gitblit and tried to start it as below
     java -jar gitblit.jar --baseFolder data

     started failing with the below error
              2016-02-16 07:04:59 [INFO ] Started o.e.j.w.WebAppContext@3d7de43d{/,file:/opt/gitblit/gitblit-1.7.1/data/temp/webapp/,AVAILABLE}{file:/opt/gitblit/gitblit-1.7.1/gitblit.jar}
              2016-02-16 07:04:59 [WARN ] FAILED ServerConnector@11819f3c{SSL-HTTP/1.1}{0.0.0.0:8443}: java.net.BindException: Address already in use

then I stopped httpd and started gitblit and  it got started without any issues.

3.
Since gitblit is working fine i tried starting httpd and it  started gave the below error
                  Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.


So finally i can run any one of the application only, can you please suggest me where i am going wrong so that i can make sure that both the services are running.


Thanks
PSK

Tamas Papp

unread,
Feb 16, 2016, 10:36:03 AM2/16/16
to git...@googlegroups.com
As far as I understand, you configured apache to listen on 8080, why?
Usually something like this is the topology:


gitblit (jetty/tomcat) [8080] -> apache [80, 443] -> internet


tamas

Sukumar Reddy

unread,
Feb 16, 2016, 10:51:09 AM2/16/16
to gitblit
Hi Tamas,

I took default ports for httpd and  gitblit.

can you pls suggest the best way

thanks
PSK

Tamas Papp

unread,
Feb 16, 2016, 11:17:07 AM2/16/16
to git...@googlegroups.com


On 02/16/2016 04:51 PM, Sukumar Reddy wrote:
> Hi Tamas,
>
> I took default ports for httpd and gitblit.
>
> can you pls suggest the best way

I'm sure, that apache does bind to 8080 by default.

tamas

Jamey Graham

unread,
Feb 22, 2016, 1:40:24 PM2/22/16
to gitblit
it seems like you've been running into problems that don't really relate to GitBlit and may be better directed to other support forums.  That said, the error you've encountered simply relates to the fact that you're trying to have two different processes bind to the same tcp/ip port.  Exactly why this isn't allowed can't really be addressed here, but it is a fairly basic networking concept and if you're interested in the specifics than Googling around for "tcpip sockets" should lead to an explanation.

Specific to your question - can you run both?  Yes, you can.  But you can't have both processes listen to port 8080 (or 8443) at the same time.  Since this is the GitBlit forum, how to change the port(s) GitBlit GO listens to is covered in bullet #2 of the GO Setup guide:

The server itself is configured through a simple text file.
Open data/gitblit.properties in your favorite text editor and make sure to review and set:
    • server.httpPort and server.httpsPort
Set server.httpPort to 8081 and server.httpsPort to 8444 (i'm blindly assuming those ports aren't in use by something else! if it is in use, just keep adding 1 until you find one that's free).

If you'd rather change the port httpd listens to, consult the apache docs 
Reply all
Reply to author
Forward
0 new messages