CentOS 7: Want a functional loggerhead
Kevin R. Bulgrien
kevin.bulgrien at freedomcte.com
Fri Sep 11 16:09:07 UTC 2015
> -----Original Message-----
> From: Richard Wilbur [mailto:richard.wilbur at gmail.com]
> Sent: Friday, September 11, 2015 10:13 AM
>
> On Wed, Sep 9, 2015 at 5:00 PM, Kevin R. Bulgrien
> <kevin.bulgrien at freedomcte.com> wrote:
> [...]
> >> $ cat /etc/redhat-release && /home/app/bin/serve-branches ~/bzr/blah
> >> CentOS Linux release 7.1.1503 (Core)
> >> DEBUG:paste.httpserver.ThreadPool:Started new worker 139704170727168:
> >> Initial
> >> worker pool
> >> <snip />
> >> serving on 0.0.0.0:8080 view at http://127.0.0.1:8080
> >>
> >> $ lynx http://localhost:8080/
> >> Alert!: HTTP/1.0 404 Not Found
> >>
> >> $ cat serve-branches.log
> >> 2015-09-09 17:15:25,908 INFO loggerhead: 127.0.0.1 - -
> >> [09/Sep/2015:17:15:25 -0500] "GET / HTTP/1.0" 404 - "-" "Lynx/2.8.8dev.15
> >> libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.0.1e-fips"
> >>
> >> Note the absence of the additional log entries related to repository
> >> browsing.
> >>
> >> The ~/.bzr.log does not have anything for this timeframe.
>
> Did you create user 'bzr' and pull the 'blah' branch into ~/bzr/blah
> on the CentOS 7 machine?
No. At this point I haven't created a system user. I did not have to do that
on CentOS 6. I got loggerhead working as my own user. Once I get it working
as my user, then I figure it makes sense to worry about what makes sense for
a long-term server configuration.
> If so, what user are you running serve-branches as? Does that user
> have read privilege in ~/bzr/blah?
Yes. I ran serve-branches as my user and have access to my own ~/bzr/blah,
but to get pedantic about it:
$ whoami
kbulgrien
$ ps -ef | grep serve.branches
kbulgri+ 4533 2606 0 11:00 pts/0 00:00:00 /usr/bin/python ./serve-branches
/home/kbulgrien/bzr/blah
$ find /home/kbulgrien/bzr/blah -type f | wc -l
4480
$
Since no errors are returned by find, my user can read the files.
> If so, is there any way to tell whether the server is still alive?
I run serve-branches and the lynx commands in different terminals.
It is alive. As I ran it as my own user and not in the background,
the console is proof it is alive. I must Ctrl-C to kill it.
> Have you tried
> $ telnet localhost 8080
$ telnet localhost 8080
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.1
host: localhost
HTTP/1.0 404 Not Found
Server: PasteWSGIServer/0.5 Python/2.7.5
Date: Fri, 11 Sep 2015 15:33:17 GMT
content-type: text/plain; charset=utf8
Connection: close
404 Not Found
The resource could not be found.
Connection closed by foreign host.
Interesting.
telnet: connect to address ::1: Connection refused
/etc/hosts define localhost for both IPV4 and IPV6 addresses, but
the last entry in the hosts file wins so IPV6 is assumed.
$ telnet 127.0.0.1 8080
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
GET / HTTP/1.1
host: 127.0.0.1
HTTP/1.0 404 Not Found
Server: PasteWSGIServer/0.5 Python/2.7.5
Date: Fri, 11 Sep 2015 15:34:25 GMT
content-type: text/plain; charset=utf8
Connection: close
404 Not Found
The resource could not be found.
Connection closed by foreign host.
Hmm. telnet is a good idea. On CentOS 6 where loggerhead works:
$ telnet 127.0.0.1 8080
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
GET / HTTP/1.1
host: 127.0.0.1
HTTP/1.0 301 Moved Permanently
Server: PasteWSGIServer/0.5 Python/2.5.2
Date: Fri, 11 Sep 2015 15:56:40 GMT
location: http://127.0.0.1/changes
content-type: text/plain; charset=utf8
Connection: close
301 Moved Permanently
The resource has been moved to http://127.0.0.1/changes;
you should be redirected automatically.
Connection closed by foreign host.
Apparently there is less to go wrong if on accesses
http://127.0.0.1/changes directly, but this makes no
difference on the CentOS 7 system. This still fails.
$ telnet 127.0.0.1 8080
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
GET /changes HTTP/1.1
host: 127.0.0.1
HTTP/1.0 404 Not Found
Server: PasteWSGIServer/0.5 Python/2.7.5
Date: Fri, 11 Sep 2015 15:54:37 GMT
content-type: text/plain; charset=utf8
Connection: close
404 Not Found
The resource could not be found.
Connection closed by foreign host.
> >> I have changed /etc/sysconfig/selinux to set permissive mode instead of
> >> enforcing mode as part of trying to get things working, though I did
> >> have any evidence that it is part of the problem.
>
> I don't have any experience appeasing selinux.
I run SELinux in enforcing mode successfully, but I backed off to permissive
so it will warn but not block. This means it is effectively disabled but
still lets you see what would have been blocked had it been enforcing.
Besides, the original post documents that loggerhead works fine on
CentOS 6 with SELinux enforcing.
---
Kevin R. Bulgrien
More information about the bazaar
mailing list