I am trying to build a sample project that is included in gradle distribution. When I do gradle build I get this error:
Could not resolve commons-collections:commons-collections:3.2.1.
Required by:
:application:1.0.2
> Could not HEAD 'https://repo1.maven.org/maven2/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.pom'.
> Connection to https://repo1.maven.org refused
I work behind a proxy. I tried the things mentioned here:
gradle documentation for proxy configuration but I get the same error.
Can you help?
Add gradle.properties file next to the .gradle file with this content :
systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
systemProp.https.proxyHost=www.somehost.org
systemProp.https.proxyPort=8080
systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost
Related
I developed SvelteKit app with Prisma and am trying to deploy it on Vercel.
In package.json, configuration below should be set so that schema.prisma file located in root path is available when app is deployed.
"postbuild": "cp prisma/schema.prisma .vercel_build_output/functions/node/render/ && cp node_modules/#prisma/engines/*query* .vercel_build_output/functions/node/render/",
Problem is an error occurred during the build on Vercel, but that wasn't occurred before (~ May 2022).
I guess cause of the error is related to recent update of SvelteKit and found that directory of .vercel_build_output that is generated during the build is changed to the new .vercel recently. However, the new path structure for index.js (i.e. .vercel/output/functions/render.func/home/s/test/discord-bot-frontend/.svelte-kit/output/server/index.js) is so different from the previous (i.e. .vercel_build_output/functions/node/render/) that I cannot find right path for it.
Would you please let me know right setting for package.json?
Error message:
> discord-bot-frontend#0.0.1 postbuild
> cp prisma/schema.prisma .vercel_build_output/functions/node/render/ && cp node_modules/#prisma/engines/*query* .vercel_build_output/functions/node/render/
cp: cannot create regular file ‘.vercel_build_output/functions/node/render/’: No such file or directory
Error: Command "npm run vercel-build" exited with 1
I found that there is no need to modify .vercel_build_output now. In other words, the post build is not needed anymore.
It is probably because latest Vercel handles this point.
I try to build the Bazel C++ Build Tutorial from the Bazel homepage (Getting Started) with this command but without any connection to the internet: bazel build //main:hello-world
The Jenkins Server will not have any connection to the internet so I can't do prefetching or similar. Is there a way how to prepare my C++ project on another computer and transfer the dependencies to the Jenkins Server to do it offline? How? I would just need what I got from the following error message respectively get the tutorial running:
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Repository rules_cc instantiated at:
/DEFAULT.WORKSPACE.SUFFIX:267:6: in <toplevel>
C:/users/XXX/_bazel_XXX/dq2p42jq/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule http_archive defined at:
C:/users/XXX/_bazel_XXX/dq2p42jq/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
WARNING: Download from https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip failed: class java.io.IOException Unable to tunnel through proxy. Proxy returns "HTTP/1.1 501 Not Implemented"
WARNING: Download from https://github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip failed: class java.io.IOException Unable to tunnel through proxy. Proxy returns "HTTP/1.1 501 Not Implemented"
ERROR: An error occurred during the fetch of repository 'rules_cc':
Traceback (most recent call last):
File "C:/users/XXX/_bazel_XXX/dq2p42jq/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip, https://github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip] to C:/users/XXX/_bazel_XXX/dq2p42jq/external/rules_cc/temp1363696983472254851/b1c40e1de81913a3c40e5948f78719c28152486d.zip: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 501 Not Implemented"
ERROR: Error fetching repository: Traceback (most recent call last):
File "C:/users/XXX/_bazel_XXX/dq2p42jq/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip, https://github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip] to C:/users/XXX/_bazel_XXX/dq2p42jq/external/rules_cc/temp1363696983472254851/b1c40e1de81913a3c40e5948f78719c28152486d.zip: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 501 Not Implemented"
ERROR: Skipping '//main:hello-world': no such package '#rules_cc//cc': java.io.IOException: Error downloading [https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip, https://github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip] to C:/users/XXX/_bazel_XXX/dq2p42jq/external/rules_cc/temp1363696983472254851/b1c40e1de81913a3c40e5948f78719c28152486d.zip: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 501 Not Implemented"
WARNING: Target pattern parsing failed.
ERROR: no such package '#rules_cc//cc': java.io.IOException: Error downloading [https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip, https://github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip] to C:/users/XXX/_bazel_XXX/dq2p42jq/external/rules_cc/temp1363696983472254851/b1c40e1de81913a3c40e5948f78719c28152486d.zip: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 501 Not Implemented"
INFO: Elapsed time: 30.974s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
currently loading: main
Update:
I tried prefetching and it doesn't work. What I did:
run bazel fetch //...
Copy the prefetched data from bazel info output_base directory from local to jenkins server (I had to recreate one sym link to the install dir).
I run bazel build --fetch=false //main:hello-world on jenkins without refatching. Now I get following error:
Loading:
Loading: 0 packages loaded
WARNING: /DEFAULT.WORKSPACE:1:17: External repository 'bazel_tools' is not up-to-date and fetching is disabled. To update, run the build without the '--nofetch' command line option.
ERROR: error loading package '': Every .bzl file must have a corresponding package, but '#bazel_tools//tools/build_defs/repo:http.bzl' does not have one. Please create a BUILD file in the same or any parent directory. Note that this BUILD file does not need to do anything except exist.
INFO: Elapsed time: 0.298s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
I found one solution for offline building a simple C++ projects with bazel.
First you have to download the rules_cc and rules_java libs, because these where the external dependent libs in the simple Bazel C++ tutorial project. I found no release for rules_cc so I downloaded the zip file from the url which was mentioned in the error message on the console when I was trying to use bazel build offline: https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip. The sha key was also mentioned in the error message when you try to use the lib locally with a wrong sha key (see below). The rules_java lib can be downloaded here: https://github.com/bazelbuild/rules_java/releases. The WORKSPACE specification is also mentioned there.
Then you have to add the following to your WORKSPACE file. Be aware, that you have to point to your local copy of the archive files for rules_cc and rules_java. And for rules_cc you have to mention in strip_prefix the root path of the archive file (the first and only root directory in the .zip file). The rules_java has no root directory:
load("#bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_cc",
urls = ["file:C:/tmp/b1c40e1de81913a3c40e5948f78719c28152486d.zip"],
strip_prefix = "rules_cc-b1c40e1de81913a3c40e5948f78719c28152486d",
sha256 = "d0c573b94a6ef20ef6ff20154a23d0efcb409fb0e1ff0979cec318dfe42f0cdd",
)
http_archive(
name = "rules_java",
url = "file:C:/tmp/rules_java-4.0.0.tar.gz",
sha256 = "34b41ec683e67253043ab1a3d1e8b7c61e4e8edefbcad485381328c934d072fe",
)
You can run bazel fetch //... to fetch data locally on the machine, which has access to the internet. Then you can just copy prefetched data: from bazel info output_base directory on your local PC to bazel info output_base in the jenkins job.
I have a SUSE ES 11 SP3 Amazon EC2 instance and I need to install the php5-openssl package, but I'm getting in trouble when using "zypper install". I should have upgraded the insance infrastructure update (more details here), but I missed the deadline and I am now with a useless instance, because I can not install anything .
Whenever I use zypper install I got:
Refreshing service 'susecloud'.
Problem retrieving the repository index file for service 'susecloud':
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/repoindex.xml?cookies=0':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
Check if the URI is valid and accessible.
Error building the cache:
[|] Valid metadata not found at specified URL(s)
Warning: Disabling repository 'php' because of the above error.
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/update/SLE11-SDK-SP3-Pool/sle-11-x86_64/repodata/repomd.xml':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
Abort, retry, ignore? [a/r/i/? shows all options] (a): a
Problem retrieving files from 'SLE11-SDK-SP3-Pool'.
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/update/SLE11-SDK-SP3-Pool/sle-11-x86_64/repodata/repomd.xml':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
Please see the above error message for a hint.
Warning: Disabling repository 'SLE11-SDK-SP3-Pool' because of the above error.
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/update/SLE11-SDK-SP3-Updates/sle-11-x86_64/repodata/repomd.xml':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
If I try updating the update infrascructure I got:
Adding repository 'tmp_instance_infrastructure_upgrade' [done]
Repository 'tmp_instance_infrastructure_upgrade' successfully added
Enabled: Yes
Autorefresh: No
GPG check: Yes
URI: dir:///usr/share/instance_infrastructure_upgrade/repo
Repository 'tmp_instance_infrastructure_upgrade' priority has been set to 1.
Retrieving repository 'tmp_instance_infrastructure_upgrade' metadata [done]
Building repository 'tmp_instance_infrastructure_upgrade' cache [done]
Specified repositories have been refreshed.
Refreshing service 'susecloud'.
Problem retrieving the repository index file for service 'susecloud':
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/repoindex.xml?cookies=0':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
Check if the URI is valid and accessible.
Error building the cache:
[|] Valid metadata not found at specified URL(s)
Warning: Disabling repository 'php' because of the above error.
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/update/SLE11-SDK-SP3-Pool/sle-11-x86_64/repodata/repomd.xml':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
...
--> Updating packages failed
I tried to install each php5-openssl dependency, downloading each RPM and installing with rpm -i, but every time I resolve one dependency another appears. I also tried the suse forum (post here) but with no success until now.
So my questions are:
Is there some way to fix zypper repositories manually? Even if only to install the php5-openssl package.
Is there some way to use RPM to manage the dependencies for php5-openssl?
Is there another alternative to install php5-openssl in my suse instance?
in short:
you cannot fix these repositories; since they don't exist anymore (try browsing to http://sa-east-1-ec2-update.susecloud.net/).
rpm cannot look for dependencies because rpm does not use repositories (that's where zypper comes in). You can look for rpms on the internet, and then install the manually using rpm; but rpm won't locate the missing rpms.
Yes; as said in point 2; you can look for the rpms; download them and install them manually; or else you can even look for repositories that contain the rpms you want, and add that repository. However be careful with that; since those repositories probably aren't made for Amazon EC2. If you do this; try to find a repository as close as possible to suse 11 EC2...
When setting in the sample app: Travelocity.properties
#Specify if SAM LAssertion element is encrypted
SAML.EnableAssertionEncryption=true
And also tick the Identity server configuration option:
Enable Assertion Encryption [ticked]
Certificate Alias: wso2carbon
I receive the following error at the server log:
Error at Log: 2015-05-05 15:56:10,282 Error encrypting XMLObject
Without the encryption feature enabled, the SAML authentication flow with the Travelocity sample code starts working.
Hints are welcome how to fix this issue.
Regards,
Claude
It seems like you are working on the installed java runtime for the first time. I am using ubuntu 14. The same problem came to me. For me it worked in the following way.
1. Download the respective files according to your runtime from here.
http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
2. Extract the folder you downloaded. There will be two .jar files.
3. For ubuntu you can run echo $JAVA_HOME to find the java home. Copy above jar files into {JAVA_HOME}/jre/lib/security. You may need sudo access depending on you JAVA_HOME location. If so run the following from the location you extracted the zip file.
cp local_policy.jar /{JAVA_HOME}/jre/lib/security
cp US_export_policy.jar /{JAVA_HOME}/jre/lib/security
There should be only one slash (/) at /{JAVA_HOME}.
4. Restart wso2 identity server again and retry the procedure to login to travelocity.com
Hope this will fix your issue.
Folks,
I'm trying to use Flyway on a shared Bluehost server and I'm getting a very cryptic error. Not sure how to troubleshoot.. I'm confident that the basic connection / credentials are working, since changing flyway config settings to a wrong password produces a different error.
Note that I'm able to connect to the database from the command line from the server box using 'mysql -u blah -p' just fine.
Any hints on how to troubleshoot the below? Output from flyway -X init is below.
Flyway config file: http://pastebin.com/8dsWE3W2
Output from ./flyway -X init
/usr/bin/tput
Flyway (Command-line Tool) v.3.0
DEBUG: Adding location to classpath: /home1/philost2/checkout/cocktailbuilder-master/server/_devtools/flyway/bin/../jars/mysql-connector-java-5.1.30-bin.jar
DEBUG: Adding location to classpath: /home1/philost2/checkout/cocktailbuilder-master/server/_devtools/flyway/bin/../jars/h2-1.3.170.jar
ERROR: Unexpected error
org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource (jdbc:mysql://localhost/philost2_cocktailbuilder_prod?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false) for user '<redacted>'
at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnectionFromDriver(DriverDataSource.java:266)
at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnection(DriverDataSource.java:226)
at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:50)
at org.flywaydb.core.Flyway.execute(Flyway.java:1144)
at org.flywaydb.core.Flyway.init(Flyway.java:970)
at org.flywaydb.commandline.Main.executeOperation(Main.java:118)
at org.flywaydb.commandline.Main.main(Main.java:88)
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??????????????' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1049)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2832)
at com.mysql.jdbc.ConnectionImpl.configureClientCharacterSet(ConnectionImpl.java:1937)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3720)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2554)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:413)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)
at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnectionFromDriver(DriverDataSource.java:264)