Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find a region via the region provider chain #269

Open
pibe86 opened this issue Dec 16, 2019 · 14 comments
Open

Unable to find a region via the region provider chain #269

pibe86 opened this issue Dec 16, 2019 · 14 comments

Comments

@pibe86
Copy link

pibe86 commented Dec 16, 2019

Hello.

I'm trying to run this project, after I execute this command:

java -jar target/original-dt-v3.2.0-688-gc80119c.jar configurations/default/env.yml configurations/default/server.yml

I got this error

`:~/datatools-server# java -jar target/original-dt-v3.2.0-688-gc80119c.jar configurations/default/env.yml configurations/default/server.yml
18:05:25,306 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
18:05:25,306 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
18:05:25,306 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/root/datatools-server/target/original-dt-v3.2.0-688-gc80119c.jar!/logback.xml]
18:05:25,327 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@63e31ee - URL [jar:file:/root/datatools-server/target/original-dt-v3.2.0-688-gc80119c.jar!/logback.xml] is not of type file
18:05:25,377 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
18:05:25,378 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
18:05:25,386 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
18:05:25,465 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - This appender no longer admits a layout as a sub-component, set an encoder instead.
18:05:25,465 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
18:05:25,465 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
18:05:25,465 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
18:05:25,466 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
18:05:25,466 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
18:05:25,468 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@68fb2c38 - Registering current configuration as safe fallback point

Dec 16 18:05:25.639 [main] INFO c.c.datatools.manager.DataManager:478 - Loading env.yml: configurations/default/env.yml
Dec 16 18:05:25.641 [main] INFO c.c.datatools.manager.DataManager:479 - Loading server.yml: configurations/default/server.yml
Dec 16 18:05:25.692 [main] WARN c.c.datatools.manager.DataManager:418 - Config property BUGSNAG_KEY not found
Dec 16 18:05:25.695 [main] INFO c.c.datatools.manager.DataManager:141 - FeedStore
Dec 16 18:05:25.769 [main] WARN c.c.datatools.manager.DataManager:418 - Config property GTFS_DATABASE_USER not found
Dec 16 18:05:25.769 [main] WARN c.c.datatools.manager.DataManager:418 - Config property GTFS_DATABASE_PASSWORD not found
Dec 16 18:05:26.227 [main] INFO org.mongodb.driver.cluster:71 - Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
Dec 16 18:05:26.272 [main] INFO c.c.d.m.persistence.Persistence:81 - Connecting to remote MongoDB instance
Dec 16 18:05:26.312 [cluster-ClusterId{value='5df7c7668f16ea4e7c5af1c3', description='null'}-localhost:27017] INFO org.mongodb.driver.connection:71 - Opened connection [connectionId{localValue:1, serverValue:39}] to localhost:27017
Dec 16 18:05:26.313 [main] INFO c.c.datatools.common.utils.Scheduler:56 - Scheduling recurring project auto fetches
Dec 16 18:05:26.315 [cluster-ClusterId{value='5df7c7668f16ea4e7c5af1c3', description='null'}-localhost:27017] INFO org.mongodb.driver.cluster:71 - Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 6, 8]}, minWireVersion=0, maxWireVersion=6, maxDocumentSize=16777216, roundTripTimeNanos=990820}
Dec 16 18:05:26.359 [main] INFO org.mongodb.driver.connection:71 - Opened connection [connectionId{localValue:2, serverValue:40}] to localhost:27017
Dec 16 18:05:26.369 [main] INFO c.c.datatools.common.utils.Scheduler:62 - Scheduling feed expiration notifications
Dec 16 18:05:26.403 [main] INFO com.conveyal.gtfs.GraphQLController:98 - Initialized GTFS GraphQL API at localhost:port/api/manager/secure/gtfs/
Dec 16 18:05:26.425 [Thread-1] INFO org.eclipse.jetty.util.log:192 - Logging initialized @1265ms to org.eclipse.jetty.util.log.Slf4jLog
Dec 16 18:05:26.532 [Thread-1] INFO s.e.jetty.EmbeddedJettyServer:142 - == Spark has ignited ...
Dec 16 18:05:26.532 [Thread-1] INFO s.e.jetty.EmbeddedJettyServer:146 - >> Listening on 0.0.0.0:4000
Dec 16 18:05:26.534 [Thread-1] INFO org.eclipse.jetty.server.Server:373 - jetty-9.4.z-SNAPSHOT, build timestamp: 2017-11-21T21:27:37Z, git hash: 82b8fb23f757335bb3329d540ce37a2a2615f0a8
Dec 16 18:05:26.604 [Thread-1] INFO org.eclipse.jetty.server.session:364 - DefaultSessionIdManager workerName=node0
Dec 16 18:05:26.605 [Thread-1] INFO org.eclipse.jetty.server.session:369 - No SessionScavenger set, using defaults
Dec 16 18:05:26.612 [Thread-1] INFO org.eclipse.jetty.server.session:149 - Scavenging every 660000ms
Dec 16 18:05:26.672 [Thread-1] INFO o.e.jetty.server.AbstractConnector:288 - Started ServerConnector@2521f46b{HTTP/1.1,[http/1.1]}{0.0.0.0:4000}
Dec 16 18:05:26.672 [Thread-1] INFO org.eclipse.jetty.server.Server:410 - Started @1512ms
log4j:WARN No appenders could be found for logger (com.amazonaws.AmazonWebServiceClient).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.conveyal.datatools.manager.DataManager.registerRoutes(DataManager.java:228)
at com.conveyal.datatools.manager.DataManager.main(DataManager.java:128)
Caused by: com.amazonaws.SdkClientException: Unable to find a region via the region provider chain. Must provide an explicit region in the builder or setup environment to supply a region.
at com.amazonaws.client.builder.AwsClientBuilder.setRegion(AwsClientBuilder.java:462)
at com.amazonaws.client.builder.AwsClientBuilder.configureMutableProperties(AwsClientBuilder.java:424)
at com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:46)
at com.conveyal.datatools.manager.controllers.api.ServerController.(ServerController.java:77)
... 2 more
`

I check my local URL http://localhost:9000 and I got nothing. any Advise? Thanks.

@come25136
Copy link

come25136 commented Feb 15, 2020

Hello.

~/.aws/config

[default]
region = us-east-1

You can avoid errors by filling in.

@brodyFlannigan
Copy link

I'm having the same issue on my end, however, I don't use AWS and have thus set use_s3_storage to false in server.yml (I want to upload a pre-existing feed with the interface once I get this issue sorted out...)

@come25136
Copy link

@dudebrains01 Even if you are not using AWS, you need to fill in the region in "~ / .aws / config".

I'm using Google Translate. Please point out if you made any mistakes :)

@brodyFlannigan
Copy link

brodyFlannigan commented Mar 1, 2020

@dudebrains01 Even if you are not using AWS, you need to fill in the region in "~ / .aws / config".

I'm not sure what you mean by that. What specific fields/files do I need to change in datatools-server?

@come25136
Copy link

~/.aws/config is an environment setting file referenced by AWS SDK used by datatools-server.
It is not a file to be change in datatools-server.

~/.aws/config becomes /home/dudebrains01/.aws/config for Linux.

@brodyFlannigan
Copy link

~/.aws/config is an environment setting file referenced by AWS SDK used by datatools-server.
It is not a file to be change in datatools-server.

~/.aws/config becomes /home/dudebrains01/.aws/config for Linux.

How would I make this change in Windows 10? I have no clue how all this AWS stuff works.
Do I need to install AWS SDK even if I don't want to host files with AWS?

@come25136
Copy link

@dudebrains01 No SDK is required whether you use AWS or not.
For Windows, write the settings to C:\Users\dudebrains01\.aws\config.

@brodyFlannigan
Copy link

@dudebrains01 No SDK is required whether you use AWS or not.
For Windows, write the settings to C:\Users\dudebrains01\.aws\config.

And that's in system env. variables?

@come25136
Copy link

No system environment variables are used.

@brodyFlannigan
Copy link

So where do I need to place this?

@come25136
Copy link

come25136 commented Mar 2, 2020

Place in C:\Users\dudebrains01\.aws\config.
This is a file.

@brodyFlannigan
Copy link

Got it!
Thanks!

@iamraviraj
Copy link

iamraviraj commented Jul 27, 2020

what should be the file content?
C:\Users\dudebrains01.aws\config

[default]
region = us-east-1

@come25136
Copy link

@iamraviraj

The contents are as follows.

[default]
region = us-east-1

dudebrains01 is a user name, so change it to suit your environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants