Svn error 500

We used to use Collabnet SVN/Apache combo on a Windows server with LDAP authentication, and whilst the performance wasn't brilliant it used to work perfectly. After switching to a fresh Ubuntu 10

I’m using a Debian «Lenny» setup, running Apache2/SVN with LDAP being authenticated through Apache directly to AD, while also hosting a Trac site on the same machine. I’ll take a stab at it, but I need some more info…

The SVN access is the built-in module through Apache, so the first question I have is — are you running this as the SVN stand-alone process, or through Apache (it appears to be Apache but I just want to be sure)? The second question is, are you using Apache2 or Apache (1.x)? The third question is, do you use LDAP authentication through PAM, or through Apache’s built-in support?

Just for reference, here’s a (sanitized) version of the config for Trac, along with the LDAP settings that authenticate through AD (yes, it’s open to anyone because Trac has its own permissions system that on my setup defaults to read-only for authenticated users):

#Rudimentary Apache2 authentication for Active Directory (without group controls)
<Location /trac>
  SetHandler mod_python
  PythonInterpreter main_interpreter
  PythonHandler trac.web.modpython_frontend
  PythonOption TracEnvParentDir /srv/trac
  PythonDebug on
  Order deny,allow
  Deny from all
  Allow from 10.0.0.0/8
  AuthType Basic
  AuthName "Trac Projects"
  AuthBasicProvider "ldap"
  AuthLDAPURL "ldap://enterprise-dc.mycompany.com:3268/DC=localsite,DC=mycompany,DC=com?sAMAccountName?sub?(objectClass=user)"
  AuthLDAPBindDN       apache-account@local-site.mycompany.com
  AuthLDAPBindPassword "supersecretpasswordthatnoonewillguess"
  authzldapauthoritative On
  require valid-user
  # require ldap-group "CN=Users,DC=local-site,DC=mycompany,DC=com"
</Location>

More importantly for your purposes, using that form of authentication as a template, we can get the settings for /etc/apache2/mods-enabled/dav_svn.conf, which will control your SVN access:

<Location /svn>
  DAV svn
  SVNParentPath /srv/svn
  SVNAutoversioning on
  Order deny,allow
  Deny from all
  Allow from 10.0.0.0/8
  AuthType Basic
  AuthName "Subversion Repository"
  AuthBasicProvider "ldap"
  AuthLDAPURL "ldap://enterprise-dc.mycompany.com:3268/DC=local-site,DC=mycompany,DC=com?sAMAccountName?sub?(objectClass=user)"
  AuthLDAPBindDN apache-account@local-site.mycompany.com
  AuthLDAPBindPassword "supersecretpasswordthatnoonewillguess"
  authzldapauthoritative On
  require valid-user
</Location>

Our desktops have fairly tight controls on program installation so I’m not as concerned about someone (a) installing an SVN client (b) figuring out the exact server name to connect to (c) getting into the repo and mucky-mucking things up, which is why the security is so low. However, with a little tweaking, you should be able to re-use this arrangement by enforcing an AD group (note the commented out cruft in the first example) and get much tighter control on access.

Hope this is of help to you.


Update (based on new information)

I think the problem is that you are not authenticating against the Global Catalog. Change the port number to the one I have in my example, and be sure to point it at a Domain Controller that is at the «Enterprise» level i.e. not a member of a child domain. So instead of site.enterprise.com, point it to enterprise.com at the new port number. Note that you might not need to specify the domain name in your setup for the user name, so if it refuses to authenticate, be sure to try it without as well (see the example I posted); and use the «email-style» account name as well vs. the «domain-style» layout.

My suspicion: The Global Catalog «flattens» the search space for users; but by asking a standard LDAP query on the child DC, I think that the initial failure occurs because there is no «answer» to be had initially, until the DC in the child domain can run out and get one. On the second attempt, the answer is cached, and you succeed.

  • #1

Здравствуйте! пытался на сервере Апач2 организовать след функциональность: есть онлайн репозиторий мне нужно сделать ее рабочую копию в папке на сервере. В терминале пишу svn co —username ХХХ —password ХХХ https://online_repository_path /local_folder_path пару дней назад все прошло успешно! Ничего не менял сегодня появляется след ошибка svn: Server sent unexpected return value (500 Internal Server Error) in response to OPTIONS request for ‘https://online_repository_path’ По поиску ничего найти не смог. Помогите пожалуйста! в чем может быть проблема?

