postgresql – pg_restore: error: could not execute query: ERROR: schema “public” already exists

When I try to restore a database using

pg_restore -U username --no-owner --no-privileges -d mydb backupfile.dump

I get an error saying:

pg_restore: error: could not execute query: ERROR:  schema "public" already exists
Command was: CREATE SCHEMA public;

How do I prevent this error? I looked at another similar question on the site, and tried what was suggested in the answer.

I used dropdb mydb and createdb mydb before running the pg_restore command.

In case it is relevant, I am trying to restore the database dumped from PostgreSQL 10.14 into a database in PostgreSQL 12.3.

Thank you.

PayPal IPN’s not working correctly. Paypal showing Error 500

I have upgraded my webste from Magento1.9 to 2.3.5. I got an issue with my 2 Magento websites. My sites is using PayPal Payments Pro Hosted Solution.

The issue is with the PayPal IPNs. Paypal IPN shoiwng 500 error. When i dig it, i found the paypal hit the ipn url and here the invoice_id (order incremented id) not found. but, in admin order_id is exist.

Magento have some bug with the paypal IPN.

Please help us.

apache – Configuring Apache2 to return an error code _once_ and then proceed normally?

I’m working on a project that uses Apache2 as the backend for testing http client code. I’d like to configure it so that if I go to a certain url, it will return a 429 the first time I access it, and then work normally after that. This would let me test my retry logic.

I know nearly nothing about Apache2 config so I thought I’d ask if anyone has a simple way to do this.

I added a Curl.php file in another location. Now I have a Fatal Error when accessing the backend of my store

I added a Curl.php file in another location. Now I have a Fatal Error when accessing the backend of my store. (Yes, I deleted the other location already, but I still receive the error) Does anyone have any insight on this? Help is much appreciated.

Error Image

remote desktop – RDC to Azure VM from Windows 10 build 2004 – An internal error has occurred

Since Windows 10 build 2004 I’m unable to connect to my Azure Server VM via Remote Desktop Connection (RDC).

I get the error “An internal error has occurred”.

I can connect to other VM’s and servers via RDC in our network/domain. Only the Azure VM doesn’t work.

Restarting RDC Service/reboot doesn’t work.

Other pc which is also build 2004 has the exact same problem. Before build 2004 it worked fine.
Is this a known problem and is there a fix?

equation solving – What does it mean by the error “10 is not a valid variable”?

I wrote a very basic test function in Mathematica (I am the absolute beginner)

Fun1(x_) := Module(
{y, z, t},
y = Min(x + 10000, 500);
z = y + 24;
t = y + z;
t
)

However, when I try to solve for the root
Solve(Fun1(x) == 0, x), I was never able to get the expected value, but this error occurred “… Solve::ivar: 10 is not a valid variable”.

what does it mean? and how to overcome this?

Many thanks
Tien

macos – New “Resource busy” error when trying to mount DMG files

I am having a new issue where DMG files sometimes fail to mount due to “Resource busy” error.

This sometimes occurs and other times doesn’t occur.

Temporary solutions include trying downloading the file through another browser, moving the file somewhere else before opening it, or trying again later, but they don’t always fix the issue.

How can I fix this error for a permanent solution?

ssh – “service my_service stop” is deemed an error whenever a service is in the “stopped” condition already. How to move on despite an error?

I have a bunch of bash commands that are run via ssh:

#!/bin/bash

CMD="
  set -e

  cmd1
  cmd2
  # ........


  service my_service stop

  # .........
  # some commands here......
  # .........

  service my_service start

" 

ssh -t -A -q -C $SERVER@$HOST "$CMD"

Sometimes, whenever my_service happens to be in the stopped status already, the command service my_service stop will return this:

--rpc-eval : RPC failed with reason :nodedown       # it's an Erlang app, hence a response
./my_script.sh: línea 26: error: orden no encontrada

Since the said command is deemed failure, for some reason, it’ll terminate the execution, exit a session and thus won’t reach the command service my_service start.

But I want it to always run both stop and start and the commands in between, of course, regardless of the state of an app before the command service stop, and not to fail, or move on despite a possible failure after “service stop”

How to do it?

nodejs – Error ECONNRESET al conectarse a base de datos MySQL Azure

Tengo un problema al tratar de conectar un socket desarrollado en NodeJS a una base de datos MySQL ubicada en Azure. Tengo un GPS que envía datos a un socket que inserta esos datos en la base de datos. Sin embargo, durante algunas transacciones la conexión es normal pero en cierto punto deja de conectarse dando un error:

Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:205:27)

Luego que aparece el error ya no puede ejecutar la inserción de la data.

¿Alguien sabe sobre dicho tema o conoce alguna solución?

Gracias.

linux – grub2 uefi fix: error on fixing

I have a ubuntu 18.04 server that i upgraded to 20.04. After the upgrade the system refuse to start for an issue on GRUB.
So I am trying to follow this answer to fix it.

My issue is that on the second command:

sudo mount /dev/sda1 /mnt/boot/efi

I get that mount point does not exists

This is my fdisk (sorry I can’t paste it here but i am connected using vnc to the server)

enter image description here

/dev/sdb is an usb stick I don’t use
/dev/sda is the usb stick I am running a ubuntu desktop live on
/dev/sdc is the mirror disk for /dev/sda (raid)

I tried to do

sudo mount /dev/sdd2 /mnt
sudo mount /dev/sdd1 /mnt/boot/efi

and I get the error.

content of /dev/sdd2 is.

enter image description here

while on /dev/sdd4 I have all the rest of the system files and the data

Can you help me on fixing this error?