You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by deckrider <de...@gmail.com> on 2008/08/26 17:17:46 UTC

502 Bad Gateway from archiva 1.1.1

After running successfully for a few days, archiva 1.1.1 on solaris
started returning errors like this during mvn deploy:

[INFO] Error installing artifact's metadata: Error while deploying
metadata: Failed to transfer file:
http://archiva.example.com/repository/internal/com/example/clientservices/8.10.1.24/clientservices-8.10.1.24.pom.
Return code is: 502 Bad Gateway

After restarting archiva, this went away for a while but appears to
return occasionally, requiring another restart.

I've reconfigured stand alone archiva slightly from the default as
shown in the patch that is attached.  And we've also applied
wrapper-delta-pack-3.2.3.tar.gz so that we could run it on solaris.

We never reference this archiva directly but use the following apache
virtual host / proxy configuration:

<VirtualHost *:80>
        ServerName archiva.example.com
        ServerAdmin deckrider@example.com
        ProxyRequests Off
        <Proxy *>
                Order deny,allow
                Allow from all
        </Proxy>
        ProxyPass / http://localhost:8091/
        ProxyPreserveHost On
</VirtualHost>

We configure our maven pom.xml files like this:


  <distributionManagement>
    <repository>
      <id>internal</id>
      <url>dav:http://archiva.example.com/repository/internal/</url>
    </repository>
  </distributionManagement>

  <repositories>
    <repository>
      <id>internal</id>
      <name>Archiva Managed Internal Repository</name>
      <url>http://archiva.example.com/repository/internal/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

And here is the output from 'mvn --version':

Maven version: 2.0.9
Java version: 1.5.0_14
OS name: "sunos" version: "5.10" arch: "sparc" Family: "unix"

I fear we may have to go back to archiva 1.0.2 if this keeps happening
or if we don't find a fix.

As a random guess I was wondering if more memory would need to be
allocated, but I don't know how to pass -Xmx and the like through the
start up script.

Thanks in advance for your help.

Re: 502 Bad Gateway from archiva 1.1.1

Posted by deckrider <de...@gmail.com>.
So we seem to be citing conflicting Sun docs. How does one find out
which is correct?

(By the way, so far I've not had anymore 502 errors--thanks for the
assistance in finding the wrapper.conf file)

On 8/27/08, deckrider <de...@gmail.com> wrote:
> -Xmx defaults are shown here:
>
> http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/java.html
>
> On 8/27/08, Wendy Smoak <ws...@gmail.com> wrote:
>> For what version of the JDK?  As of 1.5, it should default to 1/4 the
>> physical memory, up to 1GB.
>>
>> http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html
>>
>> --
>> Wendy
>>
>> On Wed, Aug 27, 2008 at 5:53 AM, deckrider <de...@gmail.com> wrote:
>>> Just FYI, I went back to the solaris sparc 32 wrapper.conf of archiva
>>> 1.0.2 to see the max heap size there.  It was set to 128m  (as
>>> delivered in apache-archiva-1.0.2-bin.zip).  And according to the Sun
>>> Java documentation, if not provided, -Xmx defaults to 64m.  Thus
>>> archiva 1.0.2 stand alone requires twice the heap space of archiva
>>> 1.1.1 stand alone.
>>
>
> --
> Sent from my mobile device
>
> ASCII ribbon campaign:
> ()  against HTML email
> /\  against Microsoft attachments
>     Information:  http://www.expita.com/nomime.html
>

-- 
Sent from my mobile device

ASCII ribbon campaign:
()  against HTML email
/\  against Microsoft attachments
    Information:  http://www.expita.com/nomime.html

Re: 502 Bad Gateway from archiva 1.1.1

Posted by deckrider <de...@gmail.com>.
-Xmx defaults are shown here:

http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/java.html

On 8/27/08, Wendy Smoak <ws...@gmail.com> wrote:
> For what version of the JDK?  As of 1.5, it should default to 1/4 the
> physical memory, up to 1GB.
>
> http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html
>
> --
> Wendy
>
> On Wed, Aug 27, 2008 at 5:53 AM, deckrider <de...@gmail.com> wrote:
>> Just FYI, I went back to the solaris sparc 32 wrapper.conf of archiva
>> 1.0.2 to see the max heap size there.  It was set to 128m  (as
>> delivered in apache-archiva-1.0.2-bin.zip).  And according to the Sun
>> Java documentation, if not provided, -Xmx defaults to 64m.  Thus
>> archiva 1.0.2 stand alone requires twice the heap space of archiva
>> 1.1.1 stand alone.
>

-- 
Sent from my mobile device

ASCII ribbon campaign:
()  against HTML email
/\  against Microsoft attachments
    Information:  http://www.expita.com/nomime.html

Re: 502 Bad Gateway from archiva 1.1.1

Posted by Wendy Smoak <ws...@gmail.com>.
For what version of the JDK?  As of 1.5, it should default to 1/4 the
physical memory, up to 1GB.

http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html

-- 
Wendy

On Wed, Aug 27, 2008 at 5:53 AM, deckrider <de...@gmail.com> wrote:
> Just FYI, I went back to the solaris sparc 32 wrapper.conf of archiva
> 1.0.2 to see the max heap size there.  It was set to 128m  (as
> delivered in apache-archiva-1.0.2-bin.zip).  And according to the Sun
> Java documentation, if not provided, -Xmx defaults to 64m.  Thus
> archiva 1.0.2 stand alone requires twice the heap space of archiva
> 1.1.1 stand alone.

Re: 502 Bad Gateway from archiva 1.1.1

Posted by deckrider <de...@gmail.com>.
Just FYI, I went back to the solaris sparc 32 wrapper.conf of archiva
1.0.2 to see the max heap size there.  It was set to 128m  (as
delivered in apache-archiva-1.0.2-bin.zip).  And according to the Sun
Java documentation, if not provided, -Xmx defaults to 64m.  Thus
archiva 1.0.2 stand alone requires twice the heap space of archiva
1.1.1 stand alone.

On Tue, Aug 26, 2008 at 8:17 PM, Brett Porter <br...@gmail.com> wrote:
> 2008/8/27 deckrider <de...@gmail.com>:
>> Thanks for responding, your comment about archiva not responding makes
>> sense, because it was only after waiting a long time that the 502 was
>> finally returned.
>>
>> The conf/wrapper.conf file has not been altered as delivered from
>> apache-archiva-1.1.1-bin.zip, but I don't see any -Xmx in it.  However I
>> do see:
>>
>> # Maximum Java Heap Size (in MB)
>> #wrapper.java.maxmemory=64
>>
>> As you can see it appears to be commented out.  I'll try uncommenting it
>> and making it larger.  Is there a recommended value?
>
> That's the right way to change it.
>
> The JVM default is usually enough - if you're seeing out of memory
> with that I'd certainly like to know so we can investigate the problem
> or if necedsary increase the default.
>
>>
>> I've lost the logs from earlier in the rush to get things working again,
>> but I'll be sure to keep them if/when this happens again.
>
> Thanks!
> - Brett
>
> --
> Brett Porter
> Blog: http://blogs.exist.com/bporter/
>



-- 
ASCII ribbon campaign:
() against HTML email
/\ against Microsoft attachments
 Information: http://www.expita.com/nomime.html

Re: 502 Bad Gateway from archiva 1.1.1

Posted by Brett Porter <br...@gmail.com>.
2008/8/27 deckrider <de...@gmail.com>:
> Thanks for responding, your comment about archiva not responding makes
> sense, because it was only after waiting a long time that the 502 was
> finally returned.
>
> The conf/wrapper.conf file has not been altered as delivered from
> apache-archiva-1.1.1-bin.zip, but I don't see any -Xmx in it.  However I
> do see:
>
> # Maximum Java Heap Size (in MB)
> #wrapper.java.maxmemory=64
>
> As you can see it appears to be commented out.  I'll try uncommenting it
> and making it larger.  Is there a recommended value?

That's the right way to change it.

The JVM default is usually enough - if you're seeing out of memory
with that I'd certainly like to know so we can investigate the problem
or if necedsary increase the default.

>
> I've lost the logs from earlier in the rush to get things working again,
> but I'll be sure to keep them if/when this happens again.

Thanks!
- Brett

-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

Re: 502 Bad Gateway from archiva 1.1.1

Posted by deckrider <de...@gmail.com>.
Thanks for responding, your comment about archiva not responding makes
sense, because it was only after waiting a long time that the 502 was
finally returned.

The conf/wrapper.conf file has not been altered as delivered from
apache-archiva-1.1.1-bin.zip, but I don't see any -Xmx in it.  However I
do see:

# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64

As you can see it appears to be commented out.  I'll try uncommenting it
and making it larger.  Is there a recommended value?

I've lost the logs from earlier in the rush to get things working again,
but I'll be sure to keep them if/when this happens again.