Заранее спасибо!

  • #2

Ну раз 500, значит логи апача надо смотреть.

  • #3

Самое интересное что в логах аналогичная информация!
error.log
[Fri Mar 04 09:08:15 2011] [notice] Apache/2.2.16 (Ubuntu) DAV/2 SVN/1.6.12 PHP/5.3.3-1ubuntu9.3 with Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o configured — resuming normal operations
[Fri Mar 04 09:26:16 2011] [notice] caught SIGTERM, shutting down
[Fri Mar 04 09:26:55 2011] [notice] Apache/2.2.16 (Ubuntu) DAV/2 SVN/1.6.12 PHP/5.3.3-1ubuntu9.3 with Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o configured — resuming normal operations
svn: Server sent unexpected return value (500 Internal Server Error) in response to OPTIONS request for ‘https://path_to_online_repository’

  • #4

Уже голову сломал! Правильны ли мои рассуждения: для работы с SVN мне нужны Apache2 и mod_dav_svn, несмотря на обращение к удаленному серверу через https мне на моем сервере сертификат создавать не нужно, мне просто нужно сделать checkout в локальную папку! так почему Apache возвращает 500 Internal Server Error????? как получить более подробную информацию о том, какую информацию получает Apache если информации в логах мало!
Огромейнейшее спасибо все кто ответит!

  • #5

> есть онлайн репозиторий мне нужно сделать ее рабочую копию в папке на сервере

Репозиторий есть, или подразумевается что он должен был сам по себе создаться и прописаться в dav_svn.conf после установки apache+webdav ?

  • #6

Репозиторий есть на ProjectLocker уже созданный и работающий! есть отдельный vps на котором необходимо создать рабочую копию проекта из projectlocker.

  • #7

Я ниче не понял. Зачем апач и вебдав для чекаута проекта из рабочего репозитория, который вообще находится на другом сервере? По моему вам надо самые основы работы с svn почитать.

  • #8

сейчас у меня рабочий репозиторий находится на сервере projectlocker, я с ним работаю через tortoisesvn под виндой! мне нужно чтобы к этому репозиторию имел доступ отдельный сервер vps на котором установлен апач, debian, mod dav svn! на этом VPS я хочу через командную строку работать с репозиторием который расположен на projectlocker. у меня подобная команда svn co —username ХХХ —password ХХХ https://projectlocker.com /home/usr/project вызывает ошибку 500 Internal server error. а как если не через вебдав я могу работать с репозиторием?

  • #9

Поработайте с рабочей копией на винде через командную строку (например через слик). Как только поймете какие команды нужно в вводить в консоли и кто конкретно выдает вам ошибку 500, вот потом уже можно идти на впс и делать осознанные действия. Или нет никакой проблемы, или решение проблемы вы ищете не там. Вы просто тыкаете пальцем в небо и сетуете на то, что в результате не идет дождь.

  • #10

Наконец разобрался! Всем спасибо за участие. Личное уважение whirlwind!

Applies to: VisualSVN Server 3.0 and later

This article provides a resolution for an error that may occur on a
Subversion client during a large commit to VDFS slave repository.

Symptoms

The following error message is displayed on a Subversion client during a
large commit to VDFS slave repository:

Сommitting transaction…
svn: E175012: Connection timed out

You may as well see additional errors:

svn: E200042: Additional errors:
svn: E175002: Unexpected server error 500 ‘Internal Server Error’ on ‘svn/MyRepo/!svn/txn/1-1’

The problem is also indicated by several errors on the server that hosts
the VDFS slave repository. On that server, you may see the following
errors in the VisualSVN Server log:

Cannot abort transaction ‘1-1’, because it is still being processed. [500, #160032]
[client 192.168.1.2]

could not abort transaction. [500, #160032]
[client 192.168.1.2]

Could not DELETE /svn/MyRepo/!svn/txn/1-1. [500, #0]
[client 192.168.1.2]

You can find the VisualSVN Server log under the Applications and
Services Logs
node in the Windows Event Viewer. Read the
KB28: Where VisualSVN Server logs are stored article for more
information.

Cause

When committing to a slave repository, a new transaction is first created
on that slave repository. After the Subversion client populates the
created transaction with new contents, the VDFS service begins
replicating data to a master repository. The Subversion client has to
wait until the replication process is complete
and until it receives
a confirmation of successful commit both to the master and to the slave
repository. If the confirmation is not received within the configured
client-side HTTP timeout (600 seconds by default), the Subversion client
will disconnect from the server and display the error.

Please note that the replication process still continues in the
background
, even after the Subversion client disconnects from the
server. Upon the completion, the commit will appear on both the master
and the slave repository.

Resolution

If large commits are common in your multisite environment, consider
increasing the bandwidth of the network connection used for replication
between master and slave servers.

Alternatively, you may increase the value of the
http-timeout
runtime configuration option or set it to zero to disable the timeout.
Subversion clients use this value to determine the amount of time to wait
for a server response. Use one of the two methods below to edit this
option.

The http-timeout is a client-side option. Thus, changes to this
option should be applied to every client that experiences timeouts during
large commits to VDFS slave repositories.

Edit the timeout using the servers configuration file

Follow the instructions below to edit the http-timeout runtime
configuration option for the current user in the servers
configuration file:

  1. Navigate to the Subversion runtime configuration area.
    • On Windows systems, navigate to a Subversion directory, inside the
      Application Data location (%APPDATA%Subversion).
    • On Unix-like systems, navigate to a .subversion directory in the
      user’s home directory ($HOME/.subversion).
  2. Open the servers file.
  3. Edit the value of the http-timeout option under the [global] section
    of the file. Set it to a sufficient amount of time, in seconds, or use
    the value 0 to disable the timeout.

The Subversion clients will now use the configured HTTP timeout value.

Edit the timeout using Windows registry

Follow the instructions below to edit the http-timeout runtime
configuration option for the current user via Windows registry:

  1. Start regedit.
  2. If not present already, create the following registry key:
  3. [HKEY_CURRENT_USERSoftwareTigris.orgSubversionServersglobal]
          
  4. Under that key, edit or create a string value named http-timeout. Set
    it to a sufficient amount of time, in seconds, or use the value 0 to
    disable the timeout.

The Subversion clients will now use the configured HTTP timeout value.

In an Active Directory environment use Windows Registry and Windows
Group Policy to force configuration changes in a centralized and
unattended fashion.

When running Subversion > Update ... (any), getting an error (in popup):

org.apache.subversion.javahl.ClientException: E175002: OPTIONS of '/...': 500 Internal Server Error (https://...)
E175002: OPTIONS request failed on '...'


Comment 2


mindjoy



2016-04-22 15:24:30 UTC

I don't have command line svn, isn't that something that's built in NetBeans itself? What are the requirements to have SVN working with NetBeans out of the box?
Eclipse works fine.


Comment 3


mindjoy



2016-04-22 15:25:29 UTC

Also, TortoiseSVN works fine too.


Comment 4


Ondrej Vrabec



2016-04-22 15:47:28 UTC

(In reply to mindjoy from comment #2)
> I don't have command line svn, isn't that something that's built in NetBeans
> itself?
No, not really, only the adapter for the CLI tool. NetBeans is able to work with three different svn clients: commandline, JavaHL natives and built-in SvnKit. Which one are you using? If it's SvnKit try to switch to JavaHL if it makes any difference: http://wiki.netbeans.org/FaqSubversionClients

Also attach the IDE log with the error: http://wiki.netbeans.org/FaqLogMessagesFile


Comment 5


mindjoy



2016-04-22 16:08:45 UTC

Here is the error stack from the log:

svn: E175002: OPTIONS request failed on '/...'
	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:106)
	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:90)
	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:798)
	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:398)
	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:386)
	at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:720)
	at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:634)
	at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:109)
	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1044)
	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getRepositoryUUID(DAVRepository.java:155)
	at org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.createRepository(SvnRepositoryAccess.java:110)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.createRepository(SvnNgRepositoryAccess.java:210)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.updateInternal(SvnNgAbstractUpdate.java:194)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.update(SvnNgAbstractUpdate.java:111)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:38)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgUpdate.run(SvnNgUpdate.java:18)
	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
	at org.tmatesoft.svn.core.javahl17.SVNClientImpl.update(SVNClientImpl.java:496)
