Ask Your Question
0

Connection issue

asked 2020-10-12 14:14:51 -0600

Hello,

I keep having a connection issue trying to connect throught PHRets

[2020-10-09 16:42:55] PHRETS.DEBUG: Loading Monolog\Logger logger [] []
[2020-10-09 16:42:55] PHRETS.DEBUG: Sending HTTP Request for http://maxebrdi-rets.paragonrels.com/rets/fnisrets.aspx/MAXEBRDI/login?rets-version=rets/1.7.2 (Login) {"auth":["**USER**","**PASS**","basic"],"headers":{"User-Agent":"PHRETS/2.6.1","RETS-Version":"RETS/1.7.2","Accept-Encoding":"gzip","Accept":"*/*"},"curl":{"10031":"/tmp/phretsRRoUkF"}} []
[2020-10-09 16:42:55] PHRETS.DEBUG: ClientException: 401: Client error: `GET http://maxebrdi-rets.paragonrels.com/rets/fnisrets.aspx/MAXEBRDI/login?rets-version=rets/1.7.2` resulted in a `401 Unauthorized` response [] []
http/promises/src/Promise.php(203): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}(Object(GuzzleHttp\\Psr7\\Response))\n#2 /var/app/current/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\\Promise\\Promise::callHandler(1, Object(GuzzleHttp\\Psr7\\Response), Array)\n#3 /var/app/current/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\\Promise\\Promise::GuzzleHttp\\Promise\\{closure}()\n#4 /var/app/current/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\\Promise\\TaskQueue->run(true)\n#5  in /var/app/current/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113

When I try to connect using Retsmd.com I don't seem to have any issues so I know the username and password are correct.

What am I doing wrong? We have a dozen other Rets connections running using the same code base without any issues.

Thanks Eric

edit retag flag offensive close merge delete

Comments

Requires Digest for HTTP and BASIC for HTTPS.

bwolven gravatar imagebwolven ( 2020-10-12 14:18:18 -0600 )edit

You can try connecting in a browser with the Login url and see if it works there..
Otherwise i would need your account name to check.

bwolven gravatar imagebwolven ( 2020-10-12 16:53:35 -0600 )edit

Were you able to connect?

bwolven gravatar imagebwolven ( 2020-10-13 11:15:30 -0600 )edit

the username and password work when I try to connect through Retsmd.com, so I know it is not an issue with the credentials

eculus gravatar imageeculus ( 2020-10-13 14:21:09 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-10-12 15:51:32 -0600

I was thinking of the same thing

$config->setLoginUrl('http://maxebrdi-rets.paragonrels.com/rets/fnisrets.aspx/MAXEBRDI/login?rets-version=rets/1.7.2')
       ->setUsername('username')
       ->setPassword('password')
       ->setUserAgent('PHRETS/2.6.1')
      ->setRetsVersion('1.7.2')
      ->setHttpAuthenticationMethod('digest');

but still the same error

[Mon Oct 12 20:46:09.854995 2020] [php7:error] [pid 7028] [client 172.31.87.237:24426] PHP Fatal error:  Uncaught GuzzleHttp\\Exception\\ClientException: Client error: `GET http://maxebrdi-rets.paragonrels.com/rets/fnisrets.aspx/MAXEBRDI/login?rets-version=rets/1.7.2` resulted in a `401 Unauthorized` response in /var/app/current/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113\nStack trace:\n#0 /var/app/current/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\\Exception\\RequestException::create(Object(GuzzleHttp\\Psr7\\Request), Object(GuzzleHttp\\Psr7\\Response))\n#1 /var/app/current/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}(Object(GuzzleHttp\\Psr7\\Response))\n#2 /var/app/current/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\\Promise\\Promise::callHandler(1, Object(GuzzleHttp\\Psr7\\Response), Array)\n#3 /var/app/current/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\\Promise\\Promise::GuzzleHttp\\Promise\\{closure}()\n#4 /var/app/current/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\\Promise\\TaskQueue->run(true)\n#5  in /var/app/current/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113

This one puzzles me :)

edit flag offensive delete link more

Comments

I can't really help without an account name so I can check in the logs. NO PASSWORDS.

bwolven gravatar imagebwolven ( 2020-10-13 14:38:49 -0600 )edit

the username is 206539671

eculus gravatar imageeculus ( 2020-10-13 14:44:37 -0600 )edit

In the logs, on 10/6, I see your "RETSMD/1.0" requests.
On 10/9, I see what appears to be a single browser login "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36."
But no other from your account other than those.
I used PHRETS and was able to login HTTP with your credentials. I copied the code you used below
And I see those requests in the logs. But nothing from your attempts.
Please verify auto-correct didn't change your user name or password when you entered them in PHRETS.

bwolven gravatar imagebwolven ( 2020-10-13 15:16:07 -0600 )edit

ok, found the issue. it was a typo as you mentioned, a sneaky one, but I managed to log in.

eculus gravatar imageeculus ( 2020-10-13 16:44:47 -0600 )edit

I see your entries in the logs now.
Glad it is fixed.

bwolven gravatar imagebwolven ( 2020-10-13 16:47:50 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-10-12 14:14:51 -0600

Seen: 29 times

Last updated: Oct 12