Chat Logs

  1. * phaleth joined #primate
  2. phalethhi
  3. phalethstill getting the same error when trying to start nevet https://paste.debian.net/plainh/dab58abd
  4. phalethpostgres is reachable from the app server https://paste.debian.net/plainh/0108da55 and I'm not sure if I should try postgres 17.9
  5. phalethit's very difficult to debug startup of this application since it leaves no clue if it can or cannot read environment variables on startup
  6. phalethafk
  7. phalethlooks like I should update gitea once gitea 1.25.5 is out and figure out how to build prometheus from source https://go.dev/blog/allocation-optimizations
  8. nevetAllocating on the Stack - The Go Programming Language
  9. phalethalso shame on google for not doing these optimizations much much earlier
  10. bluephaleth: yes, that's the error I got
  11. bluedreamreal: any idea how we can debug this?
  12. blueFeb 28 06:45:48 nevet java[55]: SQL State : 08001
  13. bluephaleth: are you sure the nevet container can see the app one, they're on the same network?
  14. blueCaused by: java.net.UnknownHostException: postgres:bfK7kP2fcyO7oUxN@192.168.1.105
  15. phalethoh it leaks password
  16. bot<discord:blue> yes
  17. phalethyeah, the nevet app can reach the db container, see the second paste
  18. blueoh, this is from the nevet app?
  19. phalethI think env vars are not being read
  20. phalethyeah, it's java
  21. blueare the env vars available in the container
  22. blue?
  23. phalethor is nevet not java? I don't know what this is then, was supposed to deploy the java app
  24. blueyes, nevet is kotlin, which is java
  25. phalethenv vars are set by systemd
  26. bluecan you do echo $DB_URL in the container?
  27. blueactually, I think I can enter the container myself and check
  28. bluece332a-nevet-srv
  29. blue?
  30. phalethno you cannot, cause env vars are set only for the systemd process that manages the kotlin or whatever app
  31. bluenevet.service?
  32. phalethwhich apps can normally read just fine, but not this one
  33. phalethyeah
  34. blueman I can't even use ping from inside the container
  35. bluethose images are really reduced :P
  36. phalethapt update
  37. phalethapt install iputils-ping
  38. bluethx
  39. phalethnp
  40. bluehm, looks fine indeed
  41. blueyup:
  42. blueroot@nevet:/etc/systemd/system# systemctl show nevet --property=Environment
  43. blueEnvironment=
  44. phalethanyway, normally applications should be self-discoverable, they should tell what you need to configure and error out if something is missing, but this is again some stuff hacked together that only runs on the developers machine
  45. phaleththe systemd property is called EnvironmentFile
  46. blueyes
  47. blueFeb 28 12:21:19 nevet java[892]: Build: ${git.commit.id.abbrev} (${git.branch}) ${git.build.time}
  48. bluebtw this line is also suspicious
  49. phalethI used a zip copy of the code to build the app
  50. bluephaleth: looks better, I removed username/password from the connection string, it kills java
  51. blueinstead, it loads them from the env vars
  52. bluenow there's some oauth2 issue
  53. blueFeb 28 12:24:37 nevet java[945]: Caused by: java.lang.IllegalStateException: Client id of registration 'google' must not be empty.
  54. blueHMMMMMM
  55. bluedreamreal: is this a hard requirement?
  56. phalethok, cool, I had no idea that was the problem and why I have to specify the credentials second time
  57. blueat least we're getting somewhere. but I think now we need dreamreal's help, and it's shabbat, he might be slow to respond
  58. blueit's actually better this way, phaleth. the password doesn't get leaked
  59. phalethyeah, I'll reset the password
  60. blueI'd still prefer if the jdbc connection string supported that, but it's ok
  61. blueapparently this is the officially documented for postgres jdbc: jdbc:postgresql://[REDACTED:url-credentials]@host:port/database
  62. blueah, sorry, I mean this:
  63. phalethI'd prefer jdbc making any sense in it's error messages
  64. bluejdbc:postgresql://host:port/database
  65. bluetrue
  66. phalethok
  67. blueapparently what also works are params
  68. bluejdbc:postgresql://host:port/database
  69. bluewith ?user=...&password=...
  70. phalethok, it run migrations
  71. blueit did?
  72. blueI can't tell, it's borked because there's no google client id
  73. bluebtw phaleth: https://github.com/primate-run/primate/issues/251
  74. nevetProposal: Add `AppFacade#env(key: string)` · Issue #251 · primate-run/primate
  75. phalethhere's the almost full log https://api.pastecode.io/anon/raw-snippet/rwoe5ynj?raw=inline&ticket=329e0fa6-7403-4e9a-adb3-d78889e19cb5
  76. nevetUntitled (rwoe5ynj) - PasteCode.io
  77. bluephaleth: meanwhile, could you change the deployment to come from https://gitea.repopack.app/blue/bytecode.news
  78. bluebecause this contains the primate app in apps/primate
  79. bluefor which we also need a container
  80. phalethyeah, I can try
  81. bluenice log, yes I get the same google error
  82. blueapparently it needsa GOOGLE_CLIENT_ID and _SECRET
  83. bluehttps://gitea.repopack.app/blue/bytecode.news/src/branch/master/.env.default
  84. bluethis isn't documented here yet
  85. bluephaleth: https://gitea.repopack.app/blue/bytecode.news/src/branch/master/docs/deployment.md
  86. blue`Nevet supports "Sign in with Google" and "Sign in with GitHub" via OIDC / OAuth2. Both are optional and independent -`
  87. bluehm
  88. bluemaybe this is a bug
  89. blueit should work without the GOOGLE_CLIENT_ID, but maybe the env variable has to be set? dunno
  90. blueyeah, I don't think it's optional
  91. bluespring picks it up automatically, and tries to configure it, hits empty string or missing property, dies
  92. phaleth"If `GOOGLE_CLIENT_ID` and `GITHUB_CLIENT_ID` are both empty, OIDC endpoints are not registered and the app runs OTP-only."
  93. blueyeah, that's simply not true in this case. or maybe we need to include those two env vars but set them to empty
  94. blueshould I try that?
  95. phalethnot sure if whatever reads those properties is that dumb, but null and empty is something different for sure
  96. phalethI mean env vars
  97. blueyeah, it's spring, and spring is a truckload of magic that no one understands
  98. blueI'm gonna try empty vars. but empty vars should be virtually the same as non-existent
  99. bluenope, still dying
  100. blueOMG
  101. bluechatgpt is telling me I need to "Move the Google registration into a profile:"
  102. bluebut then I'll need to rebuild the container
  103. phalethI can rebuild the container
  104. phalethbut I don't follow what chatccp is saying
  105. dreamrealYou should be able to put trash values in there, and I'm going to try to figure out how to make those things optional - it shouldn't be that hard to do - but the UI shoudl expect OIDC to be present, is the problem
  106. dreamrealbut you shouldn't have to rebuild a container to provide values to it, we need to be able to externalize them and put them in .env and docker just imports them
  107. phalethagreed
  108. phalethblue: I assume you can just rebase https://gitea.repopack.app/blue/bytecode.news ?
  109. bluephaleth: yes, once dreamreal fixes this google nonsense
  110. blueI don't know if I can just delete it from application.yml and it would work
  111. phalethok
  112. phalethlet's try getting the code from gitea then
  113. blueyes, it has the primate app under apps/primate, too
  114. blueI'm gonna sync my gh fork, then pull down stuff onto gitea
  115. blueomg
  116. phaleththere's a CLI called tea
  117. blueMerge branch 'jottinger:main' into master
  118. bluedid I tell you how much I hate GH?
  119. blueinstead of rebasing my branch, it does this nonsense
  120. bluemy fork*
  121. phalethall of these cli's are garbage
  122. phalethglab on top
  123. blueit's not a cli
  124. blueI went to gh, hit 'sync' fork
  125. phalethgh is github cli
  126. blueoh man
  127. bluegithub is such a garbage website
  128. blueoh man and I asked chatgpt and it spews total nonsense
  129. blueit claims rebase rewrites history. no it wouldn't, it wouldn't rewrite the upstream history, that's the poitn
  130. bluenvm, I'll do it myself
  131. bluegithub ui is nonsense
  132. phalethyeah, and I'll just download tar over https during the build, cannot be bothered figuring out something else
  133. bluephaleth: done
  134. bluegitea is rebased against the latest commmit + two primate app commits
  135. bluehttps://gitea.repopack.app/blue/bytecode.news
  136. blueonce he pushes out a fix, I can easily rebase again and push out to gitea
  137. bluewe need `ce332a-nevet-app` for primate, right?
  138. phalethfor primate?
  139. phalethno clue
  140. phalethI'll deploy the kotlin thing to that container
  141. blueyou want to put them in the same container?
  142. phalethoh, you always call everything app
  143. bluethe nevet java thingy is -srv
  144. phalethand that container name does not exist obviously, but I get it
  145. phalethyeah
  146. blueI was thinking you'd add -app for the primate app
  147. blueso specifically, for the code under apps/primate
  148. phalethyeah
  149. phalethI mean nah
  150. dreamrealokay, found it: creating an issue and I'm going to create a runtime profile so you can enable/disable OIDC with an invocation flag
  151. phalethlook at: sudo machinectl list
  152. phalethif everthing was an app that'd be a disaster
  153. bluece332a-nevet-db container systemd-nspawn debian 13 192.168.1.105…
  154. bluece332a-nevet-srv container systemd-nspawn debian 13 192.168.1.107…
  155. phalethit already is in other ways
  156. blueI was thinking you'd add ce332a-nevet-app for the primate app
  157. phalethI will add another container for primate, sure, but not gonna label it with -app
  158. bluesure, call it whatever you like
  159. dreamrealI'm gonna have a PR for this in a few minutes
  160. dreamrealSPRING_ACTIVE_PROFILES=oidc java -jar app-1.0.jar # this will require OIDC, ignore it otherwise
  161. phalethok
  162. dreamrealmain has been updated
  163. bluephaleth: it's on gitea
  164. dreamrealso: the *configuration* hasn't changed in .env but it won't try to use OIDC unless that profile is activated
  165. dreamrealI've got another issue for the UI to be able to introspect whether OIDC is enabled or not, but I haven't written anything for it yet
  166. blueah sorry dreamreal, I accidently pushed to upstream/master, let me delete it
  167. dreamrealhttps://github.com/jottinger/bytecode.news/issues/128
  168. phalethI will just put SPRING_ACTIVE_PROFILES=oidc into the env file
  169. dreamrealphaleth: do that ONLY IF YOU WANT OIDC enabled
  170. dreamrealif you don't, yeet it
  171. dreamrealthe default profile will not use OIDC
  172. phalethok, I'll get rid of it then
  173. dreamrealOIDC means configuring the google oauth tokens and setting up the github stuff
  174. blueok, I deleted it again
  175. dreamrealfor developers, that shouldn't be necessary unless they're specifically testing that path
  176. bluedreamreal: it's best if you changed my role on the original repo to readonly
  177. blueI'll keep accidently pushing master otherwise, but I don't need to
  178. phalethor just migrate github -> gitea, main -> master
  179. dreamrealyou're gonna love this, blue: github doesn't let me set it to readonly :D
  180. blueyeah that's what I did, but I accidently did `git push origin` and it pushed it to his repo
  181. dreamrealNot for a private repo, maybe
  182. blueor well, git push upstream, that was dumb
  183. phalethhmm, could set the main branch as protected or whatever github calls that
  184. blueI have upstream = his repo (jottinger/bytecode.news), origin (gitea) and then github (same fork, on github)
  185. dreamrealphaleth: doing that now
  186. blueI don't think I need github at all, but once I start sending him PRs, I don't know if I can do it from gitea
  187. dreamrealoh, damn you github
  188. dreamrealwon't apply to the repo because it's private
  189. dreamrealit might be good enough that it's time to move it, actually
  190. phalethheh
  191. dreamrealblue: what do you think? Nevet's exceeded the prior version enough to become IT?
  192. phalethI have no problem giving your access to our gitea
  193. dreamrealdear god no
  194. dreamrealI'm swimming in access as it is
  195. bluephaleth, he means moving it to a public github repo, I think. but why move it, dreamreal, why not just open up the repo?
  196. blueif you move it you lose all the issues
  197. dreamrealI was just gonna rename it and open it
  198. blueor do you mean with 'move', change from private to public?
  199. blueoh, gotcha
  200. dreamrealbut maybe opening it is enough
  201. phalethah, ok
  202. bluewell this limitation is ridiculous anyway
  203. dreamrealeverything is ridiculous, that's why we laugh
  204. blueno I mean, the way github cripples its features when your repo is private
  205. blueunder the guise of promoting FOSS. but it's exactly the opposite, they want you to pay
  206. blueprivate & public should get the same treatment, and premium features should cost either way
  207. blueanyway
  208. bluedon't open it up on my behalf
  209. blueI'll try to set up git to prevent me from accidently pushing master to upstream
  210. dreamrealso: any opinion on it being streampack vs bytecode.news?
  211. dreamrealdoeth the speaky-speaky things now, losers, or forever hold thy peace
  212. blueI don't have a specific opinion. but currently you're using three names and it's confusing, pick one and stick to it. if you already got the domain, then bytecode it is
  213. dreamrealwe're jews, names are transitory, be a jew :D
  214. blueya well
  215. dreamrealphaleth: any opinion? We have one vote for bytecode.news
  216. phalethsay it three times and you'll see
  217. dreamrealfor some reason it counts
  218. bluelol
  219. phalethreact-router react-router react-router, doesn't catch on
  220. dreamrealI have more votes than anyone else, so I win no matter what, but I'd like to hear from the el gallery anyway
  221. dreamrealbytecode.news three times isn't catchy either but that's fine
  222. blueI told him bytenews is better, but he won't listen
  223. dreamrealI actually like nevet but nevet's a specific instance, not THE PROJECT
  224. blueI'd personally get the domain bytenews.dev :P
  225. dreamrealphaleth: any opinion?
  226. dreamrealblue: I may have already gotten it
  227. dreamrealI don't remember
  228. phalethnevet should have ended with h, then it'd be cool like phaleth
  229. phalethwasted opportunity there
  230. dreamrealphaleth: only dorks' names end in h
  231. phalethheh
  232. * dreamreal used to use "Epesh" as a nick for YEARS
  233. dreamrealand in some communities Epesh is still remembered
  234. dreamrealblue: my hebrew is very very strong, as you see: mistranslit of efes
  235. blueyes I noticed. you also seemed to remember nevet means stream
  236. dreamrealI know, I know
  237. dreamrealI forget the first name we came up with
  238. dreamrealbut I like nevet
  239. bluethankfully, I'm here to correct you
  240. dreamrealI also like alit but I know a really cute lady named alit and that would be unseemly
  241. dreamrealI figured you deserved a chance to be right for once
  242. blueyeah that's a girl's name, nevet's a boy
  243. dreamrealmmm alit. If I'd been single I'd have seen her as a missed opportunity. Wonderful lady, though. Flighty, red hair, lithe... and a missile launch technician in the IDF :D
  244. blueyeah you don't wanna mess with that
  245. dreamrealnow a yoga instructor in sfarad
  246. bluehahahaha
  247. dreamrealoh if I'd been single I'd DEFINITELY have wanted to mess with that
  248. dreamrealI was not, plus I'm a professional, so there's no effin' way but biologically hell to the yes
  249. bluewell yeah, that's the problem isn't it
  250. dreamrealnot a problem. I love alit as a friend. There's no temptation there; she's just a hell of a person and I respect that.
  251. dreamrealphaleth: fine, you have no opinion
  252. dreamrealdealer's choice wins: I have voted as well
  253. blue heh
  254. phalethyeah, I'd say thanks for asking for an opinion, but I can't give any on something I have no clue about
  255. bluelol
  256. phalethbtw, before you open up the github repo to the world consider the following
  257. phalethsetup the copy of the repo somewhere else, and use the github repo as a mirror and continue using github only for issues and abandon PRs
  258. phalethand of couse setup an action/pipeline/whatever to push to github automatically
  259. phalethPRs on github can be disabled, not sure that's a paid feature
  260. blueit's been recently added, not paid
  261. dreamrealI don't want them disabled, I want them demanded
  262. dreamrealphaleth: that's certainly an option but no
  263. phalethyeah, right, the point of a mirror is to be read-only except for the action/pipeline from the other repo
  264. bluephaleth, did the oauth problem get solved?
  265. phalethnot yet, trying to find a place where to generate token in gitea
  266. dreamrealwhich oauth problem are you trying to solve?
  267. dreamrealand bytecode.news is now a public repo
  268. phalethoh, ok, what's the github url?
  269. dreamrealgithub.com/jottinger/bytecode.news
  270. phalethI think blue will want his stuff to be there, so I'll search for how to get the token from gitea
  271. phalethprivate access token I mean
  272. blueya
  273. phalethah, so it's under Settings -> Applications
  274. bluecool
  275. phalethlooks good now https://quickpaste.net/iWAoGlr/plain
  276. bluegood
  277. bluenow we need the primate app, no?
  278. bluecan you expose it under nevet.repopack.app?
  279. phalethsits at the top https://images4.imagebam.com/1a/5a/bf/ME1AZS3Y_o.png
  280. phalethtry if it's reachable at nevet.repopack.app
  281. phalethI actually have absolutely zero clue how to test that app
  282. phalethcurl maybe
  283. bluelet me add an index app
  284. phalethI guess it's not listening on port 80
  285. bluenope, it'd be the normal primate port at 6161
  286. bluedone
  287. phalethok, it's listening on 8080 but should I open that to the interwebz you mean?
  288. bluehttps://gitea.repopack.app/blue/bytecode.news/commit/9cbc244b72d5b46b0bf7a7c0fd465484d7ea9eb2
  289. bluethe java app is listening on 8080
  290. bluebut you only need to open the primate app
  291. phaleththe one which I didn't deploy yet
  292. blueyes
  293. bluethe primate app will send requests to the nevet api, internally, on the network
  294. bluebut only it will be exposed outside
  295. phalethok, makes sense
  296. blueso my ideal setup is, I have a script or something to pull & redeploy the nevet primate app / nevet itself, think we can do that?
  297. phalethno package-lock.json again, ok
  298. blueyes
  299. blueI don't do package-lock.jsons :P
  300. phalethI'll push the documentation once you tell me it works
  301. phalethand then you can automate, but hold on
  302. bluek
  303. phalethblue: https://quickpaste.net/fGq-nFg
  304. nevetQuickpaste
  305. phalethNode.js v25.7.0
  306. bluesweet
  307. dreamrealGah
  308. dreamrealurl list
  309. dreamrealurl ignore list
  310. nevetIgnored hosts include: x.com, twitter.com, paste.debian.net, pastebin.com, bpa.st, dpaste.com, and pastebin.org
  311. dreamrealurl ignore add quickpaste.net
  312. nevetAdded quickpaste.net to ignored hosts.
  313. blueFeb 28 15:08:48 nevet-primate node[75]: Error: Cannot find module '/app/build/server.js'
  314. bluewhat's that?
  315. bluenevet-prmt, is that the machine, phaleth?
  316. phalethwell I have no clue how to start it
  317. phalethyeah
  318. phalethit builds, prolly outputs a build dir
  319. phalethserver.js is what I'd expect
  320. blueyes
  321. bluehm
  322. phalethah, the build subdir got omitted
  323. blueyes
  324. bluethough even if I run `node server.ts`, it fails
  325. bluehm hm hm
  326. phalethserver.ts?
  327. phaleththink that will work on node, I guess it should
  328. blueserver.js
  329. bluesorry
  330. phalethok, well, let me rebuild
  331. blueso locally it works for me `node build/server.js`
  332. blueso when I'm automatically, I'm gonna overlay a .env file onto the build,
  333. bluewhen I'm automating it*
  334. bluethis is actually something I haven't explored yet, because .env files aren't usually baked into a build
  335. blueI'll just copy it into `build` after `npm run build` runs, in the Containerfile, I think
  336. phalethok, blue, it fails on some sort of assert https://quickpaste.net/7PWeP6l
  337. blueyeah that's what I can see locally
  338. blueor well, if I try to run it within the image
  339. bluemaybe a package.json is necessary
  340. bluelet me stub it
  341. phalethok, I gotta go out, I'll just push the documentation to gitea for you to see what I've done
  342. bluealrighty
  343. bluewelp, got it running on 6161
  344. bluenow I just need to adapt the haproxy config and reload the haproxy containre, no?
  345. blueah, you already have it
  346. bluesweet
  347. phalethcheck the provision repo the last commit - 0ac59c2a890370a11d1a246b6bff4072518228c4
  348. bluebefore you go, do you have any idea why nevet.repopack.app isn't working?
  349. bluethe app is running in the container at port 6161
  350. bluealso, thanks for the docs, I'll automate it into a script so I can easily redeploy
  351. phalethit's still repeatedly crashing with that error
  352. phalethneed to rebuild and restart as per instructions
  353. blueFeb 28 15:25:57 nevet-primate systemd[1]: Started nevet-primate.service - Primate Nevet Site.
  354. blueFeb 28 15:25:57 nevet-primate node[4114]: » app url http://localhost:6161
  355. bluethat's inside the ocntainer though
  356. bluehm, maybe localhost is false
  357. phalethtry this
  358. phalethjournalctl -n 150 -f -u nevet-primate
  359. blueya
  360. blueit contains old entries
  361. blueoh
  362. blueyou mean it keeps crashing?
  363. phalethyeah
  364. phalethif you are not sure then wipe out the container and try again
  365. bluethe last two lines though are
  366. blueFeb 28 15:25:57 nevet-primate systemd[1]: Started nevet-primate.service - Primate Nevet Site.
  367. blueFeb 28 15:25:57 nevet-primate node[4114]: » app url http://localhost:6161
  368. phalethweird
  369. phalethlet me ditch it
  370. blueif you recreate the container, you'll have the same problem
  371. blueyou need to copy over the original package.json, outside of build
  372. bluethis is a primate bug
  373. blueor an rcompat bug, doesn't matter, but you need a package.json somewhere because it uses that to find paths
  374. phalethI'm rebuilding with --no-cache
  375. phalethoh, ok
  376. blueoki, but make sure you copy `package.json` from the repo onto /app
  377. phalethinto /app and not /app/build?
  378. blueyes
  379. phalethweird
  380. blueit's something I need to fix, I don't know why it does on a production build where everything is self-contained
  381. bluewhy it does that*
  382. blueyou did everything right, it's a primate problem, but I can't fix it in primate quickly
  383. blueso for now copying the original package.json will solve it
  384. bluedreamreal: is there a reason java container is costing us 700mb of RAM?
  385. phalethit's running
  386. bluebut nevet.repopack.app is still not working?
  387. phalethit does
  388. blueweird, I get 503
  389. bluehttps://nevet.repopack.app is working for you?
  390. phaleth» app url http://localhost:6161
  391. phalethgotta configure it to listen to any address
  392. blueok, that would be 0.0.0.0
  393. phalethfrom the VM I get:
  394. phaleth$ curl -IL 192.168.1.108:6161
  395. phalethcurl: (7) Failed to connect to 192.168.1.108 port 6161 after 0 ms: Could not connect to server
  396. phalethanyway, you can do it blue, it's the same old same old, primate issues from now on :D
  397. bluealright
  398. bluelet me figure out how I can rebuild the machine
  399. blueheh, you're using an auth header
  400. bluesweet
  401. * nevet joined #primate
  402. * blue!~blue@user/blue changed the topic to: https://primate.run | this channel is mirrored to the Primate discord, channel #irc
  403. * nevet joined #primate
  404. * blue!~blue@user/blue changed the topic to: https://primate.run | this channel is mirrored to the Primate discord, channel #irc
  405. blueMerge pull request #136 from jottinger/feature/128-feature-discovery-endpoint
  406. * nevet joined #primate
  407. * blue!~blue@user/blue changed the topic to: https://primate.run | this channel is mirrored to the Primate discord, channel #irc