Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I decided to learn to use R to access Wharton Research Database Services (WRDS). I followed the WRDS instructions to connect from my Mac using Big Sur via R. It worked fine at first, however since then I have not been able to access any WRDS webpage via browser. The page won't load and my browser will tell me that the webpage took too long to respond. This happens on all devices connected to my Wifi network, but it works on other wifi connections or even via remote connections to another computer on university campus. Establishing a connection via R has since also failed and simply errors after a couple minutes due to a webpage timeout error.

I rebooted my router, and even reset to factory settings, but it didn't help. I have shut down the computer and R that established the connection at first, but no resolve either.

I don't think me playing around with PostgreSQL and this now happening is a coincidence, but I am fully out of ideas.

Here is the R Code I used to connect originally:

library(RPostgres)

wrds <- dbConnect(Postgres(),
  host='wrds-pgdata.wharton.upenn.edu', 
  port=9737, 
  dbname='wrds', 
  sslmode='require',
  user=myUserName)

res <- dbSendQuery(wrds, "select distinct table_schema
  from information_schema.tables
  where table_type = 'VIEW'
  or table_type = 'FOREIGN TABLE'
  order by table_schema")

data <- dbFetch(res, n=-1)
dbClearResult(res)

I would appreciate any ideas on what is happening here. Thank you in advance!

EDIT: Maybe I should have added, the process also had me create a .pgpass file via terminal in my /users/usr directory via terminal. The file is just one line of 'wrds-pgdata.wharton.upenn.edu:9737:wrds:username:password', where I filled in my username and password that I use to access WRDS.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
289 views
Welcome To Ask or Share your Answers For Others

1 Answer

While I do not know anything about the specifics about how WRDS is provided (and with the added caveat that a lot could be going on in client/server communication) it should not. The PostgreSQL network traffic from psql or the RPostgreSQL package using the same underlying library use one port, and webtraffic uses another (generally 80 for http).

Now, there could be another layer where maybe they count connection attemts at they decide to block at the network layer. That is possible but I would call it unlikely. One way to test would be connect to WRDS from another network (if you can).

Testing such setups can be very frustrating. PostgreSQL alone can be frustrating at the begging until you have pg_hba.conf and alike correct. In this case I suggest to get back to their documentation and test via possible alternate routes. While I am familiar with RPostgreSQL (as the initial maintainer when it was written during a GSoC) I cannot help you as I have no WRDS credentials.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...