Is there an easier way to configure a PDF service ...
# box-products
t
Is there an easier way to configure a PDF service in a CommandBox (CB) CF server than what I've been doing (and which now appears to no longer work for me). Steps I take after a new CB update is: • identify the cfusion location in my ~/.Commandbox/server/ which I usually select from the list of many based on last modified date. • Install the Adobe Add-On Services download and reference the above location of cfusion during that install. I place the Adobe Add-On folder in c:\ColdFUsionAdd-onServices • Inside the first step location for cfusion, locate the .prikey in the cfusion\lib folder and swap it for one not broken that another forum member here on Slack provided a while back. • Start CB and CF2018 server. The error I am getting after all that (in CF Admin panel) is can not connect to the PDFg service. The log string says "Error in setting up authentication for PDFg services. " This usually indicates the .prikey is not working. Advice is appreciated.
d
WIth commandbox you can use the cfpm command which is simply calling the cfpm command installed in your server.
so you can do
cfpm install pdf
t
Thanks for your suggestion. Is there an implied location for that? I get an error trying this since my working directory is my project, not my CF server.
Copy code
No Adobe 2021+ server found in [C:\Users\...
@Daniel Mejia I'm using CF2018 BTW
d
Do you use commandbox to start your server?
t
Yes
d
ok so you have to
cd
into the project folder and before you run
server start
run
cfpm install pdf
then finally
server start
t
My pwd is in the project folder but my cfusion is not there. It is in ~/.commandbox
d
yeah thats the default. thats ok. do you get server info with this command
server info
t
Yes
Copy code
wwwroot80 (stopped)  127.0.0.1:60767 --> C:\Users\...
  CF Engine: adobe 2018.0.15+330106
  Last Started: 22-Nov-2022 10:24:56

  Last status message:
  [INFO ] runwar.context: **** sending stop request to socket 127.0.0.1:61610
  [INFO ] runwar.context: *** stopped.
  [INFO ] runwar.context: ******************************************************************************
d
cfpm install pdf
this command should now work
t
No still fails:
Copy code
CommandBox> cfpm install pdf
No Adobe 2021+ server found in [C:\Users\bholm\Projects\IHS-DFSC\STARS 2\branch\rm12263\wwwroot\]
d
server info says you have acf 2018, and cfpm says it can't find acf 2021. perhaps you have conflicting server names try to identify if you have multiple servers for the current PWD...
server list
t
That lists 94 stopped servers and 1 running but they are all 2018 CF
d
oh my
t
I'd like to clear that out but not sure how
I must be doing something out of the norm
d
well there is one command
server forget --all
then you can
server start
again on the current pwd....HOWEVER, I don't know if you are doing anything custom to those server without commandbox because if you do this forget command will delete all that. The server config should be saved in your server.json and .cfconfig.json files part of your application code. I run
server forget --all
every so often but I'm confident I'm not loosing anything.
t
I have and use bot those files... server.json and .cfconfig.json
in my project workspace
d
have you done any CF Admin changes that you haven't exported to .cfconfig.json?
t
I don't think so
I usually pass that .cfconfig file around from project branch to branch of code.
Is it possible to forget all but the last one or two?
d
no, but you can do one by one
t
What about just going into the .Commandbox/server folder and removing all those folders there (except for the latest two)?
message has been deleted
d
yeah sure. I belive that would ok to do. but not sure.
t
@bdw429s is it "safe" to delete the above folders from ~/.CommandBox/server folder?
"Safe" meaning no negative repercussions.
@Daniel Mejia While waiting on Brad to respond, any idea why that install seems think I have CF2021?
d
well, I don't know, but the answer lies in the commandbox code. I assume both are using current current working directory name or the name in server.json then looking at the list of servers for a match. perhaps the list is sorted differently for the CFPM command vs the server info command.
I just deleted some servers via the file explorer and I was able to start those servers with no issue.
server list seems to be cached, so even after I deleted some servers
server list
still listing them. not sure how to refresh that list.
oh you can also use
server prune
and it will "forget" servers that haven't been started in 30 days.
or
server prune days=7
for 7 days and older.
t
That appears to be working.
slow going, about 1 per 10 sec
b
So trying to read through this thread, I have no freaking clue what you guys are trying to accomplish, lol
Firstly, cfpm only exists for 2021 as the error message said, so I don't understand why you're even trying to run it for a 2018 server
I also don't understand why you were trying to forget servers. Or at least, why you thought it would help anything.
Also, installing the pdf module into an ACF 2021 serer has nothing at all to do with the actual PDF add-on services that the original question was about. That needs to directed at Adobe's engineers, I have no idea why they made it so brittle and terrible
The servers that are returned from the
server list
command are stored in a JSON file inside the CommandBox home on disk. So even if you manually removed a server home, CommandBox would still "remember" that server.
And whether or not it's "safe" to delete a server home depends on whether or not you're ok with losing all the data stored in the server home ¯\_(ツ)_/¯