IPV6

Nicolas Pinault nicolasp at aaton.com
Fri Jul 6 14:35:09 UTC 2018


Hi Mads,

Le 23/03/2018 à 00:55, Mads Kiilerich a écrit :
> On 03/22/2018 02:58 PM, Nicolas Pinault wrote:
>> Hi,
>>
>> Is there a way to make kallithea serve on IPV6 only or, IPV4 and IPV6?
>
> I am not aware of anything that should be IPv4 specific. But I also 
> haven't tried IPv6.
>
> I guess it just works if using Apache and mod_wsgi.
>
> The waitress version we default to use for `gearbox serve` doesn't 
> support IPv6.
>
> A quick test on our default branch shows that it seems to work on IPv6 
> if you edit setup.py to "waitress>=0.8.8,<2.0" to get something like 
> waitress 1.1 and edit your .ini to host = * .
>
> With reports of Waitress 1.1 (and review of their release note) we can 
> make that version the default.
I finally had some time to try your solution.
I didn't reinstalled all after modifying setup.py.

I upgraded waitress directly with :
pip install --upgrade "waitress>=0.8.8,<2.0"

I then modified METADATA and metadata.json files located in 
Kallithea-0.3.5.dist-info directory to set the ">=0.8.8,<2.0" pattern.

Kallithea launches and remote client accesses it.
However, Kallithea crashes on first access.
   File "d:\kallithea\env\lib\site-packages\kallithea\lib\auth.py", line 
1336, in
  check_ip_access
     if ipaddr.IPAddress(source_ip) in ipaddr.IPNetwork(ip):
   File "d:\kallithea\env\lib\site-packages\kallithea\lib\ipaddr.py", 
line 76, in
  IPAddress
     address)
ValueError: 'fe80::acaf:647b:6b31:70b8%13' does not appear to be an IPv4 
or IPv6
  address

I believe the scope at the end of the IP address is the culprit. But 
maybe I am wrong.
I have added the full trace back at the end of this message.

As IPV6 is not officially supported, I have not created a bug request.
Do you think there is an easy fix for this issue ?

Nicolas

>
> /Mads



2018-07-06 15:58:29.361 INFO  [kallithea.model] initializing db for 
sqlite:///d:
\Kallithea\Bin/kallithea.db?timeout=60
2018-07-06 15:58:29.371 INFO  [kallithea.lib.auth] getting information 
about all
  available permissions
2018-07-06 15:58:29.579 ERROR 
[kallithea.lib.vcs.backends.git.repository] Couldn
't run git command (['git', '--version']).
Original error was:[Error 2] Le fichier spécifié est introuvable

2018-07-06 15:58:29.599 WARNI [kallithea.lib.utils] Error detecting git 
version:
  WindowsError(2, 'Le fichier sp\xe9cifi\xe9 est introuvable')
Starting server in PID 3820.
Serving on http://serveur.aatond.local:5000
Serving on http://serveur.aatond.local:5000
2018-07-06 15:58:34.111 INFO  [kallithea.RequestWrapper] IP: 
fe80::acaf:647b:6b3
1:70b8%13 Request to /CantarX3/software/Cantar3-Apps time: 0.032s
2018-07-06 15:58:34.125 ERROR [waitress] Exception when serving 
/CantarX3/softwa
re/Cantar3-Apps
Traceback (most recent call last):
   File "d:\kallithea\env\lib\site-packages\waitress\channel.py", line 
338, in se
rvice
     task.service()
   File "d:\kallithea\env\lib\site-packages\waitress\task.py", line 169, 
in servi
ce
     self.execute()
   File "d:\kallithea\env\lib\site-packages\waitress\task.py", line 399, 
in execu
te
     app_iter = self.channel.server.application(env, start_response)
   File "d:\kallithea\env\lib\site-packages\paste\gzipper.py", line 31, 
in __call
__
     return self.application(environ, start_response)
   File "d:\kallithea\env\lib\site-packages\paste\cascade.py", line 130, 
in __cal
l__
     return self.apps[-1](environ, start_response)
   File "d:\kallithea\env\lib\site-packages\paste\registry.py", line 
379, in __ca
ll__
     app_iter = self.application(environ, start_response)
   File 
"d:\kallithea\env\lib\site-packages\kallithea\lib\middleware\wrapper.py",
  line 43, in __call__
     return self.application(environ, start_response)
   File "d:\kallithea\env\lib\site-packages\kallithea\lib\base.py", line 
312, in
__call__
     return self._handle_request(environ, start_response)
   File 
"d:\kallithea\env\lib\site-packages\kallithea\lib\middleware\simplegit.py
", line 68, in _handle_request
     return self.application(environ, start_response)
   File "d:\kallithea\env\lib\site-packages\kallithea\lib\base.py", line 
312, in
__call__
     return self._handle_request(environ, start_response)
   File 
"d:\kallithea\env\lib\site-packages\kallithea\lib\middleware\simplehg.py"
, line 113, in _handle_request
     repo_name, ip_addr)
   File "d:\kallithea\env\lib\site-packages\kallithea\lib\base.py", line 
226, in
_check_permission
     ip_allowed = AuthUser.check_ip_allowed(user, ip_addr)
   File "d:\kallithea\env\lib\site-packages\kallithea\lib\auth.py", line 
621, in
check_ip_allowed
     if check_ip_access(source_ip=ip_addr, allowed_ips=allowed_ips):
   File "d:\kallithea\env\lib\site-packages\kallithea\lib\auth.py", line 
1336, in
  check_ip_access
     if ipaddr.IPAddress(source_ip) in ipaddr.IPNetwork(ip):
   File "d:\kallithea\env\lib\site-packages\kallithea\lib\ipaddr.py", 
line 76, in
  IPAddress
     address)
ValueError: 'fe80::acaf:647b:6b31:70b8%13' does not appear to be an IPv4 
or IPv6
  address


More information about the kallithea-general mailing list