Hi,
I am trying to launch a Julia webserver but I ran into some difficulties. To be sure I've got the right tarball on your downloads page, I did:
root@bach:/tmp/julia# /lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Ubuntu EGLIBC 2.13-20ubuntu5) stable release version 2.13, by Roland McGrath et al.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.6.1.
Compiled on a Linux 3.0.4 system on 2011-10-04.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
.
Then I downloaded and unpacked the tarball corresponding to libc 2.13.
root@bach:/tmp/julia# wget https://github.com/downloads/JuliaLang/julia/julia-0900cdf990-Linux-x86_64-glibc213.tar.gz
ulia-0900cdf990-Linux-x86_64-glibc213.tar.gz
--2012-03-15 21:07:31-- https://github.com/downloads/JuliaLang/julia/julia-0900cdf990-Linux-x86_64-glibc213.tar.gz
Resolving github.com... 207.97.227.239
Connecting to github.com|207.97.227.239|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://cloud.github.com/downloads/JuliaLang/julia/julia-0900cdf990-Linux-x86_64-glibc213.tar.gz [following]
--2012-03-15 21:07:34-- http://cloud.github.com/downloads/JuliaLang/julia/julia-0900cdf990-Linux-x86_64-glibc213.tar.gz
Resolving cloud.github.com... 216.137.35.171, 216.137.35.189, 216.137.35.229, ...
Connecting to cloud.github.com|216.137.35.171|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 32973300 (31M) [.gz]
Saving to: `julia-0900cdf990-Linux-x86_64-glibc213.tar.gz'
Now, let me set the PATH as indicated in the instructions.
root@bach:/tmp# cd julia
root@bach:/tmp/julia# export PATH=$(pwd):$PATH
root@bach:/tmp/julia# echo $PATH
/tmp/julia:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
I can now use the Julia prompt just fine. Now, onto the Julia webserver where I'm having problems. Here's my lighttpd.conf
configuration:
root@bach:/tmp# cat /etc/lighttpd/lighttpd.conf
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_scgi",
# "mod_rewrite",
)
server.document-root = "/tmp/julia/ui/website"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 8002
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
" index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
## Use ipv6 if available
#include_shell "/usr/share/lighttpd/use-ipv6.pl"
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
scgi.server = (".scgi" => (("host" => "127.0.0.1", "port" => 8001)))
root@bach:/tmp#
Now, I will start the webserver.
root@bach:/tmp# /etc/init.d/lighttpd start
* Starting web server lighttpd [ OK ]
root@bach:/tmp#
root@bach:/tmp/julia# ./julia-release-webserver -p 8001
server started on port 8001.
0 open sessions.
1 open session [idle].
terminate called after throwing an instance of 'network::socket_error'
Aborted
Now I will do an strace on the same command:
root@bach:/tmp/julia# strace -o julia.txt -- ./julia-release-webserver -p 8001
server started on port 8001.
0 open sessions.
1 open session [idle].
terminate called after throwing an instance of 'network::socket_error'
Aborted
and its result is:
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f479a9f1000
write(1, "server started on port 8001.\n", 29) = 29
write(1, "0 open sessions.\n", 17) = 17
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(3, {sa_family=AF_INET, sin_port=htons(8001), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
listen(3, 1) = 0
accept(3,
+++ killed by SIGABRT +++
I will also do an ltrace:
root@bach:/tmp/julia# ltrace -C -o juliaL.txt -- ./julia-release-webserver -p 8001
server started on port 8001.
0 open sessions.
1 open session [idle].
terminate called after throwing an instance of 'network::socket_error'
root@bach:/tmp/julia# cat juliaL.txt
__libc_start_main(0x4041a0, 3, 0x7fff055e6548, 0x42d4d0, 0x42d560
std::ios_base::Init::Init()(0x636448, 0x7fff055e6548, 0x7fff055e6568, 64, 0x42d560) = 0
__cxa_atexit(0x7f96edff7d90, 0x636448, 0x636380, 6, 0x7f96ee284090) = 0
__cxa_atexit(0x422db0, 0x636430, 0x636380, 96, 0x7f96ee284090) = 0
__cxa_atexit(0x41d900, 0x63642c, 0x636380, 128, 0x7f96ee284090) = 0
std::ios_base::Init::Init()(0x636428, 7, 0x7f96edaf0690, 160, 0x7f96ee284090) = 2
__cxa_atexit(0x7f96edff7d90, 0x636428, 0x636380, 160, 0x7f96ee284090) = 0
__cxa_atexit(0x412cd0, 0x6363c0, 0x636380, 192, 0x7f96ee284090) = 0
signal(2, 0x00404ca0) = NULL
std::basic_string, std::allocator >::basic_string(char const*, std::allocator const&)(0x7fff055e6410, 0x7fff055e6958, 0x7fff055e642f, -1, 0x7fff055e6110) = 0x1369028
std::string::compare(char const*) const(0x7fff055e6410, 0x42d6ab, 28717, 0, 3) = 0
std::string::_Rep::_M_destroy(std::allocator const&)(0x1369010, 0x7fff055e642d, 0, 28717, 3) = 0
std::basic_string, std::allocator >::basic_string(char const*, std::allocator const&)(0x7fff055e6400, 0x7fff055e695b, 0x7fff055e642e, 28717, 3) = 0x1369028
std::ios_base::ios_base()(0x7fff055e6258, 0x7fff055e695f, 0x31303038, 1, 3) = 0x7f96ee283060
std::basic_ios >::init(std::basic_streambuf >*)(0x7fff055e6258, 0, 0x7f96ee27cdc0, 0x7f96ee27cd80, 3) = 1
std::basic_ios >::init(std::basic_streambuf >*)(0x7fff055e6258, 0, 0x7f96ee2835f0, 0x7f96ee27cd60, 0x7f96ee2835f0) = 1
std::locale::locale()(0x7fff055e6240, 0x7f96ee0571c0, 0x7f96ee2835f0, 0x7f96ee27d3c0, 0x7f96ee2835f0) = 0x7f96ee283060
std::basic_string, std::allocator >::basic_string(char const*, unsigned long, std::allocator const&)(0x7fff055e6250, 0x1369028, 4, 0x7fff055e642c, 0x7f96ee2835f0) = 0x1369058
std::basic_stringbuf, std::allocator >::_M_sync(char*, unsigned long, unsigned long)(0x7fff055e6208, 0x1369058, 0, 0, 3) = 0x136905c
std::basic_ios >::init(std::basic_streambuf >*)(0x7fff055e6258, 0x7fff055e6208, 0x136905c, 0, 16) = 0
std::istream::operator>>(int&)(0x7fff055e61f0, 0x7fff055e6420, 0x7f96ee2835f0, 6, 0x7f96ee2835f0) = 0x7fff055e61f0
std::string::_Rep::_M_destroy(std::allocator const&)(0x1369040, 0x7fff055e642b, 0x7f96ee27cae0, 0x136905c, 0xffffffff) = 0
std::locale::~locale()(0x7fff055e6240, 0, 1, 0x7f96ee27d3c0, 0xffffffff) = 18
std::ios_base::~ios_base()(0x7fff055e6258, 0, 0x7f96ee27b5e0, 0x7f96ee27cdc0, 0xffffffff) = 17
std::string::_Rep::_M_destroy(std::allocator const&)(0x1369010, 0x7fff055e642a, 0x7f96ee27b5e0, 0x7f96ee27cdc0, 0xffffffff) = 0x1369030
time(NULL) = 1331846678
srand(0x4f625e16, 0, 81894, 1, 1) = 0
sigemptyset(0x7fff055e6368) = 0
sigaction(13, 0x7fff055e6360, NULL) = 0
pthread_mutex_init(0x636400, 0, 0, -1, 0) = 0
pthread_create(0x7fff055e63f8, 0, 0x40c190, 0, 0) = 0
std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long)(0x7f96ee282d60, 0x42d6ae, 23, -1, 0x7f96ed756700) = 0x7f96ee282d60
std::ostream::operator<<(int)(0x7f96ee282d60, 8001, 23, 1024, 0x7f96edaf1130) = 0x7f96ee282d60
std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long)(0x7f96ee282d60, 0x42d6f5, 2, 0, 0x7f96edaf1130) = 0x7f96ee282d60
std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long)(0x7f96ee282d60, 0x42d6c6, 17, 1024, 0x7f96edaf1130) = 0x7f96ee282d60
socket(2, 1, 0) = 3
setsockopt(3, 1, 2, 0x7fff055e6124, 4) = 0
bind(3, 0x7fff055e6130, 16, -1, 4) = 0
operator new(unsigned long)(4, 0x7fff055e6130, 0, -1, 4) = 0x13691a0
listen(3, 1, 0x7f96edaf11c0, 134768, 3) = 0
accept(3, 0x7fff055e6130, 0x7fff055e6128, -1, 3
+++ killed by SIGABRT +++
Here are details about my OS:
root@bach:/tmp/julia# cat /etc/issue
Ubuntu 11.10 \n \l
root@bach:/tmp/julia# uname -a
Linux bach 3.0.0-14-virtual #23-Ubuntu SMP Mon Nov 21 21:09:11 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
root@bach:/tmp/julia#
If you can help me resolve this issue, I would greatly appreciate it.
Thanks!
Damian Eads