Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Error 500 after initial install #905

Closed
travispost opened this issue Apr 10, 2015 · 6 comments
Closed

Internal Error 500 after initial install #905

travispost opened this issue Apr 10, 2015 · 6 comments
Labels
Bug Packages 📦 Things regarding our RPM packages

Comments

@travispost
Copy link

After installing OBS 2.6 on openSUSE 13.2, I was unable to login to the webui due to "Internal error 500." The solution was to add the following line to "/etc/apache2/vhosts.d/obs.conf":
SetEnv SSL_CERT_FILE /etc/ssl/certs/server.pem

This wasn't documented.

@hennevogel hennevogel added Bug Packages 📦 Things regarding our RPM packages labels Apr 10, 2015
@andykimpe
Copy link

13.1 no work solution webui Internal error 500

my /etc/apache2/vhosts.d/obs.conf

Listen 82

May needed on old distributions or after an update from them.

#Listen 443

Passenger defaults

PassengerSpawnMethod "smart"
PassengerMaxPoolSize 20
#RailsEnv "development"

allow long request urls and being part of headers

LimitRequestLine 20000
LimitRequestFieldsize 20000

Just the overview page

<VirtualHost *:80>
# just give an overview about this OBS instance via static web page
DocumentRoot "/srv/www/obs/overview"

    <Directory /srv/www/obs/overview>
       Options Indexes
       Allow from all
    </Directory>

Build Results

<VirtualHost *:82>
# The resulting repositories
DocumentRoot "/srv/obs/repos"

    <Directory /srv/obs/repos>
       Options Indexes FollowSymLinks
       Allow from all
    </Directory>

OBS WEBUI & API

<VirtualHost *:443>
ServerName api

    #  General setup for the virtual host
    DocumentRoot  "/srv/www/obs/api/public"
    ErrorLog /srv/www/obs/api/log/apache_error_log
    TransferLog /srv/www/obs/api/log/apache_access_log

    PassengerMinInstances 2
    PassengerPreStart https://api

    SSLEngine on

    #  SSL protocols
    #  Supporting TLS only is adequate nowadays
    SSLProtocol all -SSLv2 -SSLv3
    #   SSL Cipher Suite:
    #   List the ciphers that the client is permitted to negotiate.
    #   We disable weak ciphers by default.
    #   See the mod_ssl documentation or "openssl ciphers -v" for a
    #   complete list.
    SSLCipherSuite ALL:!aNULL:!eNULL:!SSLv2:!LOW:!EXP:!MD5:@STRENGTH

    SSLCertificateFile /srv/obs/certs/server.crt
    SSLCertificateKeyFile /srv/obs/certs/server.key
    SetEnv SSL_CERT_FILE /etc/ssl/certs/server.pem

    <Directory /srv/www/obs/api/public>
       AllowOverride all
       Options -MultiViews

       # This requires mod_xforward loaded in apache
       # Enable the usage via options.yml
       # This will decrease the load due to long running requests a lot (unloading from rails stack)
       XForward on

       Allow from all
    </Directory>
SetEnvIf User-Agent ".*MSIE [1-5].*" \
             nokeepalive ssl-unclean-shutdown \
             downgrade-1.0 force-response-1.0

    CustomLog /var/log/apache2/ssl_request_log   ssl_combined


    # from http://guides.rubyonrails.org/asset_pipeline.html
    <LocationMatch "^/assets/.*$">
      Header unset ETag
      FileETag None
      # RFC says only cache for 1 year
      ExpiresActive On
      ExpiresDefault "access plus 1 year"
   </LocationMatch>

    SetEnvIf User-Agent ".*MSIE [1-5].*" \
             nokeepalive ssl-unclean-shutdown \
             downgrade-1.0 force-response-1.0

    ## Older firefox versions needs this, otherwise it wont cache anything over SSL.
    Header append Cache-Control "public"

    CustomLog /var/log/apache2/ssl_request_log   ssl_combined

@travispost
Copy link
Author

@andykimpe Just to clarify, the SetEnv SSL_CERT_FILE value should match the SSLCertificateFile value, so in your config it would be:

    SSLCertificateFile /srv/obs/certs/server.crt
    SSLCertificateKeyFile /srv/obs/certs/server.key
    SetEnv SSL_CERT_FILE /srv/obs/certs/server.crt

@ymiroshnyk
Copy link

I have the same issue: after installing of obs "500: Internal Server Error".
Adding this line:
SetEnv SSL_CERT_FILE /srv/obs/certs/server.pem
to /etc/apache2/vhosts.d/obs.conf didn't help.

(Installed in virtualbox VM)

@ymiroshnyk
Copy link

My problem was in local dns server. When I changed it to 8.8.8.8 everything works fine without any modifications of obs.conf

@luizluca
Copy link
Contributor

It seems that OBS uses the first domain in dns search in order to form its FQDN. If the formed FQDN does not resolv into OBS ip address, I get the 500 error.

In my case:
domain search is: domain1.com, domain2.com, domain3.com
machine domain is: domain3.com
machine name is: obs

The correct FQDN is obs.domain3.com while OBS show in logs that it tried to use obs.domain1.com

Maybe there are better ways to achieve the same result. DHCP answer do inform host domain name (option 15) which may not match the dns search domains. "hostname -f", for example, generates the correct FQDN from DHCP info.

As a workaround, always sets your machine domain as the first in the domain search list.

@eduardoj
Copy link
Member

Whenever a 500 error happens it is better to have a look at the error log, where you will find more information about the concrete cause of the error.

After knowing the exact cause of the error you can open an issue, if you still think this would be a bug.

If you are not sure feel free to talk with other OBS admins or developers in the irc channel, or in the mailing list. See https://openbuildservice.org/support/ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Packages 📦 Things regarding our RPM packages
Projects
None yet
Development

No branches or pull requests

6 participants