Hi,
I’m just getting started with graylog and tried to follow the documentation for setting it up using ubuntu 16.04.2.
My graylog server seems to be running okay, but the sidecar collector on a linux box can’t make the connection when trying to use port 9000. If I change the collector config to use port 5044, it makes the connection (but has other issues related to certs), but I’m sure that’s not the way to go.
I want to use https and followed the documentation to do that, and am only running a single node, so I’m using apache2 as a proxy and reverse proxy. My only goal in using proxy and reverse proxy is to allow https. I’m not doing any load balancing at this point.
When I launch graylog-collector-sidecar on my linux test client I get:
INFO[0000] Using collector-id: longstring
INFO[0000] Fetching configurations tagged by: [linux]
INFO[0000] Starting signal distributor
INFO[0000] [filebeat] Starting (exec driver)
ERRO[0001] [filebeat] Backend finished unexpectedly, trying to restart 1/3.
INFO[0001] [filebeat] Stopping
after 3 attempts it gives up:
ERRO[0010] [filebeat] Unable to start collector after 3 tries, giving up!
time="2017-05-25T16:12:18-06:00" level=error msg="[UpdateRegistration] Failed to report collector status to server: Put https://fqdn:9000/api/plugins/org.graylog.plugins.collector/collectors/longstring: dial tcp IP_of_fqdn:9000: getsockopt: connection refused"
server.conf:
is_master = true
node_id_file = /etc/graylog/server/node-id
plugin_dir = /usr/share/graylog-server/plugin
rest_listen_uri = https://127.0.0.1:9000/api/
trusted_proxies = 127.0.0.1/32, 0:0:0:0:0:0:0:1/128
web_listen_uri = https://127.0.0.1:9000/
web_endpoint_uri = https://fqdn:9000/api/
I believe the proxy settings are to be specified in a sites-enabled conf (graylog-ssl.conf).
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName fqdn
ProxyRequests Off
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
RequestHeader set X-Graylog-Server-URL "https://fqdn/api/"
ProxyPass http://127.0.0.1:9000/
ProxyPassReverse http://127.0.0.1:9000/
</Location>
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Thanks for any help you can provide.
M