woocommerce_email_attachments not working? - wordpress

I'm using WP 4.9.9 + WC 3.5.1.
I try to attach image file to email. This is email send after created order.
In order present field named ac_order_customer_image (created with ACF plugin).
In my function.php file present such code:
add_filter( 'woocommerce_email_attachments', 'woocommerce_emails_attach_ac_order_customer_image', 10, 3);
function woocommerce_emails_attach_ac_order_customer_image($attachments, $status, $order) {
error_log('woocommerce_emails_attach_ac_order_customer_image START');
if ( ! is_object( $order ) || ! isset( $status ) ) {
return $attachments;
}
error_log('woocommerce_emails_attach_ac_order_customer_image ORDER and STATUS setted');
if ( empty( $order ) ) {
return $attachments;
}
error_log('woocommerce_emails_attach_ac_order_customer_image ORDER not empty');
$image = get_field('ac_order_customer_image', $order->ID);
error_log('woocommerce_emails_attach_ac_order_customer_image IMAGE: ' . serialize($image));
if ( ! $image ) {
return $attachments;
}
error_log('woocommerce_emails_attach_ac_order_customer_image IMAGE is setted ');
if (is_array($image)){
error_log('woocommerce_emails_attach_ac_order_customer_image IMAGE is ARRAY. Add URL from ARRAY ');
$attachments[] = $image['url'];
}
if (is_int($image)){
error_log('woocommerce_emails_attach_ac_order_customer_image IMAGE is INT. Get URL and ADD ');
$url = wp_get_attachment_image_src($image);
if (is_array($url)){
error_log('woocommerce_emails_attach_ac_order_customer_image IMAGE(ret arr): ' . serialize($url[0]));
$attachments[] = $url[0];
}
if (is_string($url)){
error_log('woocommerce_emails_attach_ac_order_customer_image IMAGE: ' . $url);
$attachments[] = $url;
}
}
if (is_string($image)){
error_log('woocommerce_emails_attach_ac_order_customer_image IMAGE is STRING. Add URL string ');
$attachments[] = $image;
}
error_log('woocommerce_emails_attach_ac_order_customer_image FINISH ');
return $attachments;
}
I receive email but without attachment. What am I do wrong?
PS: error_log:
[Thu Jan 03 20:27:08 2019] [warn] [client 95.31.12.33] mod_fcgid: stderr: woocommerce_emails_attach_ac_order_customer_image START, referer: http://example.com/checkout/
[Thu Jan 03 20:27:08 2019] [warn] [client 95.31.12.33] mod_fcgid: stderr: woocommerce_emails_attach_ac_order_customer_image ORDER and STATUS setted, referer: http://example.com/checkout/
[Thu Jan 03 20:27:08 2019] [warn] [client 95.31.12.33] mod_fcgid: stderr: woocommerce_emails_attach_ac_order_customer_image ORDER not empty, referer: http://example.com/checkout/
[Thu Jan 03 20:27:08 2019] [warn] [client 95.31.12.33] mod_fcgid: stderr: ID was called incorrectly. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action('wc_ajax_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_Gateway_BACS->process_payment, WC_Order->update_status, WC_Order->save, WC_Order->status_transition, do_action('woocommerce_order_status_pending_to_on-hold'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Emails::send_transactional_email, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Email_Customer_On_Hold_Order->trigger, WC_Email->get_attachments, apply_filters('woocommerce_email_attachments'), WP_Hook->apply_filters, call_user_func_array, woocommerce_emails_attach_ac_order_customer_image, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0., referer: http://example.com/checkout/
[Thu Jan 03 20:27:08 2019] [warn] [client 95.31.12.33] mod_fcgid: stderr: woocommerce_emails_attach_ac_order_customer_image IMAGE: i:511;, referer: http://example.com/checkout/
[Thu Jan 03 20:27:08 2019] [warn] [client 95.31.12.33] mod_fcgid: stderr: woocommerce_emails_attach_ac_order_customer_image IMAGE is setted , referer: http://example.com/checkout/
[Thu Jan 03 20:27:08 2019] [warn] [client 95.31.12.33] mod_fcgid: stderr: woocommerce_emails_attach_ac_order_customer_image IMAGE is INT. Get URL and ADD , referer: http://example.com/checkout/
[Thu Jan 03 20:27:08 2019] [warn] [client 95.31.12.33] mod_fcgid: stderr: woocommerce_emails_attach_ac_order_customer_image IMAGE(ret arr): s:134:"http://example.com/wp-content/uploads/2019/01/24774eede17915054f42f2dbd16bee28_client_upload_file_2019_01_03_17_01_05-1-150x150.jpeg";, referer: http://example.com/checkout/
[Thu Jan 03 20:27:08 2019] [warn] [client 95.31.12.33] mod_fcgid: stderr: woocommerce_emails_attach_ac_order_customer_image FINISH , referer: http://example.com/checkout/

Related

I am getting lsapi:error and it is causing 503 error

The following error is being triggered:
[Wed Oct 19 00:46:51.328670 2022] [lsapi:error] [pid 8996:tid 47089191048960] [client 193.111.60.5:0] [host] Error receiving response header (lsphp is killed?): ReceiveResponseHeader: receive pkg hdr failed: ReceivePkgHdr: nothing to read from backend (LVE ID 1001), check http://docs.cloudlinux.com/mod_lsapi_troubleshooting.html
I added memory limit 4095M which solve this error

CORS on flask - uwsgi - nginx stack

I am running a flask app behind nginx/uwsgi. I am facing CORS issues when uploading files btw the upload limit in nginx is set to 30M and the same is uwsgi and I'm only uploading 2M of files, and I allowed all CORS origins. I've tried everything but to no avail, the request succeeds when I run it directly from an interactive python session.
I have an endpoint /result
#app.route('/result', methods = ['GET', 'POST'])
#token_required
def result(user : User):
if request.method == "GET":
d = request.args
# do stuff
return jsonify({'success': False, 'msg': 'Unable to fullfill request' }), 201
else:
# do stuff
return jsonify({'success' : False, 'msg': 'Missing Fields'}), 201
here are the uwsgi logs
[pid: 8615|app: 0|req: 1/1] xxx.xx.xxx.xxx () {52 vars in 820 bytes} [Fri Apr 22 18:33:08 2022] OPTIONS /jwt => generated 0 bytes in 4 msecs (HTTP/2.0 200) 8 headers in 340 bytes (1 switches on core 0)
[pid: 8615|app: 0|req: 2/2] xxx.xx.xxx.xxx () {52 vars in 840 bytes} [Fri Apr 22 18:33:08 2022] OPTIONS /notifications => generated 0 bytes in 0 msecs (HTTP/2.0 200) 8 headers in 340 bytes (1 switches on core 0)
[pid: 8614|app: 0|req: 1/3] xxx.xx.xxx.xxx () {52 vars in 826 bytes} [Fri Apr 22 18:33:08 2022] OPTIONS /result => generated 0 bytes in 4 msecs (HTTP/2.0 200) 8 headers in 346 bytes (1 switches on core 0)
[pid: 8615|app: 0|req: 3/4] xxx.xx.xxx.xxx () {52 vars in 820 bytes} [Fri Apr 22 18:33:08 2022] OPTIONS /jwt => generated 0 bytes in 1 msecs (HTTP/2.0 200) 8 headers in 340 bytes (1 switches on core 0)
[pid: 8615|app: 0|req: 4/5] xxx.xx.xxx.xxx () {52 vars in 840 bytes} [Fri Apr 22 18:33:08 2022] OPTIONS /notifications => generated 0 bytes in 0 msecs (HTTP/2.0 200) 8 headers in 340 bytes (1 switches on core 0)
[pid: 8617|app: 0|req: 1/6] xxx.xx.xxx.xxx () {52 vars in 945 bytes} [Fri Apr 22 18:33:08 2022] GET /jwt => generated 22 bytes in 14 msecs (HTTP/2.0 201) 5 headers in 190 bytes (1 switches on core 0)
[pid: 8615|app: 0|req: 5/7] xxx.xx.xxx.xxx () {52 vars in 951 bytes} [Fri Apr 22 18:33:08 2022] GET /result => generated 274 bytes in 14 msecs (HTTP/2.0 201) 5 headers in 191 bytes (1 switches on core 0)
[pid: 8613|app: 0|req: 1/8] xxx.xx.xxx.xxx () {52 vars in 965 bytes} [Fri Apr 22 18:33:08 2022] GET /notifications => generated 19973 bytes in 25 msecs (HTTP/2.0 201) 5 headers in 193 bytes (2 switches on core 0)
[pid: 8614|app: 0|req: 2/9] xxx.xx.xxx.xxx () {52 vars in 945 bytes} [Fri Apr 22 18:33:08 2022] GET /jwt => generated 22 bytes in 7 msecs (HTTP/2.0 201) 5 headers in 190 bytes (1 switches on core 0)
[pid: 8614|app: 0|req: 3/10] xxx.xx.xxx.xxx () {52 vars in 965 bytes} [Fri Apr 22 18:33:08 2022] GET /notifications => generated 19973 bytes in 10 msecs (HTTP/2.0 201) 5 headers in 193 bytes (1 switches on core 0)
[pid: 8614|app: 0|req: 4/11] xxx.xx.xxx.xxx () {52 vars in 827 bytes} [Fri Apr 22 18:33:18 2022] OPTIONS /result => generated 0 bytes in 1 msecs (HTTP/2.0 200) 8 headers in 346 bytes (0 switches on core 0)
Chrome OPTIONS response
access-control-allow-headers: authorization
access-control-allow-methods: DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT
access-control-allow-origin: https://example.com
access-control-expose-headers: Content-Disposition
allow: OPTIONS, HEAD, POST, GET
content-length: 0
content-type: text/html; charset=utf-8
date: Fri, 22 Apr 2022 18:33:18 GMT
server: nginx/1.20.0
vary: Origin
Chrome Console error
Access to XMLHttpRequest at 'https://api.example.com/result' from origin 'https://example.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
the error is quite funny because the OPTIONS response has the 'Access-Control-Allow-Origin' header.
When I was setting up uwsgi I had to change nginx's user group. when I check the nginx error logs at /var/log/nginx/error.log I noticed that there was a permissions issue.
I solved this by changing the user group of
sudo chgrp www-data /var/lib/nginx/tmp/ /var/lib/nginx/ /var/lib/nginx/tmp/client_body/
Still can't explain why plain python requests query from my pc was not causing the same issue.
PS
Whenever nginx will face an error and returns a response to the browser you will see the cors thing in the console logs. so always take that with a grain of salt especially if you already set the cors headers from flask side correctly.

Wordpress: When I click in search results, it gives 404

And thanks for your help!
I'm using Wordpress, with WPSearch plugin + elementor custom search page, the problem is:
When the results are displayed, it works flawlessly, but the URl from the title is wrong, and when you click on the the text you get redirected to the main page (I activated 404 errors to be redirected to mainpage). I can't find where to edit those links in search, anyone has any idea?
In cpanel "errors" I can see these:
[Fri Aug 20 19:21:12.443992 2021] [:error] [pid 580957:tid 23099625621248] [client XXX:15408] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/wp-cron.php?doing_wp_cron=1629505272.3485751152038574218750
[Fri Aug 20 19:20:53.445562 2021] [:error] [pid 580956:tid 23099634026240] [client XXX:15364] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/wp-cron.php?doing_wp_cron=1629505253.3393890857696533203125
[Fri Aug 20 19:20:27.565196 2021] [:error] [pid 580957:tid 23099755898624] [client XXX:5056] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7
[Fri Aug 20 19:20:02.575672 2021] [:error] [pid 580956:tid 23099600406272] [client XXX:15268] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/wp-cron.php?doing_wp_cron=1629505202.4825611114501953125000
[Fri Aug 20 19:18:52.393628 2021] [:error] [pid 580957:tid 23099585697536] [client XXX:15122] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/wp-cron.php?doing_wp_cron=1629505132.2978270053863525390625
[Fri Aug 20 19:18:05.437396 2021] [:error] [pid 580956:tid 23099568887552] [client XXX:15056] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/wp-cron.php?doing_wp_cron=1629505085.3480589389801025390625
[Fri Aug 20 19:17:09.918235 2021] [:error] [pid 580957:tid 23099755898624] [client XXX:12736] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7
[Fri Aug 20 19:17:06.951470 2021] [:error] [pid 580956:tid 23099720177408] [client XXX:17024] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7
[Fri Aug 20 19:16:55.437002 2021] [:error] [pid 580954:tid 23099638228736] [client XXX:14866] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/wp-cron.php?doing_wp_cron=1629505015.3463969230651855468750
[Fri Aug 20 19:16:41.682702 2021] [:error] [pid 580957:tid 23099688658688] [client XXX:1038] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/search/condolencias
[Fri Aug 20 19:16:39.020203 2021] [:error] [pid 580958:tid 23099730683648] [client XXX:30395] PHP: syntax error, unexpected '(' in XXXpublic_html/php.ini on line 7, referer: XXX/search/condolencias
Any ideas?
Thank you!

JFrog Artifactory fails to connect to PostgreSQL database

I followed the following guides on installing JFrog Artifactory OSS using RPM/Yum and using an external PostgreSQL database.
https://www.jfrog.com/confluence/display/JFROG/Installing+Artifactory
https://www.jfrog.com/confluence/display/RTF6X/PostgreSQL
SELinux is disabled and jfrog-artifactory-oss is installed from the JFrog repository [https://jfrog.bintray.com/artifactory-rpms].
Check the service:
[root#jfrog ~]# systemctl status artifactory -l
● artifactory.service - Artifactory service
Loaded: loaded (/usr/lib/systemd/system/artifactory.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2020-08-08 01:56:50 +08; 11min ago
Process: 9714 ExecStop=/opt/jfrog/artifactory/app/bin/artifactoryManage.sh stop (code=exited, status=0/SUCCESS)
Process: 10268 ExecStart=/opt/jfrog/artifactory/app/bin/artifactoryManage.sh start (code=exited, status=0/SUCCESS)
Main PID: 12388 (java)
CGroup: /system.slice/artifactory.service
‣ 12388 /opt/jfrog/artifactory/app/third-party/java/bin/java -Djava.util.logging.config.file=/opt/jfrog/artifactory/app/artifactory/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -server -Xss256k -XX:+UseG1GC -XX:OnOutOfMemoryError=kill -9 %p --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED -Dfile.encoding=UTF8 -Djruby.compile.invokedynamic=false -Djruby.bytecode.version=1.8 -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Djava.security.egd=file:/dev/./urandom -Dartdist=rpm -Djf.product.home=/opt/jfrog/artifactory -Xms512m -Xmx3g -Djruby.bytecode.version=1.8 -Dartifactory.metadata.native.ui=true -Dignore.endorsed.dirs= -classpath /opt/jfrog/artifactory/app/artifactory/tomcat/bin/bootstrap.jar:/opt/jfrog/artifactory/app/artifactory/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/opt/jfrog/artifactory/app/artifactory/tomcat -Dcatalina.home=/opt/jfrog/artifactory/app/artifactory/tomcat -Djava.io.tmpdir=/opt/jfrog/artifactory/var/work/artifactory/tomcat/temp org.apache.catalina.startup.Bootstrap start
Aug 08 01:56:50 jfrog artifactoryManage.sh[10268]: 2020-08-07T17:56:50.027Z [shell] [INFO ] [] [systemYamlHelper.sh:462 ] [main] - Resolved shared.logging.consoleLog.enabled (true) from /opt/jfrog/artifactory/var/etc/system.yaml
Aug 08 01:56:50 jfrog artifactoryManage.sh[10268]: JF_METADATA_ACCESSCLIENT_URL: http://localhost:8081/access
Aug 08 01:56:50 jfrog artifactoryManage.sh[10268]: metadata started. PID: 12988
Aug 08 01:56:50 jfrog su[13048]: (to artifactory) root on none
Aug 08 01:56:50 jfrog artifactoryManage.sh[10268]: Starting frontend...
Aug 08 01:56:50 jfrog artifactoryManage.sh[10268]: frontend not running. Proceed to start it up.
Aug 08 01:56:50 jfrog artifactoryManage.sh[10268]: 2020-08-07T17:56:50.317Z [shell] [INFO ] [] [systemYamlHelper.sh:462 ] [main] - Resolved shared.logging.consoleLog.enabled (true) from /opt/jfrog/artifactory/var/etc/system.yaml
Aug 08 01:56:50 jfrog artifactoryManage.sh[10268]: frontend started. PID: 13147
Aug 08 01:56:50 jfrog systemd[1]: Started Artifactory service.
Aug 08 01:56:51 jfrog artifactoryManage.sh[10268]: 2020-08-07T17:56:51.003Z [shell] [INFO ] [] [systemYamlHelper.sh:462 ] [main] - Resolved shared.logging.consoleLog.enabled (true) from /opt/jfrog/artifactory/var/etc/system.yaml
[root#jfrog ~]#
Test:
[root#jfrog ~]# curl -I http://localhost:8082/ui/
HTTP/1.1 503 Service Unavailable
Date: Fri, 07 Aug 2020 18:08:50 GMT
Content-Length: 19
Content-Type: text/plain; charset=utf-8
[root#jfrog ~]#
/opt/jfrog/artifactory/var/log/console.log shows the following errors:
[DEBUG] Resolved system configuration file path: /opt/jfrog/artifactory/var/etc/system.yaml
No ssl parameter found, falling back to sslmode=disable
2020-08-07T17:56:50.179Z [jfmd ] [INFO ] [1462831a45a25233] [database_bearer.go:84 ] [main ] - Connecting to (db config: {postgresql user='jfroguser' password='***' dbname=jfrogdb host=dbserver.example.com port= sslmode=disable}) [database]
2020-08-07T17:56:50.216Z [jfmd ] [ERROR] [1462831a45a25233] [database_bearer.go:68 ] [main ] - Could not initialize database (db config: {postgresql user='jfroguser' password='***' dbname=jfrogdb host=dbserver.example.com port= sslmode=disable}): error connecting to database
jfrog.com/metadata/services/common/db.(*databaseBearer).init
/src/jfrog.com/metadata/services/common/db/database_bearer.go:114
jfrog.com/metadata/services/common/db.NewDatabaseBearer
/src/jfrog.com/metadata/services/common/db/database_bearer.go:66
main.main
/src/jfrog.com/metadata/metadata.go:38
runtime.main
/src/runtime/proc.go:203
runtime.goexit
/src/runtime/asm_amd64.s:1373
goroutine 1 [running]:
runtime/debug.Stack(0x38, 0xc00015c040, 0xc00032c080)
/src/runtime/debug/stack.go:24 +0x9d
jfrog.com/jfrog-go-commons/pkg/log.(*standardLogger).Panicfc(0xc00043bda0, 0x166e420, 0xc000142750, 0x13eb133, 0x32, 0xc00032c080, 0x2, 0x2)
/src/jfrog.com/go-commons/pkg/log/standard_logger.go:42 +0x6a
jfrog.com/metadata/services/common/db.NewDatabaseBearer(0x166e420, 0xc000142750, 0x166f220, 0xc00007f770, 0x1673460, 0xc0000c97c0, 0x1666260, 0xc000011098, 0x16489c0, 0xc00043bd70, ...)
/src/jfrog.com/metadata/services/common/db/database_bearer.go:68 +0x2d4
main.main()
/src/jfrog.com/metadata/metadata.go:38 +0x5b7
[database]
panic: Could not initialize database (db config: {postgresql user='jfroguser' password='***' dbname=jfrogdb host=dbserver.example.com port= sslmode=disable}): error connecting to database
jfrog.com/metadata/services/common/db.(*databaseBearer).init
/src/jfrog.com/metadata/services/common/db/database_bearer.go:114
jfrog.com/metadata/services/common/db.NewDatabaseBearer
/src/jfrog.com/metadata/services/common/db/database_bearer.go:66
main.main
/src/jfrog.com/metadata/metadata.go:38
runtime.main
/src/runtime/proc.go:203
runtime.goexit
/src/runtime/asm_amd64.s:1373
goroutine 1 [running]:
runtime/debug.Stack(0x38, 0xc00015c040, 0xc00032c080)
/src/runtime/debug/stack.go:24 +0x9d
jfrog.com/jfrog-go-commons/pkg/log.(*standardLogger).Panicfc(0xc00043bda0, 0x166e420, 0xc000142750, 0x13eb133, 0x32, 0xc00032c080, 0x2, 0x2)
/src/jfrog.com/go-commons/pkg/log/standard_logger.go:42 +0x6a
jfrog.com/metadata/services/common/db.NewDatabaseBearer(0x166e420, 0xc000142750, 0x166f220, 0xc00007f770, 0x1673460, 0xc0000c97c0, 0x1666260, 0xc000011098, 0x16489c0, 0xc00043bd70, ...)
/src/jfrog.com/metadata/services/common/db/database_bearer.go:68 +0x2d4
main.main()
/src/jfrog.com/metadata/metadata.go:38 +0x5b7
goroutine 1 [running]:
github.com/rs/zerolog.(*Logger).Panic.func1(0xc000358500, 0x4bb)
/pkg/mod/github.com/rs/zerolog#v1.18.0/log.go:338 +0x4f
github.com/rs/zerolog.(*Event).msg(0xc0000be240, 0xc000358500, 0x4bb)
/pkg/mod/github.com/rs/zerolog#v1.18.0/event.go:146 +0x200
github.com/rs/zerolog.(*Event).Msgf(0xc0000be240, 0xc000961dc0, 0x35, 0xc00015c0c0, 0x3, 0x4)
/pkg/mod/github.com/rs/zerolog#v1.18.0/event.go:126 +0x83
jfrog.com/jfrog-go-commons/pkg/log.(*standardLogger).logMessage(0xc00043bda0, 0x166e420, 0xc000142750, 0xc0000be240, 0xc000961dc0, 0x35, 0xc00015c0c0, 0x3, 0x4)
/src/jfrog.com/go-commons/pkg/log/standard_logger.go:61 +0x197
jfrog.com/jfrog-go-commons/pkg/log.(*standardLogger).Panicfc(0xc00043bda0, 0x166e420, 0xc000142750, 0x13eb133, 0x32, 0xc00015c0c0, 0x3, 0x4)
/src/jfrog.com/go-commons/pkg/log/standard_logger.go:43 +0x1df
jfrog.com/metadata/services/common/db.NewDatabaseBearer(0x166e420, 0xc000142750, 0x166f220, 0xc00007f770, 0x1673460, 0xc0000c97c0, 0x1666260, 0xc000011098, 0x16489c0, 0xc00043bd70, ...)
/src/jfrog.com/metadata/services/common/db/database_bearer.go:68 +0x2d4
main.main()
/src/jfrog.com/metadata/metadata.go:38 +0x5b7
Any ideas what to check? The server is an up-to-date Centos 7 server. Login to the external database is also possible:
[root#jfrog ~]# psql -h dbserver.example.com -p 5432 -U jfrog
Password for user jfrog:
psql (11.8)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.
jfrog=> SHOW server_version;
server_version
----------------
11.8
(1 row)
jfrog=> \q
[root#jfrog ~]#

AMPPS Apache is not starting after Restart/ SHutdown on Macbook Pro

Here is the log file
[Tue Jun 09 08:55:52.378786 2020] [mpm_prefork:notice] [pid 2311] AH00163: Apache/2.4.41 (Unix) OpenSSL/1.0.2p PHP/7.3.11 configured -- resuming normal operations
[Tue Jun 09 08:55:52.379156 2020] [core:notice] [pid 2311] AH00094: Command line: '/Applications/AMPPS/apache/bin/httpd'
[Tue Jun 09 08:56:48.228429 2020] [mpm_prefork:notice] [pid 2311] AH00169: caught SIGTERM, shutting down
[Tue Jun 09 08:58:13.964872 2020] [mpm_prefork:notice] [pid 637] AH00163: Apache/2.4.41 (Unix) OpenSSL/1.0.2p PHP/7.3.11 configured -- resuming normal operations
[Tue Jun 09 08:58:13.965557 2020] [core:notice] [pid 637] AH00094: Command line: '/Applications/AMPPS/apache/bin/httpd'
[Tue Jun 09 09:29:02.632112 2020] [cgi:error] [pid 802] [client ::1:49585] AH01215: error on line -1 of /Applications/Ampps/extra/ssl/openssl.cnf: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:29:02.632746 2020] [cgi:error] [pid 802] [client ::1:49585] AH01215: 4494323308:error:02001002:system library:fopen:No such file or directory:bss_file.c:175:fopen('/Applications/Ampps/extra/ssl/openssl.cnf','rb'): /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:29:02.632796 2020] [cgi:error] [pid 802] [client ::1:49585] AH01215: 4494323308:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:182:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:29:02.632887 2020] [cgi:error] [pid 802] [client ::1:49585] AH01215: 4494323308:error:0E078072:configuration file routines:DEF_LOAD:no such file:conf_def.c:201:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:31:06.009748 2020] [cgi:error] [pid 787] [client ::1:49641] AH01215: AH00526: Syntax error on line 25 of /Applications/AMPPS/apache/conf/extra/httpd-vhosts.conf:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:06.010263 2020] [cgi:error] [pid 787] [client ::1:49641] AH01215: Cannot define multiple Listeners on the same IP:port: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:06.823294 2020] [cgi:error] [pid 787] [client ::1:49641] AH01215: AH00526: Syntax error on line 25 of /Applications/AMPPS/apache/conf/extra/httpd-vhosts.conf:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:06.823357 2020] [cgi:error] [pid 787] [client ::1:49641] AH01215: Cannot define multiple Listeners on the same IP:port: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:20.673005 2020] [cgi:error] [pid 639] [client ::1:49651] AH01215: AH00526: Syntax error on line 25 of /Applications/AMPPS/apache/conf/extra/httpd-vhosts.conf:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:20.673247 2020] [cgi:error] [pid 639] [client ::1:49651] AH01215: Cannot define multiple Listeners on the same IP:port: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:41.530751 2020] [cgi:error] [pid 788] [client ::1:49655] AH01215: AH00526: Syntax error on line 25 of /Applications/AMPPS/apache/conf/extra/httpd-vhosts.conf:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:41.531804 2020] [cgi:error] [pid 788] [client ::1:49655] AH01215: Cannot define multiple Listeners on the same IP:port: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainmanage
[Tue Jun 09 09:31:50.528108 2020] [cgi:error] [pid 802] [client ::1:49660] AH01215: error on line -1 of /Applications/Ampps/extra/ssl/openssl.cnf: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:31:50.528339 2020] [cgi:error] [pid 802] [client ::1:49660] AH01215: 4724469356:error:02001002:system library:fopen:No such file or directory:bss_file.c:175:fopen('/Applications/Ampps/extra/ssl/openssl.cnf','rb'): /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:31:50.528386 2020] [cgi:error] [pid 802] [client ::1:49660] AH01215: 4724469356:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:182:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Tue Jun 09 09:31:50.528437 2020] [cgi:error] [pid 802] [client ::1:49660] AH01215: 4724469356:error:0E078072:configuration file routines:DEF_LOAD:no such file:conf_def.c:201:: /Applications/AMPPS/ampps/softaculous/enduser/index.php, referer: http://localhost/ampps/index.php?act=ampps_domainadd
[Wed Jun 10 13:33:31.624306 2020] [mpm_prefork:notice] [pid 637] AH00169: caught SIGTERM, shutting down
In Ampps/apache/conf/httpd.conf
Depends on the version, edit LoadModule php7_module /Applications/AMPPS/php-7.3/libphp7.so as LoadModule php5_module /Applications/AMPPS/php-5.6/libphp5.so
Then restart AMPPS and switch Apache on. If it works, then edit the php version back to php7.

Resources