Freeswitch vs webRTC with SSL (local) - webrtc
I use freeswitch as sip server also use pem from freeswitch folder (/usr/local/freeswitch/certs) .
On client part i use SIP.js client looks like :
<script src="https://rawgit.com/onsip/SIP.js/0.8.0/dist/sip-0.8.0.js"></script>
<!--script src="sip-0.12.0.js"></script-->
<video id="remoteVideo"></video>
<video id="localVideo" muted="muted"></video>
<script>
var userAgent = new SIP.UA({
uri: '1002#192.168.0.100',
wsServers: ['wss://192.168.0.100:7443'],
authorizationUser: '1002',
password: '1234',
});
userAgent.on("connected", function() {
console.log("Connected $$$$$$$$$$$$$$$$$$$$$$$$");
});
userAgent.on('invite', function (session) {
session.accept({
media: {
render: {
remote: {
video: document.getElementById('remoteVideo')
},
local: {
video: document.getElementById('localVideo')
}
}
}
});
});
</script>
Error log in browser (chrome) :
sip-0.8.0.js:11540 WebSocket connection to 'wss://192.168.0.100:7443/' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
connect # sip-0.8.0.js:11540
Transport # sip-0.8.0.js:11428
(anonymous) # sip-0.8.0.js:7798
sip-0.8.0.js:746 Thu Jan 03 2019 11:10:42 GMT+0100 (Central European Standard Time) | sip.transport | WebSocket connection error:
LoggerFactory.print # sip-0.8.0.js:746
LoggerFactory.(anonymous function) # sip-0.8.0.js:763
Logger.(anonymous function) # sip-0.8.0.js:757
onError # sip-0.8.0.js:11725
ws.onerror # sip-0.8.0.js:11565
error (async)
connect # sip-0.8.0.js:11564
Transport # sip-0.8.0.js:11428
(anonymous) # sip-0.8.0.js:7798
setTimeout (async)
Timers.(anonymous function) # sip-0.8.0.js:1446
UA.recoverTransport # sip-0.8.0.js:7795
UA.onTransportError # sip-0.8.0.js:7452
onClose # sip-0.8.0.js:11633
ws.onclose # sip-0.8.0.js:11552
sip-0.8.0.js:746 Event {isTrusted: true, type: "error", target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …}
LoggerFactory.print # sip-0.8.0.js:746
LoggerFactory.(anonymous function) # sip-0.8.0.js:763
Logger.(anonymous function) # sip-0.8.0.js:757
onError # sip-0.8.0.js:11726
ws.onerror # sip-0.8.0.js:11565
error (async)
connect # sip-0.8.0.js:11564
Transport # sip-0.8.0.js:11428
(anonymous) # sip-0.8.0.js:7798
setTimeout (async)
Timers.(anonymous function) # sip-0.8.0.js:1446
UA.recoverTransport # sip-0.8.0.js:7795
UA.onTransportError # sip-0.8.0.js:7452
onClose # sip-0.8.0.js:11633
ws.onclose # sip-0.8.0.js:11552
sip-0.8.0.js:746 Thu Jan 03 2019 11:10:42 GMT+0100 (Central European Standard Time) | sip.transport | WebSocket disconnected (code: 1006)
sip-0.8.0.js:746 Thu Jan 03 2019 11:10:42 GMT+0100 (Central European Standard Time) | sip.transport | WebSocket abrupt disconnection
LoggerFactory.print # sip-0.8.0.js:746
LoggerFactory.(anonymous function) # sip-0.8.0.js:763
Logger.(anonymous function) # sip-0.8.0.js:757
onClose # sip-0.8.0.js:11614
ws.onclose # sip-0.8.0.js:11552
sip-0.8.0.js:746 Thu Jan 03 2019 11:10:42 GMT+0100 (Central European Standard Time) | sip.ua | transport wss://192.168.0.100:7443 failed | connection state set to 2
sip-0.8.0.js:746 Thu Jan 03 2019 11:10:42 GMT+0100 (Central European Standard Time) | sip.ua | time for next connection attempt exceeds connectionRecoveryMaxInterval, resetting counter
sip-0.8.0.js:746 Thu Jan 03 2019 11:10:42 GMT+0100 (Central European Standard Time) | sip.ua | next connection attempt in 2 seconds
sip-0.8.0.js:746 Thu Jan 03 2019 11:10:44 GMT+0100 (Central European Standard Time) | sip.transport | connecting to WebSocket wss://192.168.0.100:7443
Log on freeswitch server running in localhost env :
tport.c:2753 tport_wakeup_pri() tport_wakeup_pri(0x7f8780e28b20): events IN
tport.c:862 tport_alloc_secondary() tport_alloc_secondary(0x7f8780e28b20): new secondary tport 0x7f878193c200
tport.c:2294 tport_set_secondary_timer() tport(0x7f878193c200): set timer at 4998 ms because keepalive
tport.c:2644 tport_accept() tport_accept(0x7f878193c200): new connection from wss/192.168.0.100:56317/sips
tport.c:2777 tport_wakeup() tport_wakeup(0x7f878193c200): events IN
tport.c:2868 tport_recv_event() tport_recv_event(0x7f878193c200)
tport_type_ws.c:232 tport_recv_stream_ws() tport_recv_stream_ws(0x7f878193c200): su_getmsgsize(): Host is down (64) N=-1
tport.c:2159 tport_shutdown0() tport_shutdown0(0x7f878193c200, 2)
tport.c:2092 tport_close() tport_close(0x7f878193c200): wss/192.168.0.100:56317/sips
tport.c:2265 tport_set_secondary_timer() tport(0x7f878193c200): set timer at 0 ms because zap
tport_type_ws.c:531 tport_ws_deinit_secondary() 0x7f878193c200 destroy wss transport 0x7f878193c3f0.
The error clearly shows it is certificate issue
sip-0.8.0.js:11540 WebSocket connection to 'wss://192.168.0.100:7443/' failed: >Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
I use freeswitch as sip server also use pem from freeswitch folder
(/usr/local/freeswitch/certs)
The certificate provided by Freeswitch is a self-signed certificate and not generated for your server address 192.168.0.100.
You can try generating one using openssl,
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes -keyout 192.168.0.100.key -out 192.168.0.100.crt -extensions san -config <(echo "[req]"; echo distinguished_name=req; echo "[san]"; echo subjectAltName=DNS:192.168.0.100,IP:192.168.0.100) -subj /CN=192.168.0.100
make your wss.pem using
https://freeswitch.org/confluence/display/FREESWITCH/WebRTC#WebRTC-InstallCertificates
If you get certifying authority error, with a self-signed certificate for webrtc on a browser like Chrome, better to generate a valid SSL certificate with a domain name and use it.
Regards!
Related
“500 Internal Server Error” with job artifacts on minio
I'm running gitlab-ce on-prem with min.io as a local S3 service. CI/CD caching is working, and basic connectivity with the S3-compatible minio is good. (Versions: gitlab-ce:13.9.2-ce.0, gitlab-runner:v13.9.0, and minio/minio:latest currently c253244b6fb0.) Is there additional configuration to differentiate between job-artifacts and pipeline-artifacts and storing them in on-prem S3-compatible object storage? In my test repo, the "build" stage builds a sparse R package. When I was using local in-gitlab job artifacts, it succeeds and moves on to the "test" and "deploy" stages, no problems. (And that works with S3-stored cache, though that configuration is solely within gitlab-runner.) Now that I've configured minio as a local S3-compatible object storage for artifacts, though, it fails. ... Created cache Uploading artifacts for successful job Uploading artifacts... /builds/git/mygroup/citest/ci/build/*.tar.gz: found 1 matching files and directories /builds/git/mygroup/citest/ci/lib: found 67 matching files and directories WARNING: Uploading artifacts as "archive" to coordinator... failed id=397 responseStatus=500 Internal Server Error status=500 token=q42snHs9 WARNING: Retrying... context=artifacts-uploader error=invalid argument WARNING: Uploading artifacts as "archive" to coordinator... failed id=397 responseStatus=500 Internal Server Error status=500 token=q42snHs9 WARNING: Retrying... context=artifacts-uploader error=invalid argument WARNING: Uploading artifacts as "archive" to coordinator... failed id=397 responseStatus=500 Internal Server Error status=500 token=q42snHs9 FATAL: invalid argument Cleaning up file based variables ERROR: Job failed: exit code 1 The only fail is in the artifact-storage attempt. (With in-gitlab artifacts, this all succeeded and worked.) I can find no reference of "invalid argument" within the minio logs (which say nothing during this time). I'm not certain that it is a minio-problem. The relevant portion of the gitlab config: gitlab_rails['object_store']['enabled'] = true gitlab_rails['object_store']['proxy_download'] = false gitlab_rails['object_store']['connection'] = { 'provider' => 'AWS', 'host' => "minio.mydomain.com", # 'region' => '', 'aws_access_key_id' => '<AWS_ACCESS_KEY_ID>', 'aws_secret_access_key' => '<AWS_SECRET_ACCESS_KEY>', 'path_style' => true } gitlab_rails['object_store']['objects']['artifacts']['bucket'] = 'gitlab-artifacts-storage' gitlab_rails['object_store']['objects']['external_diffs']['enabled'] = false gitlab_rails['object_store']['objects']['lfs']['enabled'] = false gitlab_rails['object_store']['objects']['uploads']['bucket'] = 'gitlab-uploads-storage' gitlab_rails['object_store']['objects']['packages']['enabled'] = false gitlab_rails['object_store']['objects']['dependency_proxy']['enabled'] = false gitlab_rails['object_store']['objects']['terraform_state']['enabled'] = false gitlab_rails['object_store']['objects']['pages']['enabled'] = false That configuration is adapted from https://docs.gitlab.com/ee/administration/object_storage.html, deselecting storage of components I don't think I need. I added 'path_style' => true because without it, the default of bucket.minio.mydomain.com was not resolved correctly (so this is mostly-S3-compatible, not perfectly AWS). I have also tried this with 'proxy_download' of true, no change. I'm logged into the minio console, and the gitlab-artifacts-storage bucket exists. In fact, after these failed "build" tests, I'm seeing newly created job artifacts stored in this bucket (as job.log), so I know that basic connectivity (i.e., access key and secret) works: In my research, I've seen similar errors linked to nginx rev-proxy issues, which suggests that something in the traefik configuration (or just its presence) might be an issue. It is merely passing traffic, it is doing no path-translation/stripping. Regardless, all of the rev-proxy discussion was on nginx, often attempting path-munging of some sort, and was resolved with some seemingly-unrelated change to the nginx configuration. I haven't found any that map into the traefik domain. traefik access.log {"BackendAddr":"172.19.0.2:9000","BackendName":"backend-minio-myswarm","BackendURL":{"Scheme":"http","Opaque":"","User":null,"Host":"172.19.0.2:9000","Path":"","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":""},"ClientAddr":"172.19.0.1:44742","ClientHost":"172.19.0.1","ClientPort":"44742","ClientUsername":"-","DownstreamContentSize":329,"DownstreamStatus":200,"DownstreamStatusLine":"200 OK","Duration":3472517,"FrontendName":"Host-minio-mydomain-com-2","OriginContentSize":329,"OriginDuration":3422850,"OriginStatus":200,"OriginStatusLine":"200 OK","Overhead":49667,"RequestAddr":"minio.mydomain.com","RequestContentSize":0,"RequestCount":131470,"RequestHost":"minio.mydomain.com","RequestLine":"POST /gitlab-artifacts-storage/tmp/uploads/1616099873-1316-0002-0683-2dfe06e7a451447ff0b4a5518c8e19c6?uploads HTTP/1.1","RequestMethod":"POST","RequestPath":"/gitlab-artifacts-storage/tmp/uploads/1616099873-1316-0002-0683-2dfe06e7a451447ff0b4a5518c8e19c6?uploads","RequestPort":"-","RequestProtocol":"HTTP/1.1","RetryAttempts":0,"StartLocal":"2021-03-18T20:37:53.890788923Z","StartUTC":"2021-03-18T20:37:53.890788923Z","downstream_Accept-Ranges":"bytes","downstream_Content-Length":"329","downstream_Content-Security-Policy":"block-all-mixed-content","downstream_Content-Type":"application/xml","downstream_Date":"Thu, 18 Mar 2021 20:37:53 GMT","downstream_Referrer-Policy":"same-origin","downstream_Server":"MinIO","downstream_Strict-Transport-Security":"max-age=315360000","downstream_Vary":"Origin","downstream_X-Amz-Request-Id":"166D8A45D8DDC4B3","downstream_X-Xss-Protection":"1; mode=block","level":"info","msg":"","origin_Accept-Ranges":"bytes","origin_Content-Length":"329","origin_Content-Security-Policy":"block-all-mixed-content","origin_Content-Type":"application/xml","origin_Date":"Thu, 18 Mar 2021 20:37:53 GMT","origin_Referrer-Policy":"same-origin","origin_Server":"MinIO","origin_Strict-Transport-Security":"max-age=315360000","origin_Vary":"Origin","origin_X-Amz-Request-Id":"166D8A45D8DDC4B3","origin_X-Xss-Protection":"1; mode=block","request_Authorization":"AWS4-HMAC-SHA256 Credential=MyS3AccessKey/20210318//s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=SomeSignature","request_Content-Length":"0","request_User-Agent":"fog-core/2.1.0","request_X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","request_X-Amz-Date":"20210318T203753Z","time":"2021-03-18T20:37:53Z"} {"BackendAddr":"172.19.0.2:9000","BackendName":"backend-minio-myswarm","BackendURL":{"Scheme":"http","Opaque":"","User":null,"Host":"172.19.0.2:9000","Path":"","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":""},"ClientAddr":"172.19.0.1:44748","ClientHost":"172.19.0.1","ClientPort":"44748","ClientUsername":"-","DownstreamContentSize":467,"DownstreamStatus":404,"DownstreamStatusLine":"404 Not Found","Duration":1571234,"FrontendName":"Host-minio-mydomain-com-2","OriginContentSize":467,"OriginDuration":1525159,"OriginStatus":404,"OriginStatusLine":"404 Not Found","Overhead":46075,"RequestAddr":"minio.mydomain.com","RequestContentSize":0,"RequestCount":131472,"RequestHost":"minio.mydomain.com","RequestLine":"GET /gitlab-artifacts-storage/tmp/uploads/1616099873-1316-0002-0683-2dfe06e7a451447ff0b4a5518c8e19c6?X-Amz-Expires=15300\u0026X-Amz-Date=20210318T203753Z\u0026X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Credential=MyS3AccessKey%2F20210318%2F%2Fs3%2Faws4_request\u0026X-Amz-SignedHeaders=host\u0026X-Amz-Signature=SomeSignature HTTP/1.1","RequestMethod":"GET","RequestPath":"/gitlab-artifacts-storage/tmp/uploads/1616099873-1316-0002-0683-2dfe06e7a451447ff0b4a5518c8e19c6?X-Amz-Expires=15300\u0026X-Amz-Date=20210318T203753Z\u0026X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Credential=MyS3AccessKey%2F20210318%2F%2Fs3%2Faws4_request\u0026X-Amz-SignedHeaders=host\u0026X-Amz-Signature=SomeSignature","RequestPort":"-","RequestProtocol":"HTTP/1.1","RetryAttempts":0,"StartLocal":"2021-03-18T20:37:54.090024071Z","StartUTC":"2021-03-18T20:37:54.090024071Z","downstream_Accept-Ranges":"bytes","downstream_Content-Length":"467","downstream_Content-Security-Policy":"block-all-mixed-content","downstream_Content-Type":"application/xml","downstream_Date":"Thu, 18 Mar 2021 20:37:54 GMT","downstream_Referrer-Policy":"same-origin","downstream_Server":"MinIO","downstream_Strict-Transport-Security":"max-age=315360000","downstream_Vary":"Origin","downstream_X-Amz-Request-Id":"166D8A45E4BD6115","downstream_X-Xss-Protection":"1; mode=block","level":"info","msg":"","origin_Accept-Ranges":"bytes","origin_Content-Length":"467","origin_Content-Security-Policy":"block-all-mixed-content","origin_Content-Type":"application/xml","origin_Date":"Thu, 18 Mar 2021 20:37:54 GMT","origin_Referrer-Policy":"same-origin","origin_Server":"MinIO","origin_Strict-Transport-Security":"max-age=315360000","origin_Vary":"Origin","origin_X-Amz-Request-Id":"166D8A45E4BD6115","origin_X-Xss-Protection":"1; mode=block","request_User-Agent":"Go-http-client/1.1","time":"2021-03-18T20:37:54Z"} {"BackendAddr":"172.19.0.2:9000","BackendName":"backend-minio-myswarm","BackendURL":{"Scheme":"http","Opaque":"","User":null,"Host":"172.19.0.2:9000","Path":"","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":""},"ClientAddr":"172.19.0.1:44754","ClientHost":"172.19.0.1","ClientPort":"44754","ClientUsername":"-","DownstreamContentSize":0,"DownstreamStatus":404,"DownstreamStatusLine":"404 Not Found","Duration":1205368,"FrontendName":"Host-minio-mydomain-com-2","OriginContentSize":0,"OriginDuration":1145885,"OriginStatus":404,"OriginStatusLine":"404 Not Found","Overhead":59483,"RequestAddr":"minio.mydomain.com","RequestContentSize":0,"RequestCount":131473,"RequestHost":"minio.mydomain.com","RequestLine":"HEAD /gitlab-artifacts-storage/tmp/uploads/1616099873-1316-0002-0683-2dfe06e7a451447ff0b4a5518c8e19c6 HTTP/1.1","RequestMethod":"HEAD","RequestPath":"/gitlab-artifacts-storage/tmp/uploads/1616099873-1316-0002-0683-2dfe06e7a451447ff0b4a5518c8e19c6","RequestPort":"-","RequestProtocol":"HTTP/1.1","RetryAttempts":0,"StartLocal":"2021-03-18T20:37:54.162829022Z","StartUTC":"2021-03-18T20:37:54.162829022Z","downstream_Accept-Ranges":"bytes","downstream_Content-Length":"0","downstream_Content-Security-Policy":"block-all-mixed-content","downstream_Date":"Thu, 18 Mar 2021 20:37:54 GMT","downstream_Referrer-Policy":"same-origin","downstream_Server":"MinIO","downstream_Strict-Transport-Security":"max-age=315360000","downstream_Vary":"Origin","downstream_X-Amz-Request-Id":"166D8A45E9114D33","downstream_X-Xss-Protection":"1; mode=block","level":"info","msg":"","origin_Accept-Ranges":"bytes","origin_Content-Length":"0","origin_Content-Security-Policy":"block-all-mixed-content","origin_Date":"Thu, 18 Mar 2021 20:37:54 GMT","origin_Referrer-Policy":"same-origin","origin_Server":"MinIO","origin_Strict-Transport-Security":"max-age=315360000","origin_Vary":"Origin","origin_X-Amz-Request-Id":"166D8A45E9114D33","origin_X-Xss-Protection":"1; mode=block","request_Authorization":"AWS4-HMAC-SHA256 Credential=MyS3AccessKey/20210318//s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=SomeSignature","request_Content-Length":"0","request_User-Agent":"fog-core/2.1.0","request_X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","request_X-Amz-Date":"20210318T203754Z","time":"2021-03-18T20:37:54Z"} {"BackendAddr":"172.19.0.2:9000","BackendName":"backend-minio-myswarm","BackendURL":{"Scheme":"http","Opaque":"","User":null,"Host":"172.19.0.2:9000","Path":"","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":""},"ClientAddr":"172.19.0.1:44758","ClientHost":"172.19.0.1","ClientPort":"44758","ClientUsername":"-","DownstreamContentSize":0,"DownstreamStatus":404,"DownstreamStatusLine":"404 Not Found","Duration":1087332,"FrontendName":"Host-minio-mydomain-com-2","OriginContentSize":0,"OriginDuration":1031618,"OriginStatus":404,"OriginStatusLine":"404 Not Found","Overhead":55714,"RequestAddr":"minio.mydomain.com","RequestContentSize":0,"RequestCount":131474,"RequestHost":"minio.mydomain.com","RequestLine":"HEAD /gitlab-artifacts-storage/tmp/uploads/1616099873-1316-0002-0683-2dfe06e7a451447ff0b4a5518c8e19c6 HTTP/1.1","RequestMethod":"HEAD","RequestPath":"/gitlab-artifacts-storage/tmp/uploads/1616099873-1316-0002-0683-2dfe06e7a451447ff0b4a5518c8e19c6","RequestPort":"-","RequestProtocol":"HTTP/1.1","RetryAttempts":0,"StartLocal":"2021-03-18T20:37:54.206750001Z","StartUTC":"2021-03-18T20:37:54.206750001Z","downstream_Accept-Ranges":"bytes","downstream_Content-Length":"0","downstream_Content-Security-Policy":"block-all-mixed-content","downstream_Date":"Thu, 18 Mar 2021 20:37:54 GMT","downstream_Referrer-Policy":"same-origin","downstream_Server":"MinIO","downstream_Strict-Transport-Security":"max-age=315360000","downstream_Vary":"Origin","downstream_X-Amz-Request-Id":"166D8A45EBAE7A4E","downstream_X-Xss-Protection":"1; mode=block","level":"info","msg":"","origin_Accept-Ranges":"bytes","origin_Content-Length":"0","origin_Content-Security-Policy":"block-all-mixed-content","origin_Date":"Thu, 18 Mar 2021 20:37:54 GMT","origin_Referrer-Policy":"same-origin","origin_Server":"MinIO","origin_Strict-Transport-Security":"max-age=315360000","origin_Vary":"Origin","origin_X-Amz-Request-Id":"166D8A45EBAE7A4E","origin_X-Xss-Protection":"1; mode=block","request_Authorization":"AWS4-HMAC-SHA256 Credential=MyS3AccessKey/20210318//s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=SomeSignature","request_Content-Length":"0","request_User-Agent":"fog-core/2.1.0","request_X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","request_X-Amz-Date":"20210318T203754Z","time":"2021-03-18T20:37:54Z"} {"BackendAddr":"172.19.0.2:9000","BackendName":"backend-minio-myswarm","BackendURL":{"Scheme":"http","Opaque":"","User":null,"Host":"172.19.0.2:9000","Path":"","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":""},"ClientAddr":"172.19.0.1:44762","ClientHost":"172.19.0.1","ClientPort":"44762","ClientUsername":"-","DownstreamContentSize":0,"DownstreamStatus":404,"DownstreamStatusLine":"404 Not Found","Duration":1126408,"FrontendName":"Host-minio-mydomain-com-2","OriginContentSize":0,"OriginDuration":1068170,"OriginStatus":404,"OriginStatusLine":"404 Not Found","Overhead":58238,"RequestAddr":"minio.mydomain.com","RequestContentSize":0,"RequestCount":131475,"RequestHost":"minio.mydomain.com","RequestLine":"HEAD /gitlab-artifacts-storage/tmp/uploads/1616099873-1316-0002-0683-2dfe06e7a451447ff0b4a5518c8e19c6 HTTP/1.1","RequestMethod":"HEAD","RequestPath":"/gitlab-artifacts-storage/tmp/uploads/1616099873-1316-0002-0683-2dfe06e7a451447ff0b4a5518c8e19c6","RequestPort":"-","RequestProtocol":"HTTP/1.1","RetryAttempts":0,"StartLocal":"2021-03-18T20:37:54.243629562Z","StartUTC":"2021-03-18T20:37:54.243629562Z","downstream_Accept-Ranges":"bytes","downstream_Content-Length":"0","downstream_Content-Security-Policy":"block-all-mixed-content","downstream_Date":"Thu, 18 Mar 2021 20:37:54 GMT","downstream_Referrer-Policy":"same-origin","downstream_Server":"MinIO","downstream_Strict-Transport-Security":"max-age=315360000","downstream_Vary":"Origin","downstream_X-Amz-Request-Id":"166D8A45EDE0062E","downstream_X-Xss-Protection":"1; mode=block","level":"info","msg":"","origin_Accept-Ranges":"bytes","origin_Content-Length":"0","origin_Content-Security-Policy":"block-all-mixed-content","origin_Date":"Thu, 18 Mar 2021 20:37:54 GMT","origin_Referrer-Policy":"same-origin","origin_Server":"MinIO","origin_Strict-Transport-Security":"max-age=315360000","origin_Vary":"Origin","origin_X-Amz-Request-Id":"166D8A45EDE0062E","origin_X-Xss-Protection":"1; mode=block","request_Authorization":"AWS4-HMAC-SHA256 Credential=MyS3AccessKey/20210318//s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=SomeSignature","request_Content-Length":"0","request_User-Agent":"fog-core/2.1.0","request_X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","request_X-Amz-Date":"20210318T203754Z","time":"2021-03-18T20:37:54Z"} {"BackendAddr":"172.19.0.2:9000","BackendName":"backend-minio-myswarm","BackendURL":{"Scheme":"http","Opaque":"","User":null,"Host":"172.19.0.2:9000","Path":"","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":""},"ClientAddr":"172.19.0.1:44766","ClientHost":"172.19.0.1","ClientPort":"44766","ClientUsername":"-","DownstreamContentSize":0,"DownstreamStatus":404,"DownstreamStatusLine":"404 Not Found","Duration":1279861,"FrontendName":"Host-minio-mydomain-com-2","OriginContentSize":0,"OriginDuration":1227773,"OriginStatus":404,"OriginStatusLine":"404 Not Found","Overhead":52088,"RequestAddr":"minio.mydomain.com","RequestContentSize":0,"RequestCount":131476,"RequestHost":"minio.mydomain.com","RequestLine":"HEAD /gitlab-artifacts-storage/tmp/uploads/1616099873-1316-0002-0683-2dfe06e7a451447ff0b4a5518c8e19c6 HTTP/1.1","RequestMethod":"HEAD","RequestPath":"/gitlab-artifacts-storage/tmp/uploads/1616099873-1316-0002-0683-2dfe06e7a451447ff0b4a5518c8e19c6","RequestPort":"-","RequestProtocol":"HTTP/1.1","RetryAttempts":0,"StartLocal":"2021-03-18T20:37:54.277572935Z","StartUTC":"2021-03-18T20:37:54.277572935Z","downstream_Accept-Ranges":"bytes","downstream_Content-Length":"0","downstream_Content-Security-Policy":"block-all-mixed-content","downstream_Date":"Thu, 18 Mar 2021 20:37:54 GMT","downstream_Referrer-Policy":"same-origin","downstream_Server":"MinIO","downstream_Strict-Transport-Security":"max-age=315360000","downstream_Vary":"Origin","downstream_X-Amz-Request-Id":"166D8A45EFE57F90","downstream_X-Xss-Protection":"1; mode=block","level":"info","msg":"","origin_Accept-Ranges":"bytes","origin_Content-Length":"0","origin_Content-Security-Policy":"block-all-mixed-content","origin_Date":"Thu, 18 Mar 2021 20:37:54 GMT","origin_Referrer-Policy":"same-origin","origin_Server":"MinIO","origin_Strict-Transport-Security":"max-age=315360000","origin_Vary":"Origin","origin_X-Amz-Request-Id":"166D8A45EFE57F90","origin_X-Xss-Protection":"1; mode=block","request_Authorization":"AWS4-HMAC-SHA256 Credential=MyS3AccessKey/20210318//s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=SomeSignature","request_Content-Length":"0","request_User-Agent":"fog-core/2.1.0","request_X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","request_X-Amz-Date":"20210318T203754Z","time":"2021-03-18T20:37:54Z"} {"BackendAddr":"172.19.0.2:9000","BackendName":"backend-minio-myswarm","BackendURL":{"Scheme":"http","Opaque":"","User":null,"Host":"172.19.0.2:9000","Path":"","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":""},"ClientAddr":"172.19.0.1:44774","ClientHost":"172.19.0.1","ClientPort":"44774","ClientUsername":"-","DownstreamContentSize":329,"DownstreamStatus":200,"DownstreamStatusLine":"200 OK","Duration":4317260,"FrontendName":"Host-minio-mydomain-com-2","OriginContentSize":329,"OriginDuration":4261951,"OriginStatus":200,"OriginStatusLine":"200 OK","Overhead":55309,"RequestAddr":"minio.mydomain.com","RequestContentSize":0,"RequestCount":131480,"RequestHost":"minio.mydomain.com","RequestLine":"POST /gitlab-artifacts-storage/tmp/uploads/1616099875-1422-0002-1921-4427532294f444d4582d12ec3b75ba3a?uploads HTTP/1.1","RequestMethod":"POST","RequestPath":"/gitlab-artifacts-storage/tmp/uploads/1616099875-1422-0002-1921-4427532294f444d4582d12ec3b75ba3a?uploads","RequestPort":"-","RequestProtocol":"HTTP/1.1","RetryAttempts":0,"StartLocal":"2021-03-18T20:37:55.503920248Z","StartUTC":"2021-03-18T20:37:55.503920248Z","downstream_Accept-Ranges":"bytes","downstream_Content-Length":"329","downstream_Content-Security-Policy":"block-all-mixed-content","downstream_Content-Type":"application/xml","downstream_Date":"Thu, 18 Mar 2021 20:37:55 GMT","downstream_Referrer-Policy":"same-origin","downstream_Server":"MinIO","downstream_Strict-Transport-Security":"max-age=315360000","downstream_Vary":"Origin","downstream_X-Amz-Request-Id":"166D8A4639004631","downstream_X-Xss-Protection":"1; mode=block","level":"info","msg":"","origin_Accept-Ranges":"bytes","origin_Content-Length":"329","origin_Content-Security-Policy":"block-all-mixed-content","origin_Content-Type":"application/xml","origin_Date":"Thu, 18 Mar 2021 20:37:55 GMT","origin_Referrer-Policy":"same-origin","origin_Server":"MinIO","origin_Strict-Transport-Security":"max-age=315360000","origin_Vary":"Origin","origin_X-Amz-Request-Id":"166D8A4639004631","origin_X-Xss-Protection":"1; mode=block","request_Authorization":"AWS4-HMAC-SHA256 Credential=MyS3AccessKey/20210318//s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=SomeSignature","request_Content-Length":"0","request_User-Agent":"fog-core/2.1.0","request_X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","request_X-Amz-Date":"20210318T203755Z","time":"2021-03-18T20:37:55Z"} {"BackendAddr":"172.19.0.2:9000","BackendName":"backend-minio-myswarm","BackendURL":{"Scheme":"http","Opaque":"","User":null,"Host":"172.19.0.2:9000","Path":"","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":""},"ClientAddr":"172.19.0.1:44778","ClientHost":"172.19.0.1","ClientPort":"44778","ClientUsername":"-","DownstreamContentSize":467,"DownstreamStatus":404,"DownstreamStatusLine":"404 Not Found","Duration":1879630,"FrontendName":"Host-minio-mydomain-com-2","OriginContentSize":467,"OriginDuration":1830988,"OriginStatus":404,"OriginStatusLine":"404 Not Found","Overhead":48642,"RequestAddr":"minio.mydomain.com","RequestContentSize":0,"RequestCount":131482,"RequestHost":"minio.mydomain.com","RequestLine":"GET /gitlab-artifacts-storage/tmp/uploads/1616099875-1422-0002-1921-4427532294f444d4582d12ec3b75ba3a?X-Amz-Expires=15300\u0026X-Amz-Date=20210318T203755Z\u0026X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Credential=MyS3AccessKey%2F20210318%2F%2Fs3%2Faws4_request\u0026X-Amz-SignedHeaders=host\u0026X-Amz-Signature=SomeSignature HTTP/1.1","RequestMethod":"GET","RequestPath":"/gitlab-artifacts-storage/tmp/uploads/1616099875-1422-0002-1921-4427532294f444d4582d12ec3b75ba3a?X-Amz-Expires=15300\u0026X-Amz-Date=20210318T203755Z\u0026X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Credential=MyS3AccessKey%2F20210318%2F%2Fs3%2Faws4_request\u0026X-Amz-SignedHeaders=host\u0026X-Amz-Signature=SomeSignature","RequestPort":"-","RequestProtocol":"HTTP/1.1","RetryAttempts":0,"StartLocal":"2021-03-18T20:37:55.703174362Z","StartUTC":"2021-03-18T20:37:55.703174362Z","downstream_Accept-Ranges":"bytes","downstream_Content-Length":"467","downstream_Content-Security-Policy":"block-all-mixed-content","downstream_Content-Type":"application/xml","downstream_Date":"Thu, 18 Mar 2021 20:37:55 GMT","downstream_Referrer-Policy":"same-origin","downstream_Server":"MinIO","downstream_Strict-Transport-Security":"max-age=315360000","downstream_Vary":"Origin","downstream_X-Amz-Request-Id":"166D8A4644E482E7","downstream_X-Xss-Protection":"1; mode=block","level":"info","msg":"","origin_Accept-Ranges":"bytes","origin_Content-Length":"467","origin_Content-Security-Policy":"block-all-mixed-content","origin_Content-Type":"application/xml","origin_Date":"Thu, 18 Mar 2021 20:37:55 GMT","origin_Referrer-Policy":"same-origin","origin_Server":"MinIO","origin_Strict-Transport-Security":"max-age=315360000","origin_Vary":"Origin","origin_X-Amz-Request-Id":"166D8A4644E482E7","origin_X-Xss-Protection":"1; mode=block","request_User-Agent":"Go-http-client/1.1","time":"2021-03-18T20:37:55Z"} {"BackendAddr":"172.19.0.2:9000","BackendName":"backend-minio-myswarm","BackendURL":{"Scheme":"http","Opaque":"","User":null,"Host":"172.19.0.2:9000","Path":"","RawPath":"","ForceQuery":false,"RawQuery":"","Fragment":""},"ClientAddr":"172.19.0.1:44782","ClientHost":"172.19.0.1","ClientPort":"44782","ClientUsername":"-","DownstreamContentSize":0,"DownstreamStatus":404,"DownstreamStatusLine":"404 Not Found","Duration":2076600,"FrontendName":"Host-minio-mydomain-com-2","OriginContentSize":0,"OriginDuration":2009920,"OriginStatus":404,"OriginStatusLine":"404 Not Found","Overhead":66680,"RequestAddr":"minio.mydomain.com","RequestContentSize":0,"RequestCount":131484,"RequestHost":"minio.mydomain.com","RequestLine":"HEAD /gitlab-artifacts-storage/tmp/uploads/1616099875-1422-0002-1921-4427532294f444d4582d12ec3b75ba3a HTTP/1.1","RequestMethod":"HEAD","RequestPath":"/gitlab-artifacts-storage/tmp/uploads/1616099875-1422-0002-1921-4427532294f444d4582d12ec3b75ba3a","RequestPort":"-","RequestProtocol":"HTTP/1.1","RetryAttempts":0,"StartLocal":"2021-03-18T20:37:56.652353505Z","StartUTC":"2021-03-18T20:37:56.652353505Z","downstream_Accept-Ranges":"bytes","downstream_Content-Length":"0","downstream_Content-Security-Policy":"block-all-mixed-content","downstream_Date":"Thu, 18 Mar 2021 20:37:56 GMT","downstream_Referrer-Policy":"same-origin","downstream_Server":"MinIO","downstream_Strict-Transport-Security":"max-age=315360000","downstream_Vary":"Origin","downstream_X-Amz-Request-Id":"166D8A467D7A9332","downstream_X-Xss-Protection":"1; mode=block","level":"info","msg":"","origin_Accept-Ranges":"bytes","origin_Content-Length":"0","origin_Content-Security-Policy":"block-all-mixed-content","origin_Date":"Thu, 18 Mar 2021 20:37:56 GMT","origin_Referrer-Policy":"same-origin","origin_Server":"MinIO","origin_Strict-Transport-Security":"max-age=315360000","origin_Vary":"Origin","origin_X-Amz-Request-Id":"166D8A467D7A9332","origin_X-Xss-Protection":"1; mode=block","request_Authorization":"AWS4-HMAC-SHA256 Credential=MyS3AccessKey/20210318//s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=SomeSignature","request_Content-Length":"0","request_User-Agent":"fog-core/2.1.0","request_X-Amz-Content-Sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","request_X-Amz-Date":"20210318T203756Z","time":"2021-03-18T20:37:56Z"} I understand there is a difference between job artifacts and pipeline artifacts, so I think what I'm missing is a configuration distinction between "job" and "pipeline". .gitlab-ci.yml snippet variables: GIT_DEPTH: 10 R_LIBS_USER: "$CI_PROJECT_DIR/ci/lib" BUILD_DIR: "$CI_PROJECT_DIR/ci/build" CHECK_DIR: "$CI_PROJECT_DIR/ci/logs" BUILD_LOGS_DIR: "$CI_PROJECT_DIR/ci/logs/$CI_PROJECT_NAME.Rcheck" default: image: rocker/shiny-verse:4.0.3 interruptible: true build-package: stage: build script: - mkdir -p "$R_LIBS_USER" "$BUILD_DIR" - R -e ' devtools::install_deps(dependencies = TRUE, lib = Sys.getenv("R_LIBS_USER")) ; devtools::build(path = Sys.getenv("BUILD_DIR")) ;' artifacts: paths: - $BUILD_DIR/*.tar.gz - $R_LIBS_USER cache: key: "${CI_COMMIT_REF_SLUG}__cilib" paths: - $R_LIBS_USER (Yes, it is both cached and an artifact. This is an instance of me testing the CI subsystem, not something I intend to maintain.) This is in a docker-swarm behind a traefik reverse-proxy (and SSL terminator).
The answer is to bypass the empty-string test; the underlying protocol does not support region-less configuration, nor is there a configuration option to support it. The trick is able to work because the use of 'endpoint' causes the 'region' to be ignored. With that, setting the region to something and forcing the endpoint allows it to work: gitlab_rails['object_store']['connection'] = { 'provider' => 'AWS', 'host' => "minio.mydomain.com", 'region' => 'us-east-1', # this must be non-empty, but is ignored ... 'endpoint' => 'https://minio.mydomain.com', # ... because of 'endpoint' 'aws_access_key_id' => '<AWS_ACCESS_KEY_ID>', 'aws_secret_access_key' => '<AWS_SECRET_ACCESS_KEY>', 'path_style' => true } (I owe discovery of this to Florian, in gitlab-org/gitlab#297227.)
Service running on RHEL7.5 is not running on RHEL8 (httpd service)
I have service which was working fine with RHEL 7.5, now I have upgraded to RHEL 8 and same service is failing with below status: Service.service - LSB: Web Server Loaded: loaded (/etc/rc.d/init.d/Service; generated) Active: failed (Result: protocol) since Mon 2020-04-06 12:02:21 IST; 38min ago Docs: man:systemd-sysv-generator(8) Process: 403 ExecStart=/etc/rc.d/init.d/Service start (code=exited, status=0/SUCCESS) Apr 06 12:02:21 localhost.localdomain systemd[1]: Starting LSB: Web Server... Apr 06 12:02:21 localhost.localdomain Service[403]: httpd (pid 29434) already running Apr 06 12:02:21 localhost.localdomain systemd[1]: Service.service: Refusing to accept PID outside of service control group, acquired through unsafe symlink chain: /usr/local/apache/logs/Service.pid Apr 06 12:02:21 localhost.localdomain systemd[1]: Service.service: Refusing to accept PID outside of service control group, acquired through unsafe symlink chain: /usr/local/apache/logs/Service.pid Apr 06 12:02:21 localhost.localdomain systemd[1]: Service.service: Failed with result 'protocol'. Apr 06 12:02:21 localhost.localdomain systemd[1]: Failed to start LSB: Web Server THis is my Service unit placed under /etc/init.d/Service, same is done for RHEL 7.5 but there this service is working and in RHEL 8 it is not. One more thing here to note is web server is working as expected although giving me this error. #!/bin/sh # # chkconfig: 345 97 03 # description:Web Server # processname: httpd # config: /usr/local/Test/apache/conf/httpd.conf # pidfile: /usr/local/Test/apache/logs/httpd.pid ### BEGIN INIT INFO # Provides: Service # Required-Start: $remote_fs $network $syslog # Should-Start: # Required-Stop: # Default-Start: 3 4 5 # Default-Stop: 0 1 2 6`enter code here` # Short-Description: Web Server # Description: Web Server ### END INIT INFO LANG=en_US.iso88591 export LANG BASEDIR=/usr/local/Test/apache PATH=$BASEDIR/bin:/usr/bin:/bin export PATH LD_LIBRARY_PATH=$BASEDIR/lib export LD_LIBRARY_PATH inst=/usr/local/Test MIBDIRS=$inst/mibs export MIBDIRS case $1 in start) apachectl start ;; stop) apachectl stop ;; restart) apachectl restart ;; *) echo "usage: $0 { start | stop | restart }" ;; esac Plz help me into this.
When I enable SSL on apache2 ubuntu server both http and https does not work
I am trying to enable SSL for my webserver. However, when I enable ssl, http stops working and https does not start working. I have followed the following guide: https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04 There is no firewall activated on the server. This is the default-ssl.conf file: <IfModule mod_ssl.c> <VirtualHost _default_:443> ServerAdmin admin#MyWebSit.com ServerName MyWebSite.com ServerAlias www.MyWebSite.com DocumentRoot /var/www/html # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf # SSL Engine Switch: # Enable/Disable SSL for this virtual host. SSLEngine on # A self-signed (snakeoil) certificate can be created by installing # the ssl-cert package. See # /usr/share/doc/apache2/README.Debian.gz for more info. # If both key and certificate are stored in the same file, only the # SSLCertificateFile directive is needed. SSLCertificateFile /etc/apache2/ssl/MyWebSite_com.crt SSLCertificateKeyFile /etc/apache2/ssl/MyWebSite_com.key # Server Certificate Chain: # Point SSLCertificateChainFile at a file containing the # concatenation of PEM encoded CA certificates which form the # certificate chain for the server certificate. Alternatively # the referenced file can be the same as SSLCertificateFile # when the CA certificates are directly appended to the server # certificate for convinience. #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt # Certificate Authority (CA): # Set the CA certificate verification path where to find CA # certificates for client authentication or alternatively one # huge file containing all of them (file must be PEM encoded) # Note: Inside SSLCACertificatePath you need hash symlinks # to point to the certificate files. Use the provided # Makefile to update the hash symlinks after changes. #SSLCACertificatePath /etc/ssl/certs/ #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt # Certificate Revocation Lists (CRL): # Set the CA revocation path where to find CA CRLs for client # authentication or alternatively one huge file containing all # of them (file must be PEM encoded) # Note: Inside SSLCARevocationPath you need hash symlinks # to point to the certificate files. Use the provided # Makefile to update the hash symlinks after changes. #SSLCARevocationPath /etc/apache2/ssl.crl/ #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl # Client Authentication (Type): # Client certificate verification type and depth. Types are # none, optional, require and optional_no_ca. Depth is a # number which specifies how deeply to verify the certificate # issuer chain before deciding the certificate is not valid. #SSLVerifyClient require #SSLVerifyDepth 10 # SSL Engine Options: # Set various options for the SSL engine. # o FakeBasicAuth: # Translate the client X.509 into a Basic Authorisation. This means that # the standard Auth/DBMAuth methods can be used for access control. The # user name is the `one line' version of the client's X.509 certificate. # Note that no password is obtained from the user. Every entry in the user # file needs this password: `xxj31ZMTZzkVA'. # o ExportCertData: # This exports two additional environment variables: SSL_CLIENT_CERT and # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the # server (always existing) and the client (only existing when client # authentication is used). This can be used to import the certificates # into CGI scripts. # o StdEnvVars: # This exports the standard SSL/TLS related `SSL_*' environment variables. # Per default this exportation is switched off for performance reasons, # because the extraction step is an expensive operation and is usually # useless for serving static content. So one usually enables the # exportation for CGI and SSI requests only. # o OptRenegotiate: # This enables optimized SSL connection renegotiation handling when SSL # directives are used in per-directory context. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> # SSL Protocol Adjustments: # The safe and default but still SSL/TLS standard compliant shutdown # approach is that mod_ssl sends the close notify alert but doesn't wait for # the close notify alert from client. When you need a different shutdown # approach you can use one of the following variables: # o ssl-unclean-shutdown: # This forces an unclean shutdown when the connection is closed, i.e. no # SSL close notify alert is send or allowed to received. This violates # the SSL/TLS standard but is needed for some brain-dead browsers. Use # this when you receive I/O errors because of the standard approach where # mod_ssl sends the close notify alert. # o ssl-accurate-shutdown: # This forces an accurate shutdown when the connection is closed, i.e. a # SSL close notify alert is send and mod_ssl waits for the close notify # alert of the client. This is 100% SSL/TLS standard compliant, but in # practice often causes hanging connections with brain-dead browsers. Use # this only for browsers where you know that their SSL implementation # works correctly. # Notice: Most problems of broken clients are also related to the HTTP # keep-alive facility, so you usually additionally want to disable # keep-alive for those clients, too. Use variable "nokeepalive" for this. # Similarly, one has to force some clients to use HTTP/1.0 to workaround # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and # "force-response-1.0" for this. # BrowserMatch "MSIE [2-6]" \ # nokeepalive ssl-unclean-shutdown \ # downgrade-1.0 force-response-1.0 </VirtualHost> </IfModule> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet apache -S gives me: AH00111: Config variable ${APACHE_RUN_DIR} is not defined apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot and apachectl -S gives me: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.178.24. Set the 'ServerName' directive globally to suppress this message VirtualHost configuration: *:80 192.168.178.24 (/etc/apache2/sites-enabled/000-default.conf:1) *:443 MyWebSite.com (/etc/apache2/sites-enabled/default-ssl.conf:2) ServerRoot: "/etc/apache2" Main DocumentRoot: "/var/www/html" Main ErrorLog: "/var/log/apache2/error.log" Mutex watchdog-callback: using_defaults Mutex ssl-stapling-refresh: using_defaults Mutex ssl-stapling: using_defaults Mutex ssl-cache: using_defaults Mutex default: dir="/var/run/apache2/" mechanism=default Mutex mpm-accept: using_defaults PidFile: "/var/run/apache2/apache2.pid" Define: DUMP_VHOSTS Define: DUMP_RUN_CFG User: name="www-data" id=33 Group: name="www-data" id=33 disabling ssl immediately gets http back up. (after a restart of Apache) Unfortunately, I no longer know what I can try to do. any assistance here would be greatly appreciated! Thank you in advance! EDIT: As it is clear the information I've provided does not fully explain my issue, I am adding additional details here: sudo service apache2 restart Gives the following result: Warning: The unit file, source configuration file or drop-ins of apache2.service changed on disk. Run 'systemctl daemon-reload' to reload units. Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details systemctl daemon-reload Runs successfully, but I still get the Job failed response when running the restart command again. Below is the response for "systemctl status apache2.service" ● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Drop-In: /lib/systemd/system/apache2.service.d └─apache2-systemd.conf Active: failed (Result: exit-code) since Mon 2019-12-02 11:08:57 CET; 3h 28min ago Process: 4557 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE) Main PID: 1413 (code=exited, status=0/SUCCESS) Dec 02 11:08:57 ubuntu systemd[1]: Starting The Apache HTTP Server... Dec 02 11:08:57 ubuntu apachectl[4557]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.178.24. Set the 'ServerNa Dec 02 11:08:57 ubuntu apachectl[4557]: Action 'start' failed. Dec 02 11:08:57 ubuntu apachectl[4557]: The Apache error log may have more information. Dec 02 11:08:57 ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1 Dec 02 11:08:57 ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'. Dec 02 11:08:57 ubuntu systemd[1]: Failed to start The Apache HTTP Server. And below is the result for journalctl -xe -- -- Unit motd-news.service has begun starting up. Dec 02 13:56:00 ubuntu 50-motd-news[5122]: * Overheard at KubeCon: "microk8s.status just blew my mind". Dec 02 13:56:00 ubuntu 50-motd-news[5122]: https://microk8s.io/docs/commands#microk8s.status Dec 02 13:56:00 ubuntu systemd[1]: Started Message of the Day. -- Subject: Unit motd-news.service has finished start-up -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- Unit motd-news.service has finished starting up. -- -- The start-up result is RESULT. Dec 02 14:09:02 ubuntu CRON[5169]: pam_unix(cron:session): session opened for user root by (uid=0) Dec 02 14:09:02 ubuntu CRON[5170]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi) Dec 02 14:09:02 ubuntu CRON[5169]: pam_unix(cron:session): session closed for user root Dec 02 14:09:44 ubuntu systemd[1]: Starting Clean php session files... -- Subject: Unit phpsessionclean.service has begun start-up -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- Unit phpsessionclean.service has begun starting up. Dec 02 14:09:44 ubuntu sessionclean[5171]: PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib/php/20170718/mysqli (/usr/lib/php/2017071 Dec 02 14:09:44 ubuntu systemd[1]: Started Clean php session files. -- Subject: Unit phpsessionclean.service has finished start-up -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- Unit phpsessionclean.service has finished starting up. -- -- The start-up result is RESULT. Dec 02 14:17:01 ubuntu CRON[5220]: pam_unix(cron:session): session opened for user root by (uid=0) Dec 02 14:17:01 ubuntu CRON[5221]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Dec 02 14:17:01 ubuntu CRON[5220]: pam_unix(cron:session): session closed for user root Dec 02 14:18:00 ubuntu systemd-timesyncd[1097]: Network configuration changed, trying to establish connection. Dec 02 14:18:00 ubuntu systemd-timesyncd[1097]: Synchronized to time server 91.189.89.198:123 (ntp.ubuntu.com). Dec 02 14:39:01 ubuntu CRON[5241]: pam_unix(cron:session): session opened for user root by (uid=0) Dec 02 14:39:01 ubuntu CRON[5242]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi) Dec 02 14:39:01 ubuntu CRON[5241]: pam_unix(cron:session): session closed for user root Dec 02 14:39:44 ubuntu systemd[1]: Starting Clean php session files... -- Subject: Unit phpsessionclean.service has begun start-up -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- Unit phpsessionclean.service has begun starting up. Dec 02 14:39:44 ubuntu sessionclean[5244]: PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib/php/20170718/mysqli (/usr/lib/php/2017071 Dec 02 14:39:44 ubuntu systemd[1]: Started Clean php session files. -- Subject: Unit phpsessionclean.service has finished start-up -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- Unit phpsessionclean.service has finished starting up. -- -- The start-up result is RESULT. Dec 02 14:47:59 ubuntu systemd-timesyncd[1097]: Network configuration changed, trying to establish connection. Dec 02 14:47:59 ubuntu systemd-timesyncd[1097]: Synchronized to time server 91.189.89.198:123 (ntp.ubuntu.com).
After a lot of searching I found out that it was due to my key being corrupt. I was able to determine this by checking the apache error log: sudo nano /var/log/apache2/error.log [Mon Dec 02 11:08:57.784521 2019] [ssl:error] [pid 4560] AH02579: Init: Private key not found [Mon Dec 02 11:08:57.784840 2019] [ssl:error] [pid 4560] SSL Library Error: error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag [Mon Dec 02 11:08:57.784922 2019] [ssl:error] [pid 4560] SSL Library Error: error:0D08303A:asn1 encoding routines:asn1_template_noexp_d2i:nested asn1 error [Mon Dec 02 11:08:57.784990 2019] [ssl:error] [pid 4560] SSL Library Error: error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag [Mon Dec 02 11:08:57.785061 2019] [ssl:error] [pid 4560] SSL Library Error: error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error (Type=RSAPrivat$ [Mon Dec 02 11:08:57.785135 2019] [ssl:error] [pid 4560] SSL Library Error: error:04093004:rsa routines:old_rsa_priv_decode:RSA lib [Mon Dec 02 11:08:57.785200 2019] [ssl:error] [pid 4560] SSL Library Error: error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag [Mon Dec 02 11:08:57.785269 2019] [ssl:error] [pid 4560] SSL Library Error: error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error (Type=PKCS8_PRI$ [Mon Dec 02 11:08:57.785434 2019] [ssl:emerg] [pid 4560] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information [Mon Dec 02 11:08:57.785469 2019] [ssl:emerg] [pid 4560] AH02564: Failed to configure encrypted (?) private key MyWebSite.com:443:0, check /etc/apache2/ssl/MyWebSite$ AH00016: Configuration Failed As displayed, "Private key not found" was not referring to the path of the key, but rather the key being corrupt. I checked this by opening the key with: sudo nano MyWebSite.key If the key is correct, it will have the text ----- BEGIN PRIVATE KEY ----- at the top of the key. The solution was then to regenerate the certificate request, have the certificate re-issued and install the new certificate. I hope this helps you if you're in the same situation as I was.
Why does local user login to vsftpd not work?
I want to install vsftpd on ubuntu 14.04 server and access the files through an apache httpd. Following this guide thats my vsftpd.conf: # Example config file /etc/vsftpd.conf # # The default compiled in settings are fairly paranoid. This sample file # loosens things up a bit, to make the ftp daemon more usable. # Please see vsftpd.conf.5 for all compiled in defaults. # # READ THIS: This example file is NOT an exhaustive list of vsftpd options. # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's # capabilities. # # # Run standalone? vsftpd can run either from an inetd or as a standalone # daemon started from an initscript. listen=YES # # Run standalone with IPv6? # Like the listen parameter, except vsftpd will listen on an IPv6 socket # instead of an IPv4 one. This parameter and the listen parameter are mutually # exclusive. #listen_ipv6=YES # # Allow anonymous FTP? (Disabled by default) anonymous_enable=YES # # Uncomment this to allow local users to log in. local_enable=YES # # Uncomment this to enable any form of FTP write command. write_enable=YES # # Default umask for local users is 077. You may wish to change this to 022, # if your users expect that (022 is used by most other ftpd's) #local_umask=022 # # Uncomment this to allow the anonymous FTP user to upload files. This only # has an effect if the above global write enable is activated. Also, you will # obviously need to create a directory writable by the FTP user. #anon_upload_enable=YES # # Uncomment this if you want the anonymous FTP user to be able to create # new directories. #anon_mkdir_write_enable=YES # # Activate directory messages - messages given to remote users when they # go into a certain directory. dirmessage_enable=YES # # If enabled, vsftpd will display directory listings with the time # in your local time zone. The default is to display GMT. The # times returned by the MDTM FTP command are also affected by this # option. use_localtime=YES # # Activate logging of uploads/downloads. xferlog_enable=YES # # Make sure PORT transfer connections originate from port 20 (ftp-data). connect_from_port_20=YES # # If you want, you can arrange for uploaded anonymous files to be owned by # a different user. Note! Using "root" for uploaded files is not # recommended! #chown_uploads=YES #chown_username=whoever # # You may override where the log file goes if you like. The default is shown # below. xferlog_file=/var/log/vsftpd.log # # If you want, you can have your log file in standard ftpd xferlog format. # Note that the default log file location is /var/log/xferlog in this case. #xferlog_std_format=YES # # You may change the default value for timing out an idle session. #idle_session_timeout=600 # # You may change the default value for timing out a data connection. #data_connection_timeout=120 # # It is recommended that you define on your system a unique user which the # ftp server can use as a totally isolated and unprivileged user. #nopriv_user=ftpsecure # # Enable this and the server will recognise asynchronous ABOR requests. Not # recommended for security (the code is non-trivial). Not enabling it, # however, may confuse older FTP clients. #async_abor_enable=YES # # By default the server will pretend to allow ASCII mode but in fact ignore # the request. Turn on the below options to have the server actually do ASCII # mangling on files when in ASCII mode. # Beware that on some FTP servers, ASCII support allows a denial of service # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd # predicted this attack and has always been safe, reporting the size of the # raw file. # ASCII mangling is a horrible feature of the protocol. #ascii_upload_enable=YES #ascii_download_enable=YES # # You may fully customise the login banner string: #ftpd_banner=Welcome to blah FTP service. # # You may specify a file of disallowed anonymous e-mail addresses. Apparently # useful for combatting certain DoS attacks. #deny_email_enable=YES # (default follows) #banned_email_file=/etc/vsftpd.banned_emails # # You may restrict local users to their home directories. See the FAQ for # the possible risks in this before using chroot_local_user or # chroot_list_enable below. chroot_local_user=YES # # You may specify an explicit list of local users to chroot() to their home # directory. If chroot_local_user is YES, then this list becomes a list of # users to NOT chroot(). # (Warning! chroot'ing can be very dangerous. If using chroot, make sure that # the user does not have write access to the top level directory within the # chroot) chroot_local_user=YES #chroot_list_enable=YES # (default follows) #chroot_list_file=/etc/vsftpd.chroot_list # # You may activate the "-R" option to the builtin ls. This is disabled by # default to avoid remote users being able to cause excessive I/O on large # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume # the presence of the "-R" option, so there is a strong case for enabling it. #ls_recurse_enable=YES # # Customization # # Some of vsftpd's settings don't fit the filesystem layout by # default. # # This option should be the name of a directory which is empty. Also, the # directory should not be writable by the ftp user. This directory is used # as a secure chroot() jail at times vsftpd does not require filesystem # access. secure_chroot_dir=/var/run/vsftpd/empty # # This string is the name of the PAM service vsftpd will use. pam_service_name=vsftpd # # This option specifies the location of the RSA certificate to use for SSL # encrypted connections. rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem # This option specifies the location of the RSA key to use for SSL # encrypted connections. rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key userlist_deny=NO userlist_enable=YES userlist_file=/etc/vsftpd.user_list vsftpd.user_list contains the newly created user ftpuser. Anonymous login works if I comment the three userlist configs on the bottom of the config (because no anonymous user in vsftpd.user_list) but logging in as ftpuser doesn't work: FTP Error 530 invalid login I cant find any issue and found exactly this config 100 times on the internet, every working well. I also tried to reinstall vsftpd + apache from scratch, did not help. Added vsftpd logfile: Thu Aug 27 17:56:27 2015 [pid 15875] CONNECT: Client "95.223.27.113" Thu Aug 27 17:56:27 2015 [pid 15875] FTP response: Client "95.223.27.113", "220 (vsFTPd 3.0.2)" Thu Aug 27 17:56:27 2015 [pid 15875] FTP command: Client "95.223.27.113", "AUTH TLS" Thu Aug 27 17:56:27 2015 [pid 15875] FTP response: Client "95.223.27.113", "530 Please login with USER and PASS." Thu Aug 27 17:56:27 2015 [pid 15875] FTP command: Client "95.223.27.113", "AUTH SSL" Thu Aug 27 17:56:27 2015 [pid 15875] FTP response: Client "95.223.27.113", "530 Please login with USER and PASS." Thu Aug 27 17:56:28 2015 [pid 15875] FTP command: Client "95.223.27.113", "USER ftpuser" Thu Aug 27 17:56:28 2015 [pid 15875] [ftpuser] FTP response: Client "95.223.27.113", "331 Please specify the password." Thu Aug 27 17:56:28 2015 [pid 15875] [ftpuser] FTP command: Client "95.223.27.113", "PASS <password>" Thu Aug 27 17:56:30 2015 [pid 15874] [ftpuser] FAIL LOGIN: Client "95.223.27.113" Thu Aug 27 17:56:31 2015 [pid 15875] [ftpuser] FTP response: Client "95.223.27.113", "530 Login incorrect."
In my case, I had the same error (530) because my ftp user was assigned a /usr/sbin/nologin shell, but that shell was not added in /etc/shells. It is usually recommended to assign a "non-shell" to the ftp users who need ftp-only access, via usermod -s /usr/sbin/nologin ftpuser
X509 parsing error, 'negative serial number' while pulling repository
Our server access internet through a proxy. When I try to run a pull command such as sudo docker run -t -i ubuntu:14.04 /bin/bash I get the below error: Get https://index.docker.io/v1/repositories/ubuntu/images: tls: failed to parse certificate from server: x509: negative serial number The wget command wget -S -d -O - https://get.docker.io yields the below output: Setting --output-document (outputdocument) to - DEBUG output created by Wget 1.13.4 on linux-gnu. URI encoding = UTF-8' URI encoding =UTF-8' --2014-08-27 17:13:46-- https://get.docker.io/ Connecting to :... connected. Created socket 3. Releasing 0x00000000016829f0 (new refcount 0). Deleting unused 0x00000000016829f0. ---request begin--- CONNECT get.docker.io:443 HTTP/1.1 User-Agent: Wget/1.13.4 (linux-gnu) Proxy-Authorization: Basic Y3RzXDMxMzMwMDpzd2VldGZlbC4yOQ== ---request end--- proxy responded with: [HTTP/1.1 200 Connection established Date: Wed, 27 Aug 2014 11:49:52 GMT Age: 0 Via: 1.0 xaahshshhds ] Initiating SSL handshake. Handshake successful; connected socket 3 to SSL handle 0x00000000016831c0 certificate: subject: /emailAddress=aaa#bbbb.com/C=yy/ST=aa/L=xx/O=yy/OU=mycompany/CN=get.docker.io issuer: /emailAddress=aaa#bbbb.com/C=yy/ST=aa/L=xx/O=yy/OU=mycompany/CN=mycompany ERROR: cannot verify get.docker.io's certificate, issued by /emailAddress=aaa#bbbb.com/C=yy/ST=aa/L=xx/O=yy/OU=mycompany/CN=mycompany': Unable to locally verify the issuer's authority. To connect to get.docker.io insecurely, use--no-check-certificate'. Closed 3/SSL 0x00000000016831c0 Please give me some directions on how I should go about this issue. EDIT: I ve now disabled the proxy for this IP segment but I still get the same error. The command: wget -S -d -O - https://get.docker.io gets the below output now: Setting --output-document (outputdocument) to - DEBUG output created by Wget 1.13.4 on linux-gnu. URI encoding = `UTF-8' --2014-09-04 11:26:12-- https://get.docker.io/ Resolving get.docker.io (get.docker.io)... 162.242.195.77 Caching get.docker.io => 162.242.195.77 Connecting to get.docker.io (get.docker.io)|162.242.195.77|:443... connected. Created socket 3. Releasing 0x00000000022d8fd0 (new refcount 1). Initiating SSL handshake. Handshake successful; connected socket 3 to SSL handle 0x00000000022dabd0 certificate: subject: /serialNumber=exkd9EjUozUulWIyUDurQPMEPBLSc2Bq/OU=GT98568428/OU=See www.rapidssl.com/resources/cps (c)13/OU=Domain Control Validated - RapidSSL(R)/CN=*.docker.io issuer: /C=US/O=GeoTrust, Inc./CN=RapidSSL CA X509 certificate successfully verified and matches host get.docker.io ---request begin--- GET / HTTP/1.1 User-Agent: Wget/1.13.4 (linux-gnu) Accept: */* Host: get.docker.io Connection: Keep-Alive ---request end--- HTTP request sent, awaiting response... ---response begin--- HTTP/1.1 503 Service Unavailable Server: nginx/1.7.1 Date: Thu, 04 Sep 2014 06:03:28 GMT Content-Type: text/html Transfer-Encoding: chunked Connection: keep-alive Cache-Control: no-cache ---response end--- HTTP/1.1 503 Service Unavailable Server: nginx/1.7.1 Date: Thu, 04 Sep 2014 06:03:28 GMT Content-Type: text/html Transfer-Encoding: chunked Connection: keep-alive Cache-Control: no-cache Registered socket 3 for persistent reuse. Skipping 108 bytes of body: [<html><body><h1>503 Service Unavailable</h1> No server is available to handle this request. </body></html> ] done. 2014-09-04 11:26:13 ERROR 503: Service Unavailable.
subject: /emailAddress=aaa#bbbb.com/C=yy/ST=aa/L=xx/O=yy/OU=mycompany/CN=get.docker.io issuer: /emailAddress=aaa#bbbb.com/C=yy/ST=aa/L=xx/O=yy/OU=mycompany/CN=mycompany It looks like the proxy in your company uses SSL interception to inspect SSL traffic, which means that you get a certificate signed by the proxy CA of your company instead of the original certificate. It also looks like that this proxy CA is not trusted by your system and thus the verification fails. I would recommend that you contact your firewall administrator on how to deal with the problem. Either they will add an exception for the SSL inspection, or they will tell you which certificate you need to import as trusted in your system.
This should be fixed for any Docker compiled with Go 1.6+, see: https://github.com/golang/go/commit/a0ea93dea5f5741addc8c96b7ed037d0e359e33f.