🐛 Bug Report: Java Function - Host Is Unreachable

Open
#41 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, kotlin

Research direction

Start by reproducing the Java Function using the endpoint, project ID, and Gradle dependencies shown in the report, then compare the localhost and IP-address failures. Done means identifying why the database connection cannot reach the host and documenting the required Gradle Jar setting noted in the issue.

Written by the indexing model from the issue text.

Description

bug
👟 Reproduction steps

Java Function:

    var client = new Client();
    client
        .setEndpoint("http://192.168.1.3/v1")
        .setProject("java0001")
        .setKey("...");
    var databases = new Databases(client);

Gradle:

dependencies {
    implementation 'io.appwrite:sdk-for-kotlin:1.1.0'
    implementation 'com.google.code.gson:gson:2.9.1'
    implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.13.4'
    implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
    compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.24'
    annotationProcessor 'org.projectlombok:lombok:1.18.24'
}
tasks.withType(Jar) { duplicatesStrategy = DuplicatesStrategy.INCLUDE }

NOTE: please document last line setting of this Gradle; otherwise it won't compile probably because of known Kotlin bug.

👍 Expected behavior

Can connect to database

👎 Actual Behavior

Different types of logs; I tried both, localhost and IP address:

An internal curl error has occurred within the executor! Error Msg: Host is unreachable
An internal curl error has occurred within the executor! Error Msg: Operation timed out
An internal curl error has occurred within the executor! Error Msg: Could not resolve host: java0001-6345a364024ea2ad902e

Last one is very strange because I use custom ID java0001.

🎲 Appwrite version

Version 1.0.x

💻 Operating system

MacOS

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?
  • I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
Dominant language
Java
Stars
32
Forks
13
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.