Caused: org.apache.subversion.javahl.ClientException: svn: E175002: OPTIONS of '/...': 500 Internal Server Error (https://...)
svn: E175002: OPTIONS request failed on '/...'
	at org.apache.subversion.javahl.ClientException.fromException(ClientException.java:68)
	at org.tmatesoft.svn.core.javahl17.SVNClientImpl.getClientException(SVNClientImpl.java:1492)
	at org.tmatesoft.svn.core.javahl17.SVNClientImpl.update(SVNClientImpl.java:498)
	at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.update(AbstractJhlClientAdapter.java:1127)
Caused: org.tigris.subversion.svnclientadapter.SVNClientException
	at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.update(AbstractJhlClientAdapter.java:1132)
	at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.update(AbstractJhlClientAdapter.java:1101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.netbeans.modules.subversion.client.SvnClientInvocationHandler.handle(SvnClientInvocationHandler.java:461)
	at org.netbeans.modules.subversion.client.SvnClientInvocationHandler.invokeMethod(SvnClientInvocationHandler.java:406)
	at org.netbeans.modules.subversion.client.SvnClientInvocationHandler$2.run(SvnClientInvocationHandler.java:219)
	at org.netbeans.modules.openide.util.DefaultMutexImplementation.writeAccess(DefaultMutexImplementation.java:293)
	at org.openide.util.Mutex.writeAccess(Mutex.java:299)
	at org.netbeans.modules.subversion.client.SvnClientInvocationHandler.invoke(SvnClientInvocationHandler.java:226)
	at com.sun.proxy.$Proxy30.update(Unknown Source)
	at org.netbeans.modules.subversion.ui.update.UpdateAction.updateRoots(UpdateAction.java:311)
	at org.netbeans.modules.subversion.ui.update.UpdateAction.access$400(UpdateAction.java:93)
	at org.netbeans.modules.subversion.ui.update.UpdateAction$4.call(UpdateAction.java:252)
	at org.netbeans.modules.subversion.ui.update.UpdateAction$4.call(UpdateAction.java:249)
	at org.netbeans.modules.versioning.indexingbridge.Bridge$1.call(Bridge.java:64)
	at org.netbeans.modules.parsing.api.indexing.IndexingManager.runProtected(IndexingManager.java:425)
	at org.netbeans.modules.versioning.indexingbridge.Bridge.runWithoutIndexing(Bridge.java:59)
	at org.netbeans.modules.versioning.util.IndexingBridge.runWithoutIndexing(IndexingBridge.java:139)
	at org.netbeans.modules.versioning.util.IndexingBridge.runWithoutIndexing(IndexingBridge.java:102)
	at org.netbeans.modules.subversion.util.SvnUtils.runWithoutIndexing(SvnUtils.java:1847)
[catch] at org.netbeans.modules.subversion.ui.update.UpdateAction.update(UpdateAction.java:249)
	at org.netbeans.modules.subversion.ui.update.UpdateAction.update(UpdateAction.java:206)
	at org.netbeans.modules.subversion.ui.update.UpdateAction.access$000(UpdateAction.java:93)
	at org.netbeans.modules.subversion.ui.update.UpdateAction$2.perform(UpdateAction.java:158)
	at org.netbeans.modules.subversion.client.SvnProgressSupport.performIntern(SvnProgressSupport.java:111)
	at org.netbeans.modules.subversion.client.SvnProgressSupport.run(SvnProgressSupport.java:104)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
WARNING [org.netbeans.ProxyClassLoader]: Will not load class org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter arbitrarily from one of ModuleCL@47769fc4[org.netbeans.libs.svnClientAdapter.svnkit] and ModuleCL@7329cf53[org.netbeans.libs.svnClientAdapter.javahl] starting from SystemClassLoader[673 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE
WARNING [org.netbeans.ProxyClassLoader]: Will not load class org.apache.subversion.javahl.ClientException arbitrarily from one of ModuleCL@47769fc4[org.netbeans.libs.svnClientAdapter.svnkit] and ModuleCL@7329cf53[org.netbeans.libs.svnClientAdapter.javahl] starting from SystemClassLoader[673 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE


Comment 8


mindjoy



2016-04-22 16:31:48 UTC

Why not the latest: 1.9.3?


Comment 9


Ondrej Vrabec



2016-04-22 17:09:14 UTC

1.9.3 is not supported in NetBeans 8.1, it can work only with 1.8 and older. 1.9 support will come in 8.2 (already in development builds)


Comment 10


mindjoy



2016-04-22 17:55:21 UTC

Ok, thank you. 1.8.9 works now.

Понравилась статья? Поделить с друзьями:
  • Syntax error at or near references
  • Svn an error occurred during ssl communication
  • Syntax error at or near postgresql что это
  • Svg изображения как изменить размер
  • Syntax error at or near limit postgresql