M2E Pro installation and configuration

Hi Craig, hi guys,

I struggle to kick my M2E Pro extension for M2. I tried so many times and in so many different ways but with no luck.

My working environment M2.3.2, Apache, Ubuntu16.04, DigitalOcean server configured following the tutorial (How to install Magento 2.3 and build a web server).

GoDaddy SSL certificate installed but I also tried without it and with no luck.

I installed the module in both ways via marketplace and composer hoping that it will help.

Composer

I run the following command using my Magento user:

cd /var/www/html

Once in the correct location, I run:

composer require m2epro/magento-extension

Composer installed a single package called magento2exension v1.4. I checked status of my modules running the following command:

bin/magento modules:status

A list of disabled modules was displayed including Ess_M2ePro.

I enabled the module running the following command

bin/magento module:enable Ess_M2ePro

I was informed that the module was successfully enabled :slight_smile: Finally, I installed the extension running the following command:

bin/magento setup:upgrade

Sweet module installed.

Web Setup Wizard

It was even easier using Magento Marketplace navigating in Magento admin panel to
System/Web Setup Wizard > Extensions Manager and Extensions Ready to Install

Found the extension on the list, ticked the box, clicked install, run the readiness check and when checks completed successfully I installed the module (I skipped backing the site up. I backed it up using a snapshot on DigitalOcean)


After a couple of minutess the module was installed. Both methods worked just fine for me but I had to check.

All module components eBay, Amazon and Walmart are visible in my M backend so all looks good but now steps start.

I was able to register eBay module filling the basic on the first tab and I could see that the module has been registered with M2e Pro. To be able to see it I logged into my M2e Pro account and checked extension key. One set of keys was related to the module I have just installed and registered. I could see my domain name and my IP next to the key.

Finally, I need to link my eBay account with my M2e Pro. This should be very simple clicking the orange continue button. We should be redirected to eBay site. Login to it with our credentials and obtain a token, however, it is not happening.

The following error message is shown:

The eBay token obtaining is currently unavailable. Please try again later.

I already contacted guys from M2e pro but they have informed me that it is nothing to do with their extension.

I’m guessing that it is something to do with the server configuration. I only found this.

Craig on anyone can you guys help?

Can you try to install the module and link it to your eBay or eBay sandbox account?
It should be in a very similar environment I’m using. (How to install Magento 2.3 and build a web server)

Or maybe you know how to fix it looking at the error :slight_smile:

Thank you very much. I know how to use the module but I struggle to link it with my eBay.
Please help.

BIG THANK YOU!

Pawel

When you try to run any action (for example, Synchronization tasks, List/Relist/Revise/Stop actions) the error about M2E Pro Server connection fail can arise. You can get one of the following messages:

  • “Please ensure that CURL library is installed on your Server and it supports HTTPS protocol. Also ensure that outgoing Connection to m2epro.com, port 443 is allowed by the firewall.”
  • “Server connection is failed. Please try again later.”

Below you can find the possible reasons for these errors and the ways on how to fix them:

1) Temporary Connection Problem - given that your server and M2E Pro server are physically placed in a distance, the temporary failure of connection can occur. Such type of problem does not have a particular solution and just needs some time. So you can wait a bit and run the action again. But you can also contact your hosting support and ask to investigate why your server lost an ability to connect to our servers (s1.m2epro.com and s2.m2epro.com). Most probably this issue relates to DNS.

2) The Outgoing Connection was Blocked by Firewall - M2E Pro Servers (as of February 01, 2017 such servers are running s1.m2epro.com and s2.m2epro.com) must be in a list of allowed outgoing connections for ports 80 and 443. This prevents the outgoing connection from being blocked by the firewall. Therefore, M2E Pro will work properly.

3) CURL Library is not installed on your server or it does not support HTTPS Protocol - CURL Library ought to be installed/updated on your server and it has to support HTTPS Protocol. Support and availability of HTTPS Protocol are obligatory because of the data from your module is sent to M2E Pro server via the secure connection."

UPDATE: I’ve just found this: https://support.m2epro.com/knowledgebase/1529179-data-communication-via-m2e-pro-server/

  1. My memory limits should be fine. I already checked.
  2. How to allow/check if I’m allowing incoming connection to Magento server from cron1.m2epro.com and cron2.m2epro.com
  3. How to allow/check if I’m allowing outbound connections from Magento server to [ s1.m2epro.com and s2.m2epro.com through port 443

I’m still digging.

UPDATE: I found this: https://support.m2epro.com/knowledgebase/1555792-steps-to-diagnose-network-connection-between-magento-and-m2e/

I think that I need to check it but I have no clue where to start :grimacing:

1 Like

Firstly… One of the best write-ups I’ve ever seen to a problem :+1:

1. Firewall Test (my money is on this)
Just to rule out the Firewall completely - as opposed to messing with ports and stuff - Does it work if you disable the Firewall? (i.e. allow All IPv4 and IPv6 to HTTP and HTTPS).

(DigitalOcean screenshot)
ds-example
If it all works after removing the firewall, then it’s obviously something to do with your configuration.

2. cURL Test
cURL comes pre-installed with Ubuntu. But you can easily test whether your server can connect to another server/website by using the following command:

curl -Is https://s1.m2epro.com/ | head -1

A successful connection will return “HTTP/1.1 200 OK”.

You can even output the web page by using:

curl https://s1.m2epro.com/

In which case, the problem has nothing to do with that.

If it’s not the Firewall or cURL then you’ll need to dig a little deeper. I don’t think this issue will be difficult to solve. I’ll have a look myself when I get a chance. But I don’t have eBay or anything so you’ll need to PM me some keys or whatever I need to connect.

1 Like

Hi Craig,

Thank you for your time and looking at it.

Can you please tell me how to disable the firewall?

I’m guessing I need to reverse some of these commands:

"Now simply reload the SSH Service for the changes to take effect [15:37]

sudo systemctl reload sshd

Enable a basic firewall

First, we must allow SSH connections to your web server. This is the connection we are currently using

sudo ufw allow ssh

Then turn on the firewall [16:42]

**sudo ufw enable**

You’ll get a warning, to make sure we’ve allowed SSH connections. So just type “Y” and hit Enter

Can you please let me know what command I should run?
Thank you.

Regards,
Pawel

To disable Firewall completely from command line just run the below as a superuser:

sudo ufw disable

If you’re on DigitalOcean, you still need to do the thing I said in my previous post (because that’s an additional firewall).

Hi,

Are you talking about this:

You see I didn’t mess with the DigiOcean’s firewall.

I am referring to this. If you’re not using it then ignore what I said about it.

Magento + Server vs Pawel 1:0 :joy:

It didn’t work. I completely removed my firewall running:

sudo ufw disable

I also checked and I can confirm that I have no additional firewall in DigiOcean.

Comment

curl -Is https://s1.m2epro.com/ | head -1    

resulting in “HTTP/1.1 200 OK”.

I’m giving up. If you have any idea please let me know.

Thank you.
Pawel

I’ll install the module and have a look. Probably Wednesday night at the earliest. Hopefully, I do have the same issue. Then it’ll be more obvious (and easier) how to solve it. (Don’t forget to re-enable your firewall).

Craig,

Thank you.

I asked my friend to look at it. He said that connections to these servers are fine. At least on ports 443 because ports 80 are closed.

pawel@Magento2:/var/log$ telnet s1.m2epro.com 80
Trying 198.27.83.180…
telnet: Unable to connect to remote host: Connection refused

pawel@Magento2:/var/log$ telnet s1.m2epro.com 443
Trying 198.27.83.180…
Connected to s1.m2epro.com.
Escape character is ‘^]’.
^]
telnet> q
Connection closed.

pawel@Magento2:/var/log$ telnet s2.m2epro.com 80
Trying 94.23.53.45…
telnet: Unable to connect to remote host: Connection refused

pawel@Magento2:/var/log$ telnet s2.m2epro.com 443
Trying 94.23.53.45…
Connected to s2.m2epro.com.
Escape character is ‘^]’.
^]
telnet> q
Connection closed.

He said that he needs a path and access to this magento application logs. I’ve got no idea where to find these.

In addition he informed me that he doesn’t have access to apache logs.
pawel@Magento2:/var/log$ cd apache2/

-bash: cd: apache2/: Permission denied

He accessed my server using my superuser credentials. I thought that he will be able to dig everywhere on the server.
I followed your tutorial creating the server and installing M. Have you restricted anything during the setup?

Take your time with this. There is no rush.
Probably you need your Magento secured and eBay account. I’m not sure if eBay still provides sandbox accounts for test.

It is very easy to terminate a connection if you use your life eBay account.

Pawel

Hi Craig,

I’m still fighting with the module.
From my observation, I was able to register the module with M2e Pro. I was redirected to eBay but then I couldn’t get the token. When I removed the module keys manually form M2e Pro account my Magento still shows that the module is registered even I removed the keys.

I’m just guessing but it looks like M2e Pro cannot communicate back to my site.
This might be helpful when you play with it tomorrow.

I have an SSL certificate installed. Maybe this is causing the problem. I just don’t know where to look.
Do you know how to check the incoming and outgoing connection with M2e Pro?

Pawel

So, I tried and everything worked fine. I even installed it via Composer. However, your composer command you wrote (m2epro/magento-extension) didn’t work. I used m2e/ebay-amazon-magento2 as stated in the Magento Marketplace

m2e .
Setup Specs:

  • Digital Ocean Droplet
  • Magento installed using my tutorial
  • Let’s Encrypt installed using my tutorial
  • I didn’t have adjust my firewall (It just worked)
1 Like

Hi Craig,

Were you able to connect to your eBay account and obtain token?

Pawel

It let me go all the way to setup up a listing. eBay granted me a Dev Account, but it was quicker to link my personal account. Not sure if that makes a difference.

1 Like

Thank you. It doesn’t make any diffenrect.
How did you do it. :thinking:

I have 2 proplets, with 2 different Magento installations and the same issue.
I’ve just removed my GoDaddy SSL and installed Let’s encrypt and the same issue.

I may create 3rd droplet just for a day and install new Magento. I need to do something wrong somewhere.

Perhaps it’s related to your eBay account as that’s the only consistent between the 2 setups.

When I registered the module innitialy my Magento wasn’t secured.

You see I was able to register it but I wasn’t able to get the token.
Then I installed SSL and but it didn’t help.

I’ll try to install new magento later. I’m getting better and better with it. hahahaha
I did it so many times so I could prabably speak our your “how to install magento 2” tutorial from my memory.

Thank you for your time.
Pawel

1 Like

Hi Crain,

Once again. A BIG THANK YOU for your time and checking it!
It took me some time to install new Magento, change my IP records so I could generate let’s encrypt SSL for a domain name and finally register M2e Pro and link eBay account to it. All work fine.
I’m testing now GoDaddy SSL. I’m guessing that I couldn’t get eBay token because the site wasn’t secured. I installed the SSL later but it was too late. I’m going to contact guys from M2e pro if it is possible to rewind things back. I don’t want to migrate all products data, attributes, categories and such.

Pawel

1 Like