On Wed, Aug 27, 2008 at 09:59:25AM +1000, Brett Porter wrote:
> 502 from Httpd means that Archiva is not responding. Is there anything
> in its logs to indicate what is wrong? If it is out of memory, you can
> pass the -X parameters in wrapper.conf (is this modified from the
> deafult installation too)?
> 
> Cheers,
> Brett
> 
> 2008/8/27 deckrider <de...@gmail.com>:
> > After running successfully for a few days, archiva 1.1.1 on solaris
> > started returning errors like this during mvn deploy:
> >
> > [INFO] Error installing artifact's metadata: Error while deploying
> > metadata: Failed to transfer file:
> > http://archiva.example.com/repository/internal/com/example/clientservices/8.10.1.24/clientservices-8.10.1.24.pom.
> > Return code is: 502 Bad Gateway
> >
> > After restarting archiva, this went away for a while but appears to
> > return occasionally, requiring another restart.
> >
> > I've reconfigured stand alone archiva slightly from the default as
> > shown in the patch that is attached.  And we've also applied
> > wrapper-delta-pack-3.2.3.tar.gz so that we could run it on solaris.
> >
> > We never reference this archiva directly but use the following apache
> > virtual host / proxy configuration:
> >
> > <VirtualHost *:80>
> >        ServerName archiva.example.com
> >        ServerAdmin deckrider@example.com
> >        ProxyRequests Off
> >        <Proxy *>
> >                Order deny,allow
> >                Allow from all
> >        </Proxy>
> >        ProxyPass / http://localhost:8091/
> >        ProxyPreserveHost On
> > </VirtualHost>
> >
> > We configure our maven pom.xml files like this:
> >
> >
> >  <distributionManagement>
> >    <repository>
> >      <id>internal</id>
> >      <url>dav:http://archiva.example.com/repository/internal/</url>
> >    </repository>
> >  </distributionManagement>
> >
> >  <repositories>
> >    <repository>
> >      <id>internal</id>
> >      <name>Archiva Managed Internal Repository</name>
> >      <url>http://archiva.example.com/repository/internal/</url>
> >      <releases>
> >        <enabled>true</enabled>
> >      </releases>
> >      <snapshots>
> >        <enabled>false</enabled>
> >      </snapshots>
> >    </repository>
> >  </repositories>
> >
> > And here is the output from 'mvn --version':
> >
> > Maven version: 2.0.9
> > Java version: 1.5.0_14
> > OS name: "sunos" version: "5.10" arch: "sparc" Family: "unix"
> >
> > I fear we may have to go back to archiva 1.0.2 if this keeps happening
> > or if we don't find a fix.
> >
> > As a random guess I was wondering if more memory would need to be
> > allocated, but I don't know how to pass -Xmx and the like through the
> > start up script.
> >
> > Thanks in advance for your help.
> >
> 
> 
> 
> -- 
> Brett Porter
> Blog: http://blogs.exist.com/bporter/

Re: 502 Bad Gateway from archiva 1.1.1

Posted by Brett Porter <br...@gmail.com>.
502 from Httpd means that Archiva is not responding. Is there anything
in its logs to indicate what is wrong? If it is out of memory, you can
pass the -X parameters in wrapper.conf (is this modified from the
deafult installation too)?

Cheers,
Brett

2008/8/27 deckrider <de...@gmail.com>:
> After running successfully for a few days, archiva 1.1.1 on solaris
> started returning errors like this during mvn deploy:
>
> [INFO] Error installing artifact's metadata: Error while deploying
> metadata: Failed to transfer file:
> http://archiva.example.com/repository/internal/com/example/clientservices/8.10.1.24/clientservices-8.10.1.24.pom.
> Return code is: 502 Bad Gateway
>
> After restarting archiva, this went away for a while but appears to
> return occasionally, requiring another restart.
>
> I've reconfigured stand alone archiva slightly from the default as
> shown in the patch that is attached.  And we've also applied
> wrapper-delta-pack-3.2.3.tar.gz so that we could run it on solaris.
>
> We never reference this archiva directly but use the following apache
> virtual host / proxy configuration:
>
> <VirtualHost *:80>
>        ServerName archiva.example.com
>        ServerAdmin deckrider@example.com
>        ProxyRequests Off
>        <Proxy *>
>                Order deny,allow
>                Allow from all
>        </Proxy>
>        ProxyPass / http://localhost:8091/
>        ProxyPreserveHost On
> </VirtualHost>
>
> We configure our maven pom.xml files like this:
>
>
>  <distributionManagement>
>    <repository>
>      <id>internal</id>
>      <url>dav:http://archiva.example.com/repository/internal/</url>
>    </repository>
>  </distributionManagement>
>
>  <repositories>
>    <repository>
>      <id>internal</id>
>      <name>Archiva Managed Internal Repository</name>
>      <url>http://archiva.example.com/repository/internal/</url>
>      <releases>
>        <enabled>true</enabled>
>      </releases>
>      <snapshots>
>        <enabled>false</enabled>
>      </snapshots>
>    </repository>
>  </repositories>
>
> And here is the output from 'mvn --version':
>
> Maven version: 2.0.9
> Java version: 1.5.0_14
> OS name: "sunos" version: "5.10" arch: "sparc" Family: "unix"
>
> I fear we may have to go back to archiva 1.0.2 if this keeps happening
> or if we don't find a fix.
>
> As a random guess I was wondering if more memory would need to be
> allocated, but I don't know how to pass -Xmx and the like through the
> start up script.
>
> Thanks in advance for your help.
>



-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/