R
Railway•14mo ago
Peaky

Rust + OpenSSL

Hi, i am traying to deploy an rust api to railway. But i always get a openssl error
30 Replies
Percy
Percy•14mo ago
Project ID: 3e64c14a-faca-43cd-954b-1d0d7e1ce767
Peaky
Peaky•14mo ago
3e64c14a-faca-43cd-954b-1d0d7e1ce767
Brody
Brody•14mo ago
are you trying to start an https server?
Peaky
Peaky•14mo ago
No But i have a depency "reqwest" that uses openssl-sys
Brody
Brody•14mo ago
show me the full error logs please
Brody
Brody•14mo ago
try adding this as a nixpacks.toml file to your project
[phases.setup]
nixPkgs = ["...","openssl"]
[phases.setup]
nixPkgs = ["...","openssl"]
Peaky
Peaky•14mo ago
Same errror
Brody
Brody•14mo ago
try this instead
[phases.setup]
aptPkgs = ["...","libssl-dev"]
[phases.setup]
aptPkgs = ["...","libssl-dev"]
Brody
Brody•14mo ago
[phases.setup]
nixPkgs = ["...","librust-openssl-dev"]
[phases.setup]
nixPkgs = ["...","librust-openssl-dev"]
Brody
Brody•14mo ago
oops
[phases.setup]
aptPkgs = ["...","librust-openssl-dev"]
[phases.setup]
aptPkgs = ["...","librust-openssl-dev"]
if this doesn't work, try disabling default imports for that reqwests package and only import the things you use from it, and then hopefully you aren't using something with openssl
Peaky
Peaky•14mo ago
The problem is that i need the tls-native feature
Brody
Brody•14mo ago
I'm out of ideas, sorry
Peaky
Peaky•14mo ago
what i should do then?
Brody
Brody•14mo ago
Google?
Peaky
Peaky•14mo ago
I tried everything, but nothing 😢
Brody
Brody•14mo ago
try moving to a Dockerfile based deployment
Peaky
Peaky•14mo ago
It's working fine now!
Peaky
Peaky•14mo ago
Thank you!
Brody
Brody•14mo ago
you are using a dockerfile now?
db20
db20•12mo ago
For anyone looking here, I had this same issue and with these dependencies, was able to get it right. Main thing that worked for me was the openssl dependency. [dependencies] axum = "0.5.11" tokio = { version = "1.0", features = ["full"] } tracing = "0.1.35" tracing-subscriber = "0.3.14" serde = { version = "1.0.138", features = ["derive"] } serde_json = "1.0" postgrest = "1.0" env_logger = "0.9.0" tower = "0.4.13" tower-http = { version = "0.3.4", features = ["full", "cors"] } dotenv = "0.15.0" http = "0.2.8" reqwest = { version = "0.11", features = ["json", "rustls-tls"] } chrono = { version = "0.4.26", features = ["serde"] } jsonwebtoken = "8.3.0" anyhow = "1.0.71" uuid = { version = "1.4.0", features = ["serde"] } aws-config = "0.55.3" aws-sdk-secretsmanager = "0.28.0" sqlx = { version = "0.7", features = [ "runtime-tokio", "tls-rustls", "postgres", "mysql", "macros", "uuid", "chrono", "bigdecimal"] } reqwest-retry = "0.2.2" reqwest-middleware = "0.2.2" serde_yaml = "0.9.23" neo4rs = "0.6.2" maplit = "1.0.2" futures = "0.3.28" regex = "1.9.1" bigdecimal = "0.4.1" openssl = { version = "0.10", features = ["vendored"] }
BigLung
BigLung•10mo ago
interesting I tried this as well but no dice Ill let you know if I discover an alternative sollution
Want results from more Discord servers?
Add your server
More Posts
How do I use the latest version of Deno 1.34.1 using the nixpacks.toml (or) railway.tomlHi — 1.34.1 landed a fix for node:http2(https://github.com/denoland/deno/issues/16923), which I needGraphlQL error"message": "Failed to fetch", "stack": "TypeError: Failed to fetch\n at https://railway.appHow much do I pay for extra outbound network bandwidth? (if I need more than 100GB?)One of my bots uses about 600 GB data per month of inbound data and 140 GB of outbound data. I need URI parameters not passing from route to controllerI have a nodejs application that has the following URL /establishment/:id/:slug The :id parameter aCan't get any route using php and slim frameworkIt's a small app that I wanted to deploy. Everything works normal but when I try to get into a routeurgent: horizontal scaling limited at 5 replicasHi! We're on the teams plan. We're trying to scale as fast as we can, but the scaling is limited at Logging integrationsHey there, is there any platforms that integrate with railway loggings? I was looking for something Not able to use an endpoint on railway but all other are working fineI have an app where I have 2 apis, one is post request to create the users data and other post requeConnection between MySQL and Power BIHi, I host a MySQL database in Railway. How do I connect with this database in PowerBI? Cuz PowerBCannot connect PostgreSQL to Java project (Ebean, JDBC)Hello there, I'm trying to connect Railway PostgreSQL DB to my Java+Ebean project. I get this